mirror of
https://github.com/lancedb/lancedb.git
synced 2026-08-27 16:38:31 +00:00
Compare commits
283 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| cb6a1fafa6 | |||
| a3339b7bdd | |||
| b20cdc4f93 | |||
| e77a62e35a | |||
| a9f49c8150 | |||
| a7d9f2e99d | |||
| 7dba793629 | |||
| 87bd6694b6 | |||
| 15e75804c4 | |||
| df2b6d3dd4 | |||
| ccec91d957 | |||
| ec82e36317 | |||
| da2a1c4a2c | |||
| 8463a10ebe | |||
| 7168d64af1 | |||
| 403c33dff0 | |||
| a0001043b6 | |||
| 1bb7acb74f | |||
| 4ce175276c | |||
| 4bccb43e56 | |||
| d5dc4c0f06 | |||
| 55ae6197c1 | |||
| 15bd821825 | |||
| cf162c8a10 | |||
| 2eba7ebd02 | |||
| 2d5298b6ee | |||
| 4cb9147bbf | |||
| 54a1982ef1 | |||
| 5bfde47a8e | |||
| 049b0c8f09 | |||
| 20556e23a9 | |||
| 01e272c0b0 | |||
| ad1634a0a5 | |||
| 5d1c28922a | |||
| 53c2164b84 | |||
| 6286ee8192 | |||
| af8ca2ad5e | |||
| aac6c62459 | |||
| 8df2fff75f | |||
| 0d30b31998 | |||
| 6a431ff0a0 | |||
| ab2c5adf5e | |||
| f02c4cad90 | |||
| 7b74c3dd91 | |||
| 13c6dae9a3 | |||
| 64aeee84a8 | |||
| 5b45e44ce3 | |||
| f893589356 | |||
| df4ad9f851 | |||
| 9330a9b851 | |||
| 02de07576e | |||
| 81617fd3d9 | |||
| 011fdd5c94 | |||
| 650f173236 | |||
| 9b21c136c6 | |||
| 694aa48e19 | |||
| 455ba5abbf | |||
| 5338aeb006 | |||
| 47a34f5cca | |||
| a17c241e86 | |||
| 1fc23e5473 | |||
| 87b831bcae | |||
| 59db036118 | |||
| c091243d5b | |||
| a2aea7b4e5 | |||
| 4a5341edb1 | |||
| 25dfe2cfd4 | |||
| 4dcd7f4314 | |||
| 2e36cd9dad | |||
| f31e27768a | |||
| b84150a53e | |||
| d135c18db6 | |||
| ef399de092 | |||
| 0d767abd0e | |||
| a92ae0ded5 | |||
| c54888a83a | |||
| ba6c44abc9 | |||
| 75b0a8e0a3 | |||
| 2a886141f7 | |||
| 2a1df8edcf | |||
| fd98b845ea | |||
| be48ada352 | |||
| 9ad2dfe601 | |||
| f909df3e87 | |||
| d715bbb588 | |||
| 5ce3d8d141 | |||
| 5eaac178b1 | |||
| 11af763fcd | |||
| 2ed5452e1c | |||
| b7c0b5987c | |||
| 97a4b38f19 | |||
| 10879d99b8 | |||
| 4e6a1d5dce | |||
| 13d2759356 | |||
| 7f52ec8c36 | |||
| c6ae0de3ee | |||
| 231f0655ce | |||
| 8c52977c59 | |||
| 359710a0bf | |||
| 1f1726369d | |||
| df354abae4 | |||
| 11bc674548 | |||
| 5593460823 | |||
| 2807ad6854 | |||
| 4761fa9bcb | |||
| 4c2939d66e | |||
| a813ce2f71 | |||
| a898dc81c2 | |||
| de3f8097e7 | |||
| 0ac59de5f1 | |||
| d082c2d2ac | |||
| 9d8699f99e | |||
| aa2c7b3591 | |||
| 590c0c1e77 | |||
| 382ecd65e3 | |||
| e26b22bcca | |||
| 3ba46135a5 | |||
| f903d07887 | |||
| 5d550124bd | |||
| c57cb310a2 | |||
| 97754f5123 | |||
| 7b1c063848 | |||
| c7f189f27b | |||
| a0a2942ad5 | |||
| e3d53dd185 | |||
| 66804e99fc | |||
| 9f85d4c639 | |||
| 1ba19d728e | |||
| 4c44587af0 | |||
| 1d1cafb59c | |||
| 4714598155 | |||
| 74f457a0f2 | |||
| cca6a7c989 | |||
| ad96489114 | |||
| 76429730c0 | |||
| 874b74dd3c | |||
| 61de47f3a5 | |||
| f4d613565e | |||
| 410ab9b6fe | |||
| 1d6e00b902 | |||
| a0228036ae | |||
| d8fc071a7d | |||
| e6fd8d071e | |||
| 670dcca551 | |||
| ed7e01a58b | |||
| 3450ccaf7f | |||
| 9b229f1e7c | |||
| f5b21c0aa4 | |||
| e927924d26 | |||
| 11a4966bfc | |||
| dd5aaa72dc | |||
| 3a200d77ef | |||
| bd09c53938 | |||
| 0b18e33180 | |||
| c89240b16c | |||
| 099ff355a4 | |||
| c5995fda67 | |||
| 25eb1fbfa4 | |||
| 4ac41c5c3f | |||
| 9a5b0398ec | |||
| d1d720d08a | |||
| c2e543f1b7 | |||
| 216c1b5f77 | |||
| fc1867da83 | |||
| f951da2b00 | |||
| 6530d82690 | |||
| b3fc9c444f | |||
| 6de8f42dcd | |||
| 5c3bd68e58 | |||
| 4be85444f0 | |||
| 68c07f333f | |||
| 814a379e08 | |||
| f31561c5bb | |||
| e0c5ceac03 | |||
| e93bb3355a | |||
| b75991eb07 | |||
| 97ca9bb943 | |||
| fa1b04f341 | |||
| 367abe99d2 | |||
| 52ce2c995c | |||
| e71a00998c | |||
| 39a2ac0a1c | |||
| bc7b344fa4 | |||
| f91d2f5fec | |||
| cf81b6419f | |||
| 0498ac1f2f | |||
| aeb1c3ee6a | |||
| f9ae46c0e7 | |||
| 84bf022fb1 | |||
| 310967eceb | |||
| 154dbeee2a | |||
| c9c08ac8b9 | |||
| e253f5d9b6 | |||
| 05b4fb0990 | |||
| 613b9c1099 | |||
| d5948576b9 | |||
| 0d3fc7860a | |||
| 531cec075c | |||
| 0e486511fa | |||
| 367262662d | |||
| 11efaf46ae | |||
| 1ea22ee5ef | |||
| 8cef8806e9 | |||
| a3cd7fce69 | |||
| 48ddc833dd | |||
| 2802764092 | |||
| 37bbb0dba1 | |||
| 155ec16161 | |||
| 636b8b5bbd | |||
| 715b81c86b | |||
| 7e1616376e | |||
| d5ac5b949a | |||
| 7be6f45e0b | |||
| d9e2d51f51 | |||
| e081708cce | |||
| 2d60ea6938 | |||
| dcb1443143 | |||
| c0230f91d2 | |||
| 5d629c9ecb | |||
| 14973ac9d1 | |||
| 70cbee6293 | |||
| 02783bf440 | |||
| 4323ca0147 | |||
| bd3dd6a8e5 | |||
| 3c1162612e | |||
| 53c7c560c9 | |||
| de4f77800d | |||
| b6ab721cf7 | |||
| 027d53500b | |||
| 9098f47e73 | |||
| 826a3e5ee9 | |||
| 9fac56252e | |||
| c55ca20c1b | |||
| 5cdb15feef | |||
| 7a3eea927f | |||
| 5dd9b072d8 | |||
| 6dde379d44 | |||
| 55f09ef1cd | |||
| e9d8651d18 | |||
| 071f467571 | |||
| f83aa25119 | |||
| 0a8fe4d026 | |||
| 3ad7be9825 | |||
| 589041d842 | |||
| 2e4cd56ab1 | |||
| 6fd8586fa7 | |||
| 6329b57604 | |||
| c51b13e70f | |||
| 0859312b83 | |||
| a6e8ec8d48 | |||
| bd2c6d0763 | |||
| fbf4a53475 | |||
| d3e15f3e17 | |||
| 9c017d8348 | |||
| c3cc2530b7 | |||
| 571295b0d9 | |||
| 972c682857 | |||
| 4f8ee82730 | |||
| 131024839f | |||
| 3c7ddf4d0c | |||
| 461176f9f2 | |||
| 3b8996bb69 | |||
| 3755064e93 | |||
| 8773b865a9 | |||
| 1ee29675b3 | |||
| 9be28448f5 | |||
| 357197bacc | |||
| ad51e2dd1f | |||
| e9e904783c | |||
| 8500b16eca | |||
| 57e7282342 | |||
| cc5f8070d7 | |||
| dc0fb01f6b | |||
| 94b7781551 | |||
| 7bf020b3d5 | |||
| 12a98479dc | |||
| e4552e577a | |||
| f979a902ad | |||
| 5a7a8da567 | |||
| 0db8176445 | |||
| bd84bba14d | |||
| ac07f8068c | |||
| bba362d372 |
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
[tool.bumpversion]
|
[tool.bumpversion]
|
||||||
current_version = "0.24.0-beta.0"
|
current_version = "0.30.0-beta.1"
|
||||||
parse = """(?x)
|
parse = """(?x)
|
||||||
(?P<major>0|[1-9]\\d*)\\.
|
(?P<major>0|[1-9]\\d*)\\.
|
||||||
(?P<minor>0|[1-9]\\d*)\\.
|
(?P<minor>0|[1-9]\\d*)\\.
|
||||||
|
|||||||
@@ -18,6 +18,6 @@ body:
|
|||||||
label: Link
|
label: Link
|
||||||
description: >
|
description: >
|
||||||
Provide a link to the existing documentation, if applicable.
|
Provide a link to the existing documentation, if applicable.
|
||||||
placeholder: ex. https://lancedb.com/docs/tables/...
|
placeholder: ex. https://docs.lancedb.com/tables/...
|
||||||
validations:
|
validations:
|
||||||
required: false
|
required: false
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
version: 2
|
||||||
|
|
||||||
|
# Scope: the root Cargo workspace, which produces the Rust binaries we
|
||||||
|
# ship to users (the Node.js and Python native extensions). The
|
||||||
|
# `rust/lancedb` library crate shares the same lockfile; its consumers
|
||||||
|
# pick their own dependency versions, but bumping transitive deps here
|
||||||
|
# keeps the binaries we ship current.
|
||||||
|
updates:
|
||||||
|
- package-ecosystem: cargo
|
||||||
|
directory: /
|
||||||
|
schedule:
|
||||||
|
interval: weekly
|
||||||
|
open-pull-requests-limit: 10
|
||||||
|
# Only update Cargo.lock, never widen/raise the version requirements in
|
||||||
|
# Cargo.toml. The goal is keeping the lockfile (and the binaries we ship)
|
||||||
|
# current on security fixes, not forcing our library's consumers onto
|
||||||
|
# newer minimum versions.
|
||||||
|
versioning-strategy: lockfile-only
|
||||||
|
groups:
|
||||||
|
rust-minor-patch:
|
||||||
|
update-types:
|
||||||
|
- minor
|
||||||
|
- patch
|
||||||
@@ -3,7 +3,7 @@ name: build-linux-wheel
|
|||||||
description: "Build a manylinux wheel for lance"
|
description: "Build a manylinux wheel for lance"
|
||||||
inputs:
|
inputs:
|
||||||
python-minor-version:
|
python-minor-version:
|
||||||
description: "8, 9, 10, 11, 12"
|
description: "10, 11, 12, 13"
|
||||||
required: true
|
required: true
|
||||||
args:
|
args:
|
||||||
description: "--release"
|
description: "--release"
|
||||||
@@ -23,12 +23,15 @@ runs:
|
|||||||
steps:
|
steps:
|
||||||
- name: CONFIRM ARM BUILD
|
- name: CONFIRM ARM BUILD
|
||||||
shell: bash
|
shell: bash
|
||||||
|
env:
|
||||||
|
ARM_BUILD: ${{ inputs.arm-build }}
|
||||||
run: |
|
run: |
|
||||||
echo "ARM BUILD: ${{ inputs.arm-build }}"
|
echo "ARM BUILD: $ARM_BUILD"
|
||||||
- name: Build x86_64 Manylinux wheel
|
- name: Build x86_64 Manylinux wheel
|
||||||
if: ${{ inputs.arm-build == 'false' }}
|
if: ${{ inputs.arm-build == 'false' }}
|
||||||
uses: PyO3/maturin-action@v1
|
uses: PyO3/maturin-action@v1
|
||||||
with:
|
with:
|
||||||
|
maturin-version: "1.12.4"
|
||||||
command: build
|
command: build
|
||||||
working-directory: python
|
working-directory: python
|
||||||
docker-options: "-e PIP_EXTRA_INDEX_URL='https://pypi.fury.io/lance-format/ https://pypi.fury.io/lancedb/'"
|
docker-options: "-e PIP_EXTRA_INDEX_URL='https://pypi.fury.io/lance-format/ https://pypi.fury.io/lancedb/'"
|
||||||
@@ -44,6 +47,7 @@ runs:
|
|||||||
if: ${{ inputs.arm-build == 'true' }}
|
if: ${{ inputs.arm-build == 'true' }}
|
||||||
uses: PyO3/maturin-action@v1
|
uses: PyO3/maturin-action@v1
|
||||||
with:
|
with:
|
||||||
|
maturin-version: "1.12.4"
|
||||||
command: build
|
command: build
|
||||||
working-directory: python
|
working-directory: python
|
||||||
docker-options: "-e PIP_EXTRA_INDEX_URL='https://pypi.fury.io/lance-format/ https://pypi.fury.io/lancedb/'"
|
docker-options: "-e PIP_EXTRA_INDEX_URL='https://pypi.fury.io/lance-format/ https://pypi.fury.io/lancedb/'"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ name: build_wheel
|
|||||||
description: "Build a lance wheel"
|
description: "Build a lance wheel"
|
||||||
inputs:
|
inputs:
|
||||||
python-minor-version:
|
python-minor-version:
|
||||||
description: "8, 9, 10, 11"
|
description: "10, 11, 12, 13"
|
||||||
required: true
|
required: true
|
||||||
args:
|
args:
|
||||||
description: "--release"
|
description: "--release"
|
||||||
@@ -20,6 +20,7 @@ runs:
|
|||||||
uses: PyO3/maturin-action@v1
|
uses: PyO3/maturin-action@v1
|
||||||
with:
|
with:
|
||||||
command: build
|
command: build
|
||||||
|
maturin-version: "1.12.4"
|
||||||
# TODO: pass through interpreter
|
# TODO: pass through interpreter
|
||||||
args: ${{ inputs.args }}
|
args: ${{ inputs.args }}
|
||||||
docker-options: "-e PIP_EXTRA_INDEX_URL='https://pypi.fury.io/lance-format/ https://pypi.fury.io/lancedb/'"
|
docker-options: "-e PIP_EXTRA_INDEX_URL='https://pypi.fury.io/lance-format/ https://pypi.fury.io/lancedb/'"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ name: build_wheel
|
|||||||
description: "Build a lance wheel"
|
description: "Build a lance wheel"
|
||||||
inputs:
|
inputs:
|
||||||
python-minor-version:
|
python-minor-version:
|
||||||
description: "8, 9, 10, 11"
|
description: "10, 11, 12, 13, 14"
|
||||||
required: true
|
required: true
|
||||||
args:
|
args:
|
||||||
description: "--release"
|
description: "--release"
|
||||||
@@ -25,10 +25,7 @@ runs:
|
|||||||
uses: PyO3/maturin-action@v1
|
uses: PyO3/maturin-action@v1
|
||||||
with:
|
with:
|
||||||
command: build
|
command: build
|
||||||
|
maturin-version: "1.12.4"
|
||||||
args: ${{ inputs.args }}
|
args: ${{ inputs.args }}
|
||||||
docker-options: "-e PIP_EXTRA_INDEX_URL='https://pypi.fury.io/lance-format/ https://pypi.fury.io/lancedb/'"
|
docker-options: "-e PIP_EXTRA_INDEX_URL='https://pypi.fury.io/lance-format/ https://pypi.fury.io/lancedb/'"
|
||||||
working-directory: python
|
working-directory: python
|
||||||
- uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: windows-wheels
|
|
||||||
path: python\target\wheels
|
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ jobs:
|
|||||||
name: Report Workflow Failure
|
name: Report Workflow Failure
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [build]
|
needs: [build]
|
||||||
if: always() && (github.event_name == 'release' || github.event_name == 'workflow_dispatch')
|
if: always() && failure() && startsWith(github.ref, 'refs/tags/v')
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
issues: write
|
issues: write
|
||||||
|
|||||||
@@ -0,0 +1,179 @@
|
|||||||
|
name: Codex Fix CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
workflow_run_url:
|
||||||
|
description: "Failing CI workflow run URL (e.g., https://github.com/lancedb/lancedb/actions/runs/12345678)"
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
branch:
|
||||||
|
description: "Branch to fix (e.g., main, release/v2.0, or feature-branch)"
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
guidelines:
|
||||||
|
description: "Additional guidelines for the fix (optional)"
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
pull-requests: write
|
||||||
|
actions: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
fix-ci:
|
||||||
|
runs-on: warp-ubuntu-latest-x64-4x
|
||||||
|
timeout-minutes: 60
|
||||||
|
env:
|
||||||
|
CC: clang
|
||||||
|
CXX: clang++
|
||||||
|
steps:
|
||||||
|
- name: Show inputs
|
||||||
|
run: |
|
||||||
|
echo "workflow_run_url = ${{ inputs.workflow_run_url }}"
|
||||||
|
echo "branch = ${{ inputs.branch }}"
|
||||||
|
echo "guidelines = ${{ inputs.guidelines }}"
|
||||||
|
|
||||||
|
- name: Checkout Repo
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: ${{ inputs.branch }}
|
||||||
|
fetch-depth: 0
|
||||||
|
persist-credentials: true
|
||||||
|
|
||||||
|
- name: Set up Node.js
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
# pnpm 11 (used by the nodejs install step below) requires
|
||||||
|
# Node >= 22.13; use 24 since 22 hits EOL in October.
|
||||||
|
node-version: 24
|
||||||
|
|
||||||
|
- name: Install Codex CLI
|
||||||
|
run: npm install -g @openai/codex
|
||||||
|
|
||||||
|
- name: Install Rust toolchain
|
||||||
|
uses: dtolnay/rust-toolchain@stable
|
||||||
|
with:
|
||||||
|
toolchain: stable
|
||||||
|
components: clippy, rustfmt
|
||||||
|
|
||||||
|
- uses: Swatinem/rust-cache@v2
|
||||||
|
|
||||||
|
- name: Install system dependencies
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y protobuf-compiler libssl-dev
|
||||||
|
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
|
|
||||||
|
- name: Install Python dependencies
|
||||||
|
run: |
|
||||||
|
pip install maturin ruff pytest pyarrow pandas polars
|
||||||
|
|
||||||
|
- name: Set up Java
|
||||||
|
uses: actions/setup-java@v4
|
||||||
|
with:
|
||||||
|
distribution: temurin
|
||||||
|
java-version: '11'
|
||||||
|
cache: maven
|
||||||
|
|
||||||
|
- name: Setup pnpm
|
||||||
|
uses: pnpm/action-setup@v4
|
||||||
|
with:
|
||||||
|
version: 11.1.1
|
||||||
|
- name: Install Node.js dependencies for TypeScript bindings
|
||||||
|
run: |
|
||||||
|
cd nodejs
|
||||||
|
pnpm install --frozen-lockfile
|
||||||
|
|
||||||
|
- name: Configure git user
|
||||||
|
run: |
|
||||||
|
git config user.name "lancedb automation"
|
||||||
|
git config user.email "robot@lancedb.com"
|
||||||
|
|
||||||
|
- name: Run Codex to fix CI failure
|
||||||
|
env:
|
||||||
|
WORKFLOW_RUN_URL: ${{ inputs.workflow_run_url }}
|
||||||
|
BRANCH: ${{ inputs.branch }}
|
||||||
|
GUIDELINES: ${{ inputs.guidelines }}
|
||||||
|
GITHUB_TOKEN: ${{ secrets.ROBOT_TOKEN }}
|
||||||
|
GH_TOKEN: ${{ secrets.ROBOT_TOKEN }}
|
||||||
|
OPENAI_API_KEY: ${{ secrets.CODEX_TOKEN }}
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
cat <<EOF >/tmp/codex-prompt.txt
|
||||||
|
You are running inside the lancedb repository on a GitHub Actions runner. Your task is to fix a CI failure.
|
||||||
|
|
||||||
|
Input parameters:
|
||||||
|
- Failing workflow run URL: ${WORKFLOW_RUN_URL}
|
||||||
|
- Branch to fix: ${BRANCH}
|
||||||
|
- Additional guidelines: ${GUIDELINES:-"None provided"}
|
||||||
|
|
||||||
|
Follow these steps exactly:
|
||||||
|
|
||||||
|
1. Extract the run ID from the workflow URL. The URL format is https://github.com/lancedb/lancedb/actions/runs/<run_id>.
|
||||||
|
|
||||||
|
2. Use "gh run view <run_id> --json jobs,conclusion,name" to get information about the failed run.
|
||||||
|
|
||||||
|
3. Identify which jobs failed. For each failed job, use "gh run view <run_id> --job <job_id> --log-failed" to get the failure logs.
|
||||||
|
|
||||||
|
4. Analyze the failure logs to understand what went wrong. Common failures include:
|
||||||
|
- Compilation errors
|
||||||
|
- Test failures
|
||||||
|
- Clippy warnings treated as errors
|
||||||
|
- Formatting issues
|
||||||
|
- Dependency issues
|
||||||
|
|
||||||
|
5. Based on the analysis, fix the issues in the codebase:
|
||||||
|
- For compilation errors: Fix the code that doesn't compile
|
||||||
|
- For test failures: Fix the failing tests or the code they test
|
||||||
|
- For clippy warnings: Apply the suggested fixes
|
||||||
|
- For formatting issues: Run "cargo fmt --all"
|
||||||
|
- For other issues: Apply appropriate fixes
|
||||||
|
|
||||||
|
6. After making fixes, verify them locally:
|
||||||
|
- Run "cargo fmt --all" to ensure formatting is correct
|
||||||
|
- Run "cargo clippy --workspace --tests --all-features -- -D warnings" to check for issues
|
||||||
|
- Run ONLY the specific failing tests to confirm they pass now:
|
||||||
|
- For Rust test failures: Run the specific test with "cargo test -p <crate> <test_name>"
|
||||||
|
- For Python test failures: Build with "cd python && maturin develop" then run "pytest <specific_test_file>::<test_name>"
|
||||||
|
- For Java test failures: Run "cd java && mvn test -Dtest=<TestClass>#<testMethod>"
|
||||||
|
- For TypeScript test failures: Run "cd nodejs && pnpm build && pnpm test -- --testNamePattern='<test_name>'"
|
||||||
|
- Do NOT run the full test suite - only run the tests that were failing
|
||||||
|
|
||||||
|
7. If the additional guidelines are provided, follow them as well.
|
||||||
|
|
||||||
|
8. Inspect "git status --short" and "git diff" to review your changes.
|
||||||
|
|
||||||
|
9. Create a fix branch: "git checkout -b codex/fix-ci-<run_id>".
|
||||||
|
|
||||||
|
10. Stage all changes with "git add -A" and commit with message "fix: resolve CI failures from run <run_id>".
|
||||||
|
|
||||||
|
11. Push the branch: "git push origin codex/fix-ci-<run_id>". If the remote branch exists, delete it first with "gh api -X DELETE repos/lancedb/lancedb/git/refs/heads/codex/fix-ci-<run_id>" then push. Do NOT use "git push --force" or "git push -f".
|
||||||
|
|
||||||
|
12. Create a pull request targeting "${BRANCH}":
|
||||||
|
- Title: "ci: <short summary describing the fix>" (e.g., "ci: fix clippy warnings in lancedb" or "ci: resolve test flakiness in vector search")
|
||||||
|
- First, write the PR body to /tmp/pr-body.md using a heredoc (cat <<'PREOF' > /tmp/pr-body.md). The body should include:
|
||||||
|
- Link to the failing workflow run
|
||||||
|
- Summary of what failed
|
||||||
|
- Description of the fixes applied
|
||||||
|
- Then run "gh pr create --base ${BRANCH} --body-file /tmp/pr-body.md".
|
||||||
|
|
||||||
|
13. Display the new PR URL, "git status --short", and a summary of what was fixed.
|
||||||
|
|
||||||
|
Constraints:
|
||||||
|
- Use bash commands for all operations.
|
||||||
|
- Do not merge the PR.
|
||||||
|
- Do not modify GitHub workflow files unless they are the cause of the failure.
|
||||||
|
- If any command fails, diagnose and attempt to fix the issue instead of aborting immediately.
|
||||||
|
- If you cannot fix the issue automatically, create the PR anyway with a clear explanation of what you tried and what remains to be fixed.
|
||||||
|
- env "GH_TOKEN" is available, use "gh" tools for GitHub-related operations.
|
||||||
|
EOF
|
||||||
|
|
||||||
|
printenv OPENAI_API_KEY | codex login --with-api-key
|
||||||
|
codex --config shell_environment_policy.ignore_default_excludes=true exec --dangerously-bypass-approvals-and-sandbox "$(cat /tmp/codex-prompt.txt)"
|
||||||
@@ -86,16 +86,17 @@ jobs:
|
|||||||
You are running inside the lancedb repository on a GitHub Actions runner. Update the Lance dependency to version ${VERSION} and prepare a pull request for maintainers to review.
|
You are running inside the lancedb repository on a GitHub Actions runner. Update the Lance dependency to version ${VERSION} and prepare a pull request for maintainers to review.
|
||||||
|
|
||||||
Follow these steps exactly:
|
Follow these steps exactly:
|
||||||
1. Use script "ci/set_lance_version.py" to update Lance dependencies. The script already refreshes Cargo metadata, so allow it to finish even if it takes time.
|
1. Use script "ci/set_lance_version.py" to update Lance Rust dependencies. The script already refreshes Cargo metadata, so allow it to finish even if it takes time.
|
||||||
2. Run "cargo clippy --workspace --tests --all-features -- -D warnings". If diagnostics appear, fix them yourself and rerun clippy until it exits cleanly. Do not skip any warnings.
|
2. Update the Java lance-core dependency version in "java/pom.xml": change the "<lance-core.version>...</lance-core.version>" property to "${VERSION}".
|
||||||
3. After clippy succeeds, run "cargo fmt --all" to format the workspace.
|
3. Run "cargo clippy --workspace --tests --all-features -- -D warnings". If diagnostics appear, fix them yourself and rerun clippy until it exits cleanly. Do not skip any warnings.
|
||||||
4. Ensure the repository is clean except for intentional changes. Inspect "git status --short" and "git diff" to confirm the dependency update and any required fixes.
|
4. After clippy succeeds, run "cargo fmt --all" to format the workspace.
|
||||||
5. Create and switch to a new branch named "${BRANCH_NAME}" (replace any duplicated hyphens if necessary).
|
5. Ensure the repository is clean except for intentional changes. Inspect "git status --short" and "git diff" to confirm the dependency update and any required fixes.
|
||||||
6. Stage all relevant files with "git add -A". Commit using the message "${COMMIT_TYPE}: update lance dependency to v${VERSION}".
|
6. Create and switch to a new branch named "${BRANCH_NAME}" (replace any duplicated hyphens if necessary).
|
||||||
7. Push the branch to origin. If the branch already exists, force-push your changes.
|
7. Stage all relevant files with "git add -A". Commit using the message "${COMMIT_TYPE}: update lance dependency to v${VERSION}".
|
||||||
8. env "GH_TOKEN" is available, use "gh" tools for github related operations like creating pull request.
|
8. Push the branch to origin. If the remote branch already exists, delete it first with "gh api -X DELETE repos/lancedb/lancedb/git/refs/heads/${BRANCH_NAME}" then push with "git push origin ${BRANCH_NAME}". Do NOT use "git push --force" or "git push -f".
|
||||||
9. Create a pull request targeting "main" with title "${COMMIT_TYPE}: update lance dependency to v${VERSION}". First, write the PR body to /tmp/pr-body.md using a heredoc (cat <<'EOF' > /tmp/pr-body.md). The body should summarize the dependency bump, clippy/fmt verification, and link the triggering tag (${TAG}). Then run "gh pr create --body-file /tmp/pr-body.md".
|
9. env "GH_TOKEN" is available, use "gh" tools for github related operations like creating pull request.
|
||||||
10. After creating the PR, display the PR URL, "git status --short", and a concise summary of the commands run and their results.
|
10. Create a pull request targeting "main" with title "${COMMIT_TYPE}: update lance dependency to v${VERSION}". First, write the PR body to /tmp/pr-body.md using a heredoc (cat <<'EOF' > /tmp/pr-body.md). The body should summarize the dependency bump, clippy/fmt verification, and link the triggering tag (${TAG}). Then run "gh pr create --body-file /tmp/pr-body.md".
|
||||||
|
11. After creating the PR, display the PR URL, "git status --short", and a concise summary of the commands run and their results.
|
||||||
|
|
||||||
Constraints:
|
Constraints:
|
||||||
- Use bash commands; avoid modifying GitHub workflow files other than through the scripted task above.
|
- Use bash commands; avoid modifying GitHub workflow files other than through the scripted task above.
|
||||||
|
|||||||
@@ -8,6 +8,9 @@ concurrency:
|
|||||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
labeler:
|
labeler:
|
||||||
permissions:
|
permissions:
|
||||||
@@ -15,7 +18,7 @@ jobs:
|
|||||||
name: Label PR
|
name: Label PR
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: srvaroa/labeler@master
|
- uses: srvaroa/labeler@v1
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
commitlint:
|
commitlint:
|
||||||
@@ -24,7 +27,7 @@ jobs:
|
|||||||
name: Verify PR title / description conforms to semantic-release
|
name: Verify PR title / description conforms to semantic-release
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/setup-node@v3
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: "18"
|
node-version: "18"
|
||||||
# These rules are disabled because Github will always ensure there
|
# These rules are disabled because Github will always ensure there
|
||||||
@@ -47,7 +50,7 @@ jobs:
|
|||||||
|
|
||||||
${{ github.event.pull_request.body }}
|
${{ github.event.pull_request.body }}
|
||||||
- if: failure()
|
- if: failure()
|
||||||
uses: actions/github-script@v6
|
uses: actions/github-script@v7
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
const message = `**ACTION NEEDED**
|
const message = `**ACTION NEEDED**
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ jobs:
|
|||||||
sudo apt install -y protobuf-compiler libssl-dev
|
sudo apt install -y protobuf-compiler libssl-dev
|
||||||
rustup update && rustup default
|
rustup update && rustup default
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v6
|
||||||
with:
|
with:
|
||||||
python-version: "3.10"
|
python-version: "3.10"
|
||||||
cache: "pip"
|
cache: "pip"
|
||||||
@@ -53,7 +53,7 @@ jobs:
|
|||||||
python -m pip install --extra-index-url https://pypi.fury.io/lance-format/ --extra-index-url https://pypi.fury.io/lancedb/ -e .
|
python -m pip install --extra-index-url https://pypi.fury.io/lance-format/ --extra-index-url https://pypi.fury.io/lancedb/ -e .
|
||||||
python -m pip install --extra-index-url https://pypi.fury.io/lance-format/ --extra-index-url https://pypi.fury.io/lancedb/ -r ../docs/requirements.txt
|
python -m pip install --extra-index-url https://pypi.fury.io/lance-format/ --extra-index-url https://pypi.fury.io/lancedb/ -r ../docs/requirements.txt
|
||||||
- name: Set up node
|
- name: Set up node
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 20
|
||||||
cache: 'npm'
|
cache: 'npm'
|
||||||
@@ -68,7 +68,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
PYTHONPATH=. mkdocs build
|
PYTHONPATH=. mkdocs build
|
||||||
- name: Setup Pages
|
- name: Setup Pages
|
||||||
uses: actions/configure-pages@v2
|
uses: actions/configure-pages@v5
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: actions/upload-pages-artifact@v3
|
uses: actions/upload-pages-artifact@v3
|
||||||
with:
|
with:
|
||||||
|
|||||||
@@ -19,6 +19,9 @@ on:
|
|||||||
paths:
|
paths:
|
||||||
- .github/workflows/java-publish.yml
|
- .github/workflows/java-publish.yml
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
publish:
|
publish:
|
||||||
name: Build and Publish
|
name: Build and Publish
|
||||||
@@ -40,7 +43,7 @@ jobs:
|
|||||||
server-username: SONATYPE_USER
|
server-username: SONATYPE_USER
|
||||||
server-password: SONATYPE_TOKEN
|
server-password: SONATYPE_TOKEN
|
||||||
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
|
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
|
||||||
gpg-passphrase: ${{ secrets.GPG_PASSPHRASE }}
|
gpg-passphrase: MAVEN_GPG_PASSPHRASE
|
||||||
- name: Set git config
|
- name: Set git config
|
||||||
run: |
|
run: |
|
||||||
git config --global user.email "dev+gha@lancedb.com"
|
git config --global user.email "dev+gha@lancedb.com"
|
||||||
@@ -55,10 +58,11 @@ jobs:
|
|||||||
echo "use-agent" >> ~/.gnupg/gpg.conf
|
echo "use-agent" >> ~/.gnupg/gpg.conf
|
||||||
echo "pinentry-mode loopback" >> ~/.gnupg/gpg.conf
|
echo "pinentry-mode loopback" >> ~/.gnupg/gpg.conf
|
||||||
export GPG_TTY=$(tty)
|
export GPG_TTY=$(tty)
|
||||||
./mvnw --batch-mode -DskipTests -DpushChanges=false -Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }} deploy -pl lancedb-core -am -P deploy-to-ossrh
|
./mvnw --batch-mode -DskipTests -DpushChanges=false deploy -pl lancedb-core -am -P deploy-to-ossrh
|
||||||
env:
|
env:
|
||||||
SONATYPE_USER: ${{ secrets.SONATYPE_USER }}
|
SONATYPE_USER: ${{ secrets.SONATYPE_USER }}
|
||||||
SONATYPE_TOKEN: ${{ secrets.SONATYPE_TOKEN }}
|
SONATYPE_TOKEN: ${{ secrets.SONATYPE_TOKEN }}
|
||||||
|
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
|
||||||
|
|
||||||
report-failure:
|
report-failure:
|
||||||
name: Report Workflow Failure
|
name: Report Workflow Failure
|
||||||
|
|||||||
@@ -24,6 +24,9 @@ on:
|
|||||||
- java/**
|
- java/**
|
||||||
- .github/workflows/java.yml
|
- .github/workflows/java.yml
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-java:
|
build-java:
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
|
|||||||
@@ -10,6 +10,10 @@ on:
|
|||||||
- nodejs/**
|
- nodejs/**
|
||||||
- java/**
|
- java/**
|
||||||
- .github/workflows/license-header-check.yml
|
- .github/workflows/license-header-check.yml
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check-licenses:
|
check-licenses:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
@@ -7,10 +7,17 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- Cargo.toml
|
- Cargo.toml
|
||||||
|
- Cargo.lock
|
||||||
|
- rust-toolchain.toml
|
||||||
- nodejs/**
|
- nodejs/**
|
||||||
|
- rust/**
|
||||||
|
- docs/src/js/**
|
||||||
- .github/workflows/nodejs.yml
|
- .github/workflows/nodejs.yml
|
||||||
- docker-compose.yml
|
- docker-compose.yml
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
@@ -35,11 +42,17 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
lfs: true
|
lfs: true
|
||||||
- uses: actions/setup-node@v3
|
- uses: pnpm/action-setup@v4
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
version: 11.1.1
|
||||||
cache: 'npm'
|
- uses: actions/setup-node@v4
|
||||||
cache-dependency-path: nodejs/package-lock.json
|
with:
|
||||||
|
# pnpm 11 requires Node >= 22.13; use 24 since 22 hits EOL
|
||||||
|
# in October. The library itself still supports Node >= 18
|
||||||
|
# (see test matrix below).
|
||||||
|
node-version: 24
|
||||||
|
cache: 'pnpm'
|
||||||
|
cache-dependency-path: nodejs/pnpm-lock.yaml
|
||||||
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||||
with:
|
with:
|
||||||
components: rustfmt, clippy
|
components: rustfmt, clippy
|
||||||
@@ -54,11 +67,13 @@ jobs:
|
|||||||
run: cargo clippy --profile ci --all --all-features -- -D warnings
|
run: cargo clippy --profile ci --all --all-features -- -D warnings
|
||||||
- name: Lint Typescript
|
- name: Lint Typescript
|
||||||
run: |
|
run: |
|
||||||
npm ci
|
pnpm install --frozen-lockfile
|
||||||
npm run lint-ci
|
pnpm lint-ci
|
||||||
- name: Lint examples
|
- name: Lint examples
|
||||||
working-directory: nodejs/examples
|
working-directory: nodejs/examples
|
||||||
run: npm ci && npm run lint-ci
|
# The `@lancedb/lancedb` dep points at file:../dist; pnpm errors if
|
||||||
|
# that dir is missing, so create an empty one for lint-only runs.
|
||||||
|
run: mkdir -p ../dist && pnpm install --frozen-lockfile && pnpm lint-ci
|
||||||
linux:
|
linux:
|
||||||
name: Linux (NodeJS ${{ matrix.node-version }})
|
name: Linux (NodeJS ${{ matrix.node-version }})
|
||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
@@ -75,56 +90,77 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
lfs: true
|
lfs: true
|
||||||
- uses: actions/setup-node@v3
|
- uses: pnpm/action-setup@v4
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-version }}
|
version: 11.1.1
|
||||||
cache: 'npm'
|
- uses: actions/setup-node@v4
|
||||||
cache-dependency-path: nodejs/package-lock.json
|
name: Setup Node.js 24 for build
|
||||||
|
with:
|
||||||
|
# pnpm 11 requires Node >= 22.13; use 24 since 22 hits EOL
|
||||||
|
# in October. Build/install runs on Node 24; tests run on the
|
||||||
|
# matrix version below using direct jest invocation.
|
||||||
|
node-version: 24
|
||||||
|
cache: 'pnpm'
|
||||||
|
cache-dependency-path: nodejs/pnpm-lock.yaml
|
||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install -y protobuf-compiler libssl-dev
|
sudo apt install -y protobuf-compiler libssl-dev
|
||||||
npm install -g @napi-rs/cli
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
npm ci --include=optional
|
pnpm install --frozen-lockfile
|
||||||
npm run build:debug -- --profile ci
|
# No `--` separator: pnpm forwards it literally, which would
|
||||||
npm run tsc
|
# make napi-rs treat `--profile ci` as a cargo passthrough arg.
|
||||||
|
pnpm build:debug --profile ci
|
||||||
|
pnpm tsc
|
||||||
|
- name: Setup examples
|
||||||
|
working-directory: nodejs/examples
|
||||||
|
run: pnpm install --frozen-lockfile
|
||||||
|
- name: Check docs
|
||||||
|
run: |
|
||||||
|
# We run this as part of the job because the binary needs to be built
|
||||||
|
# first to export the types of the native code.
|
||||||
|
set -e
|
||||||
|
# `pnpm docs` would invoke pnpm's built-in `docs` command, not
|
||||||
|
# the script — use `pnpm run docs`.
|
||||||
|
pnpm run docs
|
||||||
|
if ! git diff --exit-code -- ../ ':(exclude)Cargo.lock'; then
|
||||||
|
echo "Docs need to be updated"
|
||||||
|
echo "Run 'pnpm run docs', fix any warnings, and commit the changes."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
name: Setup Node.js ${{ matrix.node-version }} for test
|
||||||
|
with:
|
||||||
|
node-version: ${{ matrix.node-version }}
|
||||||
- name: Setup localstack
|
- name: Setup localstack
|
||||||
working-directory: .
|
working-directory: .
|
||||||
run: docker compose up --detach --wait
|
run: docker compose up --detach --wait
|
||||||
- name: Test
|
- name: Test
|
||||||
env:
|
env:
|
||||||
S3_TEST: "1"
|
S3_TEST: "1"
|
||||||
run: npm run test
|
# Newer @smithy/core uses dynamic ESM imports.
|
||||||
- name: Setup examples
|
NODE_OPTIONS: "--experimental-vm-modules"
|
||||||
working-directory: nodejs/examples
|
# Invoke jest directly because pnpm 11 itself requires Node 22+
|
||||||
run: npm ci
|
# while the matrix tests on older Node versions.
|
||||||
|
run: npx jest --verbose
|
||||||
- name: Test examples
|
- name: Test examples
|
||||||
working-directory: ./
|
working-directory: ./
|
||||||
env:
|
env:
|
||||||
OPENAI_API_KEY: test
|
OPENAI_API_KEY: test
|
||||||
OPENAI_BASE_URL: http://0.0.0.0:8000
|
OPENAI_BASE_URL: http://0.0.0.0:8000
|
||||||
|
NODE_OPTIONS: "--experimental-vm-modules"
|
||||||
run: |
|
run: |
|
||||||
python ci/mock_openai.py &
|
python ci/mock_openai.py &
|
||||||
cd nodejs/examples
|
cd nodejs/examples
|
||||||
npm test
|
npx jest --testEnvironment jest-environment-node-single-context --verbose
|
||||||
- name: Check docs
|
|
||||||
run: |
|
|
||||||
# We run this as part of the job because the binary needs to be built
|
|
||||||
# first to export the types of the native code.
|
|
||||||
set -e
|
|
||||||
npm ci
|
|
||||||
npm run docs
|
|
||||||
if ! git diff --exit-code -- ../ ':(exclude)Cargo.lock'; then
|
|
||||||
echo "Docs need to be updated"
|
|
||||||
echo "Run 'npm run docs', fix any warnings, and commit the changes."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
macos:
|
macos:
|
||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
runs-on: "macos-14"
|
# macos-15 ships a newer linker; the older macos-14 linker fails to insert
|
||||||
|
# branch islands when the debug cdylib's __text section exceeds the 128 MB
|
||||||
|
# AArch64 B/BL branch range.
|
||||||
|
runs-on: "macos-15"
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
shell: bash
|
shell: bash
|
||||||
@@ -134,21 +170,28 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
lfs: true
|
lfs: true
|
||||||
- uses: actions/setup-node@v3
|
- uses: pnpm/action-setup@v4
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
version: 11.1.1
|
||||||
cache: 'npm'
|
- uses: actions/setup-node@v4
|
||||||
cache-dependency-path: nodejs/package-lock.json
|
with:
|
||||||
|
# pnpm 11 requires Node >= 22.13; use 24 since 22 hits EOL
|
||||||
|
# in October.
|
||||||
|
node-version: 24
|
||||||
|
cache: 'pnpm'
|
||||||
|
cache-dependency-path: nodejs/pnpm-lock.yaml
|
||||||
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
brew install protobuf
|
brew install protobuf
|
||||||
npm install -g @napi-rs/cli
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
npm ci --include=optional
|
pnpm install --frozen-lockfile
|
||||||
npm run build:debug -- --profile ci
|
# No `--` separator: pnpm forwards it literally, which would
|
||||||
npm run tsc
|
# make napi-rs treat `--profile ci` as a cargo passthrough arg.
|
||||||
|
pnpm build:debug --profile ci
|
||||||
|
pnpm tsc
|
||||||
- name: Test
|
- name: Test
|
||||||
run: |
|
run: |
|
||||||
npm run test
|
pnpm test
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ on:
|
|||||||
paths:
|
paths:
|
||||||
- .github/workflows/npm-publish.yml
|
- .github/workflows/npm-publish.yml
|
||||||
- Cargo.toml # Change in dependency frequently breaks builds
|
- Cargo.toml # Change in dependency frequently breaks builds
|
||||||
|
- Cargo.lock
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
@@ -124,20 +125,22 @@ jobs:
|
|||||||
pre_build: |-
|
pre_build: |-
|
||||||
set -e &&
|
set -e &&
|
||||||
apt-get update &&
|
apt-get update &&
|
||||||
apt-get install -y protobuf-compiler pkg-config
|
apt-get install -y protobuf-compiler pkg-config &&
|
||||||
|
# The base image (manylinux2014-cross) sets TARGET_CC to the old
|
||||||
|
# GCC 4.8 cross-compiler. aws-lc-sys checks TARGET_CC before CC,
|
||||||
|
# so it picks up GCC even though the napi-rs image sets CC=clang.
|
||||||
|
# Override to use the image's clang-18 which supports -fuse-ld=lld.
|
||||||
|
export TARGET_CC=clang TARGET_CXX=clang++
|
||||||
- target: x86_64-unknown-linux-musl
|
- target: x86_64-unknown-linux-musl
|
||||||
# This one seems to need some extra memory
|
# This one seems to need some extra memory
|
||||||
host: ubuntu-2404-8x-x64
|
host: ubuntu-2404-8x-x64
|
||||||
# https://github.com/napi-rs/napi-rs/blob/main/alpine.Dockerfile
|
|
||||||
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
|
|
||||||
features: fp16kernels
|
features: fp16kernels
|
||||||
pre_build: |-
|
pre_build: |-
|
||||||
set -e &&
|
set -e &&
|
||||||
apk add protobuf-dev curl &&
|
sudo apt-get update &&
|
||||||
ln -s /usr/lib/gcc/x86_64-alpine-linux-musl/14.2.0/crtbeginS.o /usr/lib/crtbeginS.o &&
|
sudo apt-get install -y protobuf-compiler pkg-config &&
|
||||||
ln -s /usr/lib/libgcc_s.so /usr/lib/libgcc.so &&
|
rustup target add x86_64-unknown-linux-musl &&
|
||||||
CC=gcc &&
|
export EXTRA_ARGS="-x"
|
||||||
CXX=g++
|
|
||||||
- target: aarch64-unknown-linux-gnu
|
- target: aarch64-unknown-linux-gnu
|
||||||
host: ubuntu-2404-8x-x64
|
host: ubuntu-2404-8x-x64
|
||||||
# https://github.com/napi-rs/napi-rs/blob/main/debian-aarch64.Dockerfile
|
# https://github.com/napi-rs/napi-rs/blob/main/debian-aarch64.Dockerfile
|
||||||
@@ -147,21 +150,20 @@ jobs:
|
|||||||
set -e &&
|
set -e &&
|
||||||
apt-get update &&
|
apt-get update &&
|
||||||
apt-get install -y protobuf-compiler pkg-config &&
|
apt-get install -y protobuf-compiler pkg-config &&
|
||||||
# https://github.com/aws/aws-lc-rs/issues/737#issuecomment-2725918627
|
export TARGET_CC=clang TARGET_CXX=clang++ &&
|
||||||
ln -s /usr/aarch64-unknown-linux-gnu/lib/gcc/aarch64-unknown-linux-gnu/4.8.5/crtbeginS.o /usr/aarch64-unknown-linux-gnu/aarch64-unknown-linux-gnu/sysroot/usr/lib/crtbeginS.o &&
|
# The manylinux2014 sysroot has glibc 2.17 headers which lack
|
||||||
ln -s /usr/aarch64-unknown-linux-gnu/lib/gcc /usr/aarch64-unknown-linux-gnu/aarch64-unknown-linux-gnu/sysroot/usr/lib/gcc &&
|
# AT_HWCAP2 (added in Linux 3.17). Define it for aws-lc-sys.
|
||||||
|
export CFLAGS="$CFLAGS -DAT_HWCAP2=26" &&
|
||||||
rustup target add aarch64-unknown-linux-gnu
|
rustup target add aarch64-unknown-linux-gnu
|
||||||
- target: aarch64-unknown-linux-musl
|
- target: aarch64-unknown-linux-musl
|
||||||
host: ubuntu-2404-8x-x64
|
host: ubuntu-2404-8x-x64
|
||||||
# https://github.com/napi-rs/napi-rs/blob/main/alpine.Dockerfile
|
|
||||||
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
|
|
||||||
features: ","
|
features: ","
|
||||||
pre_build: |-
|
pre_build: |-
|
||||||
set -e &&
|
set -e &&
|
||||||
apk add protobuf-dev &&
|
sudo apt-get update &&
|
||||||
|
sudo apt-get install -y protobuf-compiler &&
|
||||||
rustup target add aarch64-unknown-linux-musl &&
|
rustup target add aarch64-unknown-linux-musl &&
|
||||||
export CC_aarch64_unknown_linux_musl=aarch64-linux-musl-gcc &&
|
export EXTRA_ARGS="-x"
|
||||||
export CXX_aarch64_unknown_linux_musl=aarch64-linux-musl-g++
|
|
||||||
name: build - ${{ matrix.settings.target }}
|
name: build - ${{ matrix.settings.target }}
|
||||||
runs-on: ${{ matrix.settings.host }}
|
runs-on: ${{ matrix.settings.host }}
|
||||||
defaults:
|
defaults:
|
||||||
@@ -169,13 +171,18 @@ jobs:
|
|||||||
working-directory: nodejs
|
working-directory: nodejs
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
- name: Setup pnpm
|
||||||
|
uses: pnpm/action-setup@v4
|
||||||
|
with:
|
||||||
|
version: 11.1.1
|
||||||
- name: Setup node
|
- name: Setup node
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
if: ${{ !matrix.settings.docker }}
|
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
# pnpm 11 requires Node >= 22.13; use 24 since 22 hits EOL
|
||||||
cache: npm
|
# in October.
|
||||||
cache-dependency-path: nodejs/package-lock.json
|
node-version: 24
|
||||||
|
cache: pnpm
|
||||||
|
cache-dependency-path: nodejs/pnpm-lock.yaml
|
||||||
- name: Install
|
- name: Install
|
||||||
uses: dtolnay/rust-toolchain@stable
|
uses: dtolnay/rust-toolchain@stable
|
||||||
if: ${{ !matrix.settings.docker }}
|
if: ${{ !matrix.settings.docker }}
|
||||||
@@ -192,12 +199,18 @@ jobs:
|
|||||||
.cargo-cache
|
.cargo-cache
|
||||||
target/
|
target/
|
||||||
key: nodejs-${{ matrix.settings.target }}-cargo-${{ matrix.settings.host }}
|
key: nodejs-${{ matrix.settings.target }}-cargo-${{ matrix.settings.host }}
|
||||||
- name: Setup toolchain
|
|
||||||
run: ${{ matrix.settings.setup }}
|
|
||||||
if: ${{ matrix.settings.setup }}
|
|
||||||
shell: bash
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci
|
run: pnpm install --frozen-lockfile
|
||||||
|
- name: Install Zig
|
||||||
|
uses: mlugg/setup-zig@v2
|
||||||
|
if: ${{ contains(matrix.settings.target, 'musl') }}
|
||||||
|
with:
|
||||||
|
version: 0.14.1
|
||||||
|
- name: Install cargo-zigbuild
|
||||||
|
uses: taiki-e/install-action@v2
|
||||||
|
if: ${{ contains(matrix.settings.target, 'musl') }}
|
||||||
|
with:
|
||||||
|
tool: cargo-zigbuild
|
||||||
- name: Build in docker
|
- name: Build in docker
|
||||||
uses: addnab/docker-run-action@v3
|
uses: addnab/docker-run-action@v3
|
||||||
if: ${{ matrix.settings.docker }}
|
if: ${{ matrix.settings.docker }}
|
||||||
@@ -210,24 +223,24 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
set -e
|
set -e
|
||||||
${{ matrix.settings.pre_build }}
|
${{ matrix.settings.pre_build }}
|
||||||
npx napi build --platform --release --no-const-enum \
|
npx napi build --platform --release \
|
||||||
--features ${{ matrix.settings.features }} \
|
--features ${{ matrix.settings.features }} \
|
||||||
--target ${{ matrix.settings.target }} \
|
--target ${{ matrix.settings.target }} \
|
||||||
--dts ../lancedb/native.d.ts \
|
--dts ../lancedb/native.d.ts \
|
||||||
--js ../lancedb/native.js \
|
--js ../lancedb/native.js \
|
||||||
--strip \
|
--strip \
|
||||||
dist/
|
--output-dir dist/
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
${{ matrix.settings.pre_build }}
|
${{ matrix.settings.pre_build }}
|
||||||
npx napi build --platform --release --no-const-enum \
|
npx napi build --platform --release \
|
||||||
--features ${{ matrix.settings.features }} \
|
--features ${{ matrix.settings.features }} \
|
||||||
--target ${{ matrix.settings.target }} \
|
--target ${{ matrix.settings.target }} \
|
||||||
--dts ../lancedb/native.d.ts \
|
--dts ../lancedb/native.d.ts \
|
||||||
--js ../lancedb/native.js \
|
--js ../lancedb/native.js \
|
||||||
--strip \
|
--strip \
|
||||||
$EXTRA_ARGS \
|
$EXTRA_ARGS \
|
||||||
dist/
|
--output-dir dist/
|
||||||
if: ${{ !matrix.settings.docker }}
|
if: ${{ !matrix.settings.docker }}
|
||||||
shell: bash
|
shell: bash
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
@@ -240,7 +253,7 @@ jobs:
|
|||||||
# one to do the upload.
|
# one to do the upload.
|
||||||
- name: Make generic artifacts
|
- name: Make generic artifacts
|
||||||
if: ${{ matrix.settings.target == 'aarch64-apple-darwin' }}
|
if: ${{ matrix.settings.target == 'aarch64-apple-darwin' }}
|
||||||
run: npm run tsc
|
run: pnpm tsc
|
||||||
- name: Upload Generic Artifacts
|
- name: Upload Generic Artifacts
|
||||||
if: ${{ matrix.settings.target == 'aarch64-apple-darwin' }}
|
if: ${{ matrix.settings.target == 'aarch64-apple-darwin' }}
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
@@ -265,7 +278,7 @@ jobs:
|
|||||||
- target: x86_64-unknown-linux-gnu
|
- target: x86_64-unknown-linux-gnu
|
||||||
host: ubuntu-latest
|
host: ubuntu-latest
|
||||||
- target: aarch64-unknown-linux-gnu
|
- target: aarch64-unknown-linux-gnu
|
||||||
host: buildjet-16vcpu-ubuntu-2204-arm
|
host: ubuntu-2404-8x-arm64
|
||||||
node:
|
node:
|
||||||
- '20'
|
- '20'
|
||||||
runs-on: ${{ matrix.settings.host }}
|
runs-on: ${{ matrix.settings.host }}
|
||||||
@@ -275,14 +288,24 @@ jobs:
|
|||||||
working-directory: nodejs
|
working-directory: nodejs
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Setup node
|
- name: Setup pnpm
|
||||||
|
uses: pnpm/action-setup@v4
|
||||||
|
with:
|
||||||
|
version: 11.1.1
|
||||||
|
- name: Setup Node.js 24 for install
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
# pnpm 11 requires Node >= 22.13; use 24 since 22 hits EOL
|
||||||
|
# in October.
|
||||||
|
node-version: 24
|
||||||
|
cache: pnpm
|
||||||
|
cache-dependency-path: nodejs/pnpm-lock.yaml
|
||||||
|
- name: Install dependencies
|
||||||
|
run: pnpm install --frozen-lockfile
|
||||||
|
- name: Setup Node.js ${{ matrix.node }} for test
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node }}
|
node-version: ${{ matrix.node }}
|
||||||
cache: npm
|
|
||||||
cache-dependency-path: nodejs/package-lock.json
|
|
||||||
- name: Install dependencies
|
|
||||||
run: npm ci
|
|
||||||
- name: Download artifacts
|
- name: Download artifacts
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
@@ -303,7 +326,9 @@ jobs:
|
|||||||
- name: Move built files
|
- name: Move built files
|
||||||
run: cp dist/native.d.ts dist/native.js dist/*.node lancedb/
|
run: cp dist/native.d.ts dist/native.js dist/*.node lancedb/
|
||||||
- name: Test bindings
|
- name: Test bindings
|
||||||
run: npm test
|
# Invoke jest directly because pnpm 11 itself requires Node 22+
|
||||||
|
# while the matrix tests on older Node versions.
|
||||||
|
run: npx jest --verbose
|
||||||
publish:
|
publish:
|
||||||
name: Publish
|
name: Publish
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -315,15 +340,19 @@ jobs:
|
|||||||
- test-lancedb
|
- test-lancedb
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
- name: Setup pnpm
|
||||||
|
uses: pnpm/action-setup@v4
|
||||||
|
with:
|
||||||
|
version: 11.1.1
|
||||||
- name: Setup node
|
- name: Setup node
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 24
|
||||||
cache: npm
|
cache: pnpm
|
||||||
cache-dependency-path: nodejs/package-lock.json
|
cache-dependency-path: nodejs/pnpm-lock.yaml
|
||||||
registry-url: "https://registry.npmjs.org"
|
registry-url: "https://registry.npmjs.org"
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci
|
run: pnpm install --frozen-lockfile
|
||||||
- uses: actions/download-artifact@v4
|
- uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: nodejs-dist
|
name: nodejs-dist
|
||||||
@@ -343,19 +372,20 @@ jobs:
|
|||||||
- name: Display structure of downloaded files
|
- name: Display structure of downloaded files
|
||||||
run: find dist && find nodejs-artifacts
|
run: find dist && find nodejs-artifacts
|
||||||
- name: Move artifacts
|
- name: Move artifacts
|
||||||
run: npx napi artifacts -d nodejs-artifacts
|
run: pnpm exec napi artifacts -d nodejs-artifacts
|
||||||
- name: List packages
|
- name: List packages
|
||||||
run: find npm
|
run: find npm
|
||||||
- name: Publish
|
- name: Publish
|
||||||
env:
|
env:
|
||||||
NODE_AUTH_TOKEN: ${{ secrets.LANCEDB_NPM_REGISTRY_TOKEN }}
|
|
||||||
DRY_RUN: ${{ !startsWith(github.ref, 'refs/tags/v') }}
|
DRY_RUN: ${{ !startsWith(github.ref, 'refs/tags/v') }}
|
||||||
run: |
|
run: |
|
||||||
|
npm config set provenance true
|
||||||
ARGS="--access public"
|
ARGS="--access public"
|
||||||
if [[ $DRY_RUN == "true" ]]; then
|
if [[ $DRY_RUN == "true" ]]; then
|
||||||
ARGS="$ARGS --dry-run"
|
ARGS="$ARGS --dry-run"
|
||||||
fi
|
fi
|
||||||
if [[ $GITHUB_REF =~ refs/tags/v(.*)-beta.* ]]; then
|
VERSION=$(node -p "require('./package.json').version")
|
||||||
|
if [[ $VERSION == *-* ]]; then
|
||||||
ARGS="$ARGS --tag preview"
|
ARGS="$ARGS --tag preview"
|
||||||
fi
|
fi
|
||||||
npm publish $ARGS
|
npm publish $ARGS
|
||||||
@@ -363,7 +393,7 @@ jobs:
|
|||||||
name: Report Workflow Failure
|
name: Report Workflow Failure
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [build-lancedb, test-lancedb, publish]
|
needs: [build-lancedb, test-lancedb, publish]
|
||||||
if: always() && (github.event_name == 'release' || github.event_name == 'workflow_dispatch')
|
if: always() && failure() && startsWith(github.ref, 'refs/tags/v')
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
issues: write
|
issues: write
|
||||||
|
|||||||
@@ -8,11 +8,18 @@ on:
|
|||||||
# This should trigger a dry run (we skip the final publish step)
|
# This should trigger a dry run (we skip the final publish step)
|
||||||
paths:
|
paths:
|
||||||
- .github/workflows/pypi-publish.yml
|
- .github/workflows/pypi-publish.yml
|
||||||
|
- .github/workflows/build_linux_wheel/action.yml
|
||||||
|
- .github/workflows/build_mac_wheel/action.yml
|
||||||
|
- .github/workflows/build_windows_wheel/action.yml
|
||||||
- Cargo.toml # Change in dependency frequently breaks builds
|
- Cargo.toml # Change in dependency frequently breaks builds
|
||||||
|
- Cargo.lock
|
||||||
|
|
||||||
env:
|
env:
|
||||||
PIP_EXTRA_INDEX_URL: "https://pypi.fury.io/lance-format/ https://pypi.fury.io/lancedb/"
|
PIP_EXTRA_INDEX_URL: "https://pypi.fury.io/lance-format/ https://pypi.fury.io/lancedb/"
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
linux:
|
linux:
|
||||||
name: Python ${{ matrix.config.platform }} manylinux${{ matrix.config.manylinux }}
|
name: Python ${{ matrix.config.platform }} manylinux${{ matrix.config.manylinux }}
|
||||||
@@ -20,44 +27,37 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
config:
|
config:
|
||||||
- platform: x86_64
|
|
||||||
manylinux: "2_17"
|
|
||||||
extra_args: ""
|
|
||||||
runner: ubuntu-22.04
|
|
||||||
- platform: x86_64
|
- platform: x86_64
|
||||||
manylinux: "2_28"
|
manylinux: "2_28"
|
||||||
extra_args: "--features fp16kernels"
|
extra_args: "--features fp16kernels"
|
||||||
runner: ubuntu-22.04
|
runner: ubuntu-22.04
|
||||||
- platform: aarch64
|
# For successful fat LTO builds, we need a large runner to avoid OOM errors.
|
||||||
manylinux: "2_17"
|
|
||||||
extra_args: ""
|
|
||||||
# For successful fat LTO builds, we need a large runner to avoid OOM errors.
|
|
||||||
runner: ubuntu-2404-8x-arm64
|
|
||||||
- platform: aarch64
|
- platform: aarch64
|
||||||
manylinux: "2_28"
|
manylinux: "2_28"
|
||||||
extra_args: "--features fp16kernels"
|
extra_args: "--features fp16kernels"
|
||||||
runner: ubuntu-2404-8x-arm64
|
runner: ubuntu-2404-8x-arm64
|
||||||
runs-on: ${{ matrix.config.runner }}
|
runs-on: ${{ matrix.config.runner }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
lfs: true
|
lfs: true
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v6
|
||||||
with:
|
with:
|
||||||
python-version: 3.8
|
python-version: "3.10"
|
||||||
- uses: ./.github/workflows/build_linux_wheel
|
- uses: ./.github/workflows/build_linux_wheel
|
||||||
with:
|
with:
|
||||||
python-minor-version: 8
|
python-minor-version: 10
|
||||||
args: "--release --strip ${{ matrix.config.extra_args }}"
|
args: "--release --strip ${{ matrix.config.extra_args }}"
|
||||||
arm-build: ${{ matrix.config.platform == 'aarch64' }}
|
arm-build: ${{ matrix.config.platform == 'aarch64' }}
|
||||||
manylinux: ${{ matrix.config.manylinux }}
|
manylinux: ${{ matrix.config.manylinux }}
|
||||||
- uses: ./.github/workflows/upload_wheel
|
- uses: actions/upload-artifact@v7
|
||||||
if: startsWith(github.ref, 'refs/tags/python-v')
|
if: startsWith(github.ref, 'refs/tags/python-v')
|
||||||
with:
|
with:
|
||||||
pypi_token: ${{ secrets.LANCEDB_PYPI_API_TOKEN }}
|
name: wheels-linux-${{ matrix.config.platform }}-${{ matrix.config.manylinux }}
|
||||||
fury_token: ${{ secrets.FURY_TOKEN }}
|
path: target/wheels/lancedb-*.whl
|
||||||
|
if-no-files-found: error
|
||||||
mac:
|
mac:
|
||||||
timeout-minutes: 90
|
timeout-minutes: 90
|
||||||
runs-on: ${{ matrix.config.runner }}
|
runs-on: ${{ matrix.config.runner }}
|
||||||
@@ -69,52 +69,108 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
MACOSX_DEPLOYMENT_TARGET: 10.15
|
MACOSX_DEPLOYMENT_TARGET: 10.15
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
lfs: true
|
lfs: true
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v6
|
||||||
with:
|
with:
|
||||||
python-version: 3.12
|
python-version: "3.13"
|
||||||
- uses: ./.github/workflows/build_mac_wheel
|
- uses: ./.github/workflows/build_mac_wheel
|
||||||
with:
|
with:
|
||||||
python-minor-version: 8
|
python-minor-version: 10
|
||||||
args: "--release --strip --target ${{ matrix.config.target }} --features fp16kernels"
|
args: "--release --strip --target ${{ matrix.config.target }} --features fp16kernels"
|
||||||
- uses: ./.github/workflows/upload_wheel
|
- uses: actions/upload-artifact@v7
|
||||||
if: startsWith(github.ref, 'refs/tags/python-v')
|
if: startsWith(github.ref, 'refs/tags/python-v')
|
||||||
with:
|
with:
|
||||||
pypi_token: ${{ secrets.LANCEDB_PYPI_API_TOKEN }}
|
name: wheels-mac-${{ matrix.config.target }}
|
||||||
fury_token: ${{ secrets.FURY_TOKEN }}
|
path: target/wheels/lancedb-*.whl
|
||||||
|
if-no-files-found: error
|
||||||
windows:
|
windows:
|
||||||
timeout-minutes: 60
|
timeout-minutes: 90
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
|
env:
|
||||||
|
# link.exe is single-threaded and the long pole on Windows builds. Use
|
||||||
|
# rustc's bundled lld-link instead.
|
||||||
|
CARGO_TARGET_X86_64_PC_WINDOWS_MSVC_LINKER: rust-lld
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
lfs: true
|
lfs: true
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v6
|
||||||
with:
|
with:
|
||||||
python-version: 3.12
|
python-version: "3.13"
|
||||||
- uses: ./.github/workflows/build_windows_wheel
|
- uses: ./.github/workflows/build_windows_wheel
|
||||||
with:
|
with:
|
||||||
python-minor-version: 8
|
python-minor-version: 10
|
||||||
args: "--release --strip"
|
args: "--release --strip"
|
||||||
vcpkg_token: ${{ secrets.VCPKG_GITHUB_PACKAGES }}
|
- uses: actions/upload-artifact@v7
|
||||||
- uses: ./.github/workflows/upload_wheel
|
|
||||||
if: startsWith(github.ref, 'refs/tags/python-v')
|
if: startsWith(github.ref, 'refs/tags/python-v')
|
||||||
with:
|
with:
|
||||||
pypi_token: ${{ secrets.LANCEDB_PYPI_API_TOKEN }}
|
name: wheels-windows
|
||||||
fury_token: ${{ secrets.FURY_TOKEN }}
|
path: target/wheels/lancedb-*.whl
|
||||||
|
if-no-files-found: error
|
||||||
|
publish:
|
||||||
|
name: Publish wheels
|
||||||
|
if: startsWith(github.ref, 'refs/tags/python-v')
|
||||||
|
needs: [linux, mac, windows]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
id-token: write
|
||||||
|
contents: read
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v6
|
||||||
|
- name: Download wheel artifacts
|
||||||
|
uses: actions/download-artifact@v8
|
||||||
|
with:
|
||||||
|
pattern: wheels-*
|
||||||
|
path: target/wheels
|
||||||
|
merge-multiple: true
|
||||||
|
- name: List wheels
|
||||||
|
run: ls -la target/wheels
|
||||||
|
- name: Choose repo
|
||||||
|
id: choose_repo
|
||||||
|
run: |
|
||||||
|
if [[ ${{ github.ref }} == *beta* ]]; then
|
||||||
|
echo "repo=fury" >> $GITHUB_OUTPUT
|
||||||
|
else
|
||||||
|
echo "repo=pypi" >> $GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
|
- name: Publish to Fury
|
||||||
|
if: steps.choose_repo.outputs.repo == 'fury'
|
||||||
|
env:
|
||||||
|
FURY_TOKEN: ${{ secrets.FURY_TOKEN }}
|
||||||
|
run: |
|
||||||
|
shopt -s nullglob
|
||||||
|
WHEELS=(target/wheels/lancedb-*.whl)
|
||||||
|
if [[ ${#WHEELS[@]} -eq 0 ]]; then
|
||||||
|
echo "No wheels found in target/wheels/" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
for WHEEL in "${WHEELS[@]}"; do
|
||||||
|
echo "Uploading $WHEEL to Fury"
|
||||||
|
curl -f -F package=@"$WHEEL" "https://$FURY_TOKEN@push.fury.io/lancedb/"
|
||||||
|
done
|
||||||
|
# NOTE: pypa/gh-action-pypi-publish must be invoked directly from a
|
||||||
|
# workflow file, not from inside a composite action. When called from a
|
||||||
|
# composite, `github.action_repository` is empty (actions/runner#2473)
|
||||||
|
# and the action falls back to `github.repository`, producing a bogus
|
||||||
|
# `docker://ghcr.io/<repo>:<ref>` image reference that GHA tries to pull.
|
||||||
|
- name: Publish to PyPI
|
||||||
|
if: steps.choose_repo.outputs.repo == 'pypi'
|
||||||
|
uses: pypa/gh-action-pypi-publish@release/v1
|
||||||
|
with:
|
||||||
|
packages-dir: target/wheels/
|
||||||
gh-release:
|
gh-release:
|
||||||
if: startsWith(github.ref, 'refs/tags/python-v')
|
if: startsWith(github.ref, 'refs/tags/python-v')
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
lfs: true
|
lfs: true
|
||||||
@@ -177,13 +233,13 @@ jobs:
|
|||||||
report-failure:
|
report-failure:
|
||||||
name: Report Workflow Failure
|
name: Report Workflow Failure
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [linux, mac, windows]
|
needs: [linux, mac, windows, publish]
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
issues: write
|
issues: write
|
||||||
if: always() && (github.event_name == 'release' || github.event_name == 'workflow_dispatch')
|
if: always() && failure() && startsWith(github.ref, 'refs/tags/python-v')
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v6
|
||||||
- uses: ./.github/actions/create-failure-issue
|
- uses: ./.github/actions/create-failure-issue
|
||||||
with:
|
with:
|
||||||
job-results: ${{ toJSON(needs) }}
|
job-results: ${{ toJSON(needs) }}
|
||||||
|
|||||||
@@ -7,8 +7,18 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- Cargo.toml
|
- Cargo.toml
|
||||||
|
- Cargo.lock
|
||||||
|
- rust-toolchain.toml
|
||||||
- python/**
|
- python/**
|
||||||
|
- rust/**
|
||||||
- .github/workflows/python.yml
|
- .github/workflows/python.yml
|
||||||
|
- .github/workflows/build_linux_wheel/**
|
||||||
|
- .github/workflows/build_mac_wheel/**
|
||||||
|
- .github/workflows/build_windows_wheel/**
|
||||||
|
- .github/workflows/run_tests/**
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||||
@@ -36,9 +46,9 @@ jobs:
|
|||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
lfs: true
|
lfs: true
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v6
|
||||||
with:
|
with:
|
||||||
python-version: "3.12"
|
python-version: "3.13"
|
||||||
- name: Install ruff
|
- name: Install ruff
|
||||||
run: |
|
run: |
|
||||||
pip install ruff==0.9.9
|
pip install ruff==0.9.9
|
||||||
@@ -61,9 +71,9 @@ jobs:
|
|||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
lfs: true
|
lfs: true
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v6
|
||||||
with:
|
with:
|
||||||
python-version: "3.12"
|
python-version: "3.13"
|
||||||
- name: Install protobuf compiler
|
- name: Install protobuf compiler
|
||||||
run: |
|
run: |
|
||||||
sudo apt update
|
sudo apt update
|
||||||
@@ -90,9 +100,9 @@ jobs:
|
|||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
lfs: true
|
lfs: true
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v6
|
||||||
with:
|
with:
|
||||||
python-version: "3.12"
|
python-version: "3.13"
|
||||||
cache: "pip"
|
cache: "pip"
|
||||||
- name: Install protobuf
|
- name: Install protobuf
|
||||||
run: |
|
run: |
|
||||||
@@ -101,7 +111,6 @@ jobs:
|
|||||||
- name: Install
|
- name: Install
|
||||||
run: |
|
run: |
|
||||||
pip install --extra-index-url https://pypi.fury.io/lance-format/ --extra-index-url https://pypi.fury.io/lancedb/ -e .[tests,dev,embeddings]
|
pip install --extra-index-url https://pypi.fury.io/lance-format/ --extra-index-url https://pypi.fury.io/lancedb/ -e .[tests,dev,embeddings]
|
||||||
pip install tantivy
|
|
||||||
pip install mlx
|
pip install mlx
|
||||||
- name: Doctest
|
- name: Doctest
|
||||||
run: pytest --doctest-modules python/lancedb
|
run: pytest --doctest-modules python/lancedb
|
||||||
@@ -110,7 +119,7 @@ jobs:
|
|||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
python-minor-version: ["9", "12"]
|
python-minor-version: ["10", "13"]
|
||||||
runs-on: "ubuntu-24.04"
|
runs-on: "ubuntu-24.04"
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
@@ -126,7 +135,7 @@ jobs:
|
|||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install -y protobuf-compiler
|
sudo apt install -y protobuf-compiler
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v6
|
||||||
with:
|
with:
|
||||||
python-version: 3.${{ matrix.python-minor-version }}
|
python-version: 3.${{ matrix.python-minor-version }}
|
||||||
- uses: ./.github/workflows/build_linux_wheel
|
- uses: ./.github/workflows/build_linux_wheel
|
||||||
@@ -156,9 +165,9 @@ jobs:
|
|||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
lfs: true
|
lfs: true
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v6
|
||||||
with:
|
with:
|
||||||
python-version: "3.12"
|
python-version: "3.13"
|
||||||
- uses: ./.github/workflows/build_mac_wheel
|
- uses: ./.github/workflows/build_mac_wheel
|
||||||
with:
|
with:
|
||||||
args: --profile ci
|
args: --profile ci
|
||||||
@@ -185,9 +194,9 @@ jobs:
|
|||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
lfs: true
|
lfs: true
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v6
|
||||||
with:
|
with:
|
||||||
python-version: "3.12"
|
python-version: "3.13"
|
||||||
- uses: ./.github/workflows/build_windows_wheel
|
- uses: ./.github/workflows/build_windows_wheel
|
||||||
with:
|
with:
|
||||||
args: --profile ci
|
args: --profile ci
|
||||||
@@ -196,7 +205,7 @@ jobs:
|
|||||||
- name: Delete wheels
|
- name: Delete wheels
|
||||||
run: rm -rf target/wheels
|
run: rm -rf target/wheels
|
||||||
pydantic1x:
|
pydantic1x:
|
||||||
timeout-minutes: 30
|
timeout-minutes: 60
|
||||||
runs-on: "ubuntu-24.04"
|
runs-on: "ubuntu-24.04"
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
@@ -212,14 +221,13 @@ jobs:
|
|||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install -y protobuf-compiler
|
sudo apt install -y protobuf-compiler
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v6
|
||||||
with:
|
with:
|
||||||
python-version: 3.9
|
python-version: "3.10"
|
||||||
- name: Install lancedb
|
- name: Install lancedb
|
||||||
run: |
|
run: |
|
||||||
pip install "pydantic<2"
|
pip install "pydantic<2"
|
||||||
pip install pyarrow==16
|
pip install pyarrow==16
|
||||||
pip install --extra-index-url https://pypi.fury.io/lance-format/ --extra-index-url https://pypi.fury.io/lancedb/ -e .[tests]
|
pip install --extra-index-url https://pypi.fury.io/lance-format/ --extra-index-url https://pypi.fury.io/lancedb/ -e .[tests]
|
||||||
pip install tantivy
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: pytest -m "not slow and not s3_test" -x -v --durations=30 python/tests
|
run: pytest -m "not slow and not s3_test" -x -v --durations=30 python/tests
|
||||||
|
|||||||
+55
-10
@@ -7,9 +7,17 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- Cargo.toml
|
- Cargo.toml
|
||||||
|
- Cargo.lock
|
||||||
|
- rust-toolchain.toml
|
||||||
|
- deny.toml
|
||||||
- rust/**
|
- rust/**
|
||||||
|
- nodejs/Cargo.toml
|
||||||
|
- python/Cargo.toml
|
||||||
- .github/workflows/rust.yml
|
- .github/workflows/rust.yml
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
@@ -48,6 +56,19 @@ jobs:
|
|||||||
run: cargo fmt --all -- --check
|
run: cargo fmt --all -- --check
|
||||||
- name: Run clippy
|
- name: Run clippy
|
||||||
run: cargo clippy --profile ci --workspace --tests --all-features -- -D warnings
|
run: cargo clippy --profile ci --workspace --tests --all-features -- -D warnings
|
||||||
|
- name: Run clippy (without remote feature)
|
||||||
|
run: cargo clippy --profile ci --workspace --tests -- -D warnings
|
||||||
|
|
||||||
|
deny:
|
||||||
|
# Supply-chain checks: advisories, licenses, banned crates, and source
|
||||||
|
# restrictions. Configuration lives in `deny.toml` at the workspace root.
|
||||||
|
timeout-minutes: 10
|
||||||
|
runs-on: ubuntu-24.04
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: EmbarkStudios/cargo-deny-action@v2
|
||||||
|
with:
|
||||||
|
command: check advisories bans licenses sources
|
||||||
|
|
||||||
build-no-lock:
|
build-no-lock:
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
@@ -98,7 +119,9 @@ jobs:
|
|||||||
lfs: true
|
lfs: true
|
||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: sudo apt install -y protobuf-compiler libssl-dev
|
run: |
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install -y protobuf-compiler libssl-dev
|
||||||
- uses: rui314/setup-mold@v1
|
- uses: rui314/setup-mold@v1
|
||||||
- name: Make Swap
|
- name: Make Swap
|
||||||
run: |
|
run: |
|
||||||
@@ -181,7 +204,7 @@ jobs:
|
|||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
msrv: ["1.78.0"] # This should match up with rust-version in Cargo.toml
|
msrv: ["1.91.0"] # This should match up with rust-version in Cargo.toml
|
||||||
env:
|
env:
|
||||||
# Need up-to-date compilers for kernels
|
# Need up-to-date compilers for kernels
|
||||||
CC: clang-18
|
CC: clang-18
|
||||||
@@ -202,14 +225,36 @@ jobs:
|
|||||||
- name: Downgrade dependencies
|
- name: Downgrade dependencies
|
||||||
# These packages have newer requirements for MSRV
|
# These packages have newer requirements for MSRV
|
||||||
run: |
|
run: |
|
||||||
cargo update -p aws-sdk-bedrockruntime --precise 1.64.0
|
cargo update -p aws-sdk-bedrockruntime --precise 1.77.0
|
||||||
cargo update -p aws-sdk-dynamodb --precise 1.55.0
|
cargo update -p aws-sdk-dynamodb --precise 1.68.0
|
||||||
cargo update -p aws-config --precise 1.5.10
|
cargo update -p aws-config --precise 1.6.0
|
||||||
cargo update -p aws-sdk-kms --precise 1.51.0
|
cargo update -p aws-sdk-kms --precise 1.63.0
|
||||||
cargo update -p aws-sdk-s3 --precise 1.65.0
|
cargo update -p aws-sdk-s3 --precise 1.79.0
|
||||||
cargo update -p aws-sdk-sso --precise 1.50.0
|
cargo update -p aws-sdk-sso --precise 1.62.0
|
||||||
cargo update -p aws-sdk-ssooidc --precise 1.51.0
|
cargo update -p aws-sdk-ssooidc --precise 1.63.0
|
||||||
cargo update -p aws-sdk-sts --precise 1.51.0
|
cargo update -p aws-sdk-sts --precise 1.63.0
|
||||||
|
# aws-runtime/sigv4/credential-types/types and the aws-smithy-*
|
||||||
|
# crates bumped their MSRV to 1.91.1 in late 2026; pin to the last
|
||||||
|
# 1.91.0-compatible versions. The order matters — each downgrade
|
||||||
|
# only succeeds once everything that still pins it at a higher
|
||||||
|
# version has itself been downgraded.
|
||||||
|
cargo update -p aws-runtime --precise 1.5.12
|
||||||
|
cargo update -p aws-types --precise 1.3.9
|
||||||
|
cargo update -p aws-sigv4 --precise 1.3.5
|
||||||
|
cargo update -p aws-credential-types --precise 1.2.8
|
||||||
|
cargo update -p aws-smithy-checksums --precise 0.63.9
|
||||||
|
cargo update -p aws-smithy-runtime --precise 1.9.3
|
||||||
|
cargo update -p aws-smithy-http --precise 0.62.4
|
||||||
|
cargo update -p aws-smithy-eventstream --precise 0.60.12
|
||||||
|
cargo update -p aws-smithy-http-client --precise 1.1.3
|
||||||
|
cargo update -p aws-smithy-observability --precise 0.1.4
|
||||||
|
cargo update -p aws-smithy-query --precise 0.60.8
|
||||||
|
cargo update -p aws-smithy-runtime-api --precise 1.9.1
|
||||||
|
cargo update -p aws-smithy-async --precise 1.2.6
|
||||||
|
cargo update -p aws-smithy-types --precise 1.3.5
|
||||||
|
cargo update -p aws-smithy-xml --precise 0.60.11
|
||||||
cargo update -p home --precise 0.5.9
|
cargo update -p home --precise 0.5.9
|
||||||
- name: cargo +${{ matrix.msrv }} check
|
- name: cargo +${{ matrix.msrv }} check
|
||||||
|
env:
|
||||||
|
RUSTUP_TOOLCHAIN: ${{ matrix.msrv }}
|
||||||
run: cargo check --profile ci --workspace --tests --benches --all-features
|
run: cargo check --profile ci --workspace --tests --benches --all-features
|
||||||
|
|||||||
@@ -3,6 +3,9 @@ name: Update package-lock.json
|
|||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
publish:
|
publish:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
@@ -3,6 +3,9 @@ name: Update NodeJs package-lock.json
|
|||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
publish:
|
publish:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
@@ -1,45 +0,0 @@
|
|||||||
name: upload-wheel
|
|
||||||
|
|
||||||
description: "Upload wheels to Pypi"
|
|
||||||
inputs:
|
|
||||||
pypi_token:
|
|
||||||
required: true
|
|
||||||
description: "release token for the repo"
|
|
||||||
fury_token:
|
|
||||||
required: true
|
|
||||||
description: "release token for the fury repo"
|
|
||||||
|
|
||||||
runs:
|
|
||||||
using: "composite"
|
|
||||||
steps:
|
|
||||||
- name: Install dependencies
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
python -m pip install --upgrade pip
|
|
||||||
pip install twine
|
|
||||||
python3 -m pip install --upgrade pkginfo
|
|
||||||
- name: Choose repo
|
|
||||||
shell: bash
|
|
||||||
id: choose_repo
|
|
||||||
run: |
|
|
||||||
if [[ ${{ github.ref }} == *beta* ]]; then
|
|
||||||
echo "repo=fury" >> $GITHUB_OUTPUT
|
|
||||||
else
|
|
||||||
echo "repo=pypi" >> $GITHUB_OUTPUT
|
|
||||||
fi
|
|
||||||
- name: Publish to PyPI
|
|
||||||
shell: bash
|
|
||||||
env:
|
|
||||||
FURY_TOKEN: ${{ inputs.fury_token }}
|
|
||||||
PYPI_TOKEN: ${{ inputs.pypi_token }}
|
|
||||||
run: |
|
|
||||||
if [[ ${{ steps.choose_repo.outputs.repo }} == fury ]]; then
|
|
||||||
WHEEL=$(ls target/wheels/lancedb-*.whl 2> /dev/null | head -n 1)
|
|
||||||
echo "Uploading $WHEEL to Fury"
|
|
||||||
curl -f -F package=@$WHEEL https://$FURY_TOKEN@push.fury.io/lancedb/
|
|
||||||
else
|
|
||||||
twine upload --repository ${{ steps.choose_repo.outputs.repo }} \
|
|
||||||
--username __token__ \
|
|
||||||
--password $PYPI_TOKEN \
|
|
||||||
target/wheels/lancedb-*.whl
|
|
||||||
fi
|
|
||||||
@@ -17,9 +17,33 @@ Common commands:
|
|||||||
* Run tests: `cargo test --quiet --features remote --tests`
|
* Run tests: `cargo test --quiet --features remote --tests`
|
||||||
* Run specific test: `cargo test --quiet --features remote -p <package_name> --test <test_name>`
|
* Run specific test: `cargo test --quiet --features remote -p <package_name> --test <test_name>`
|
||||||
* Lint: `cargo clippy --quiet --features remote --tests --examples`
|
* Lint: `cargo clippy --quiet --features remote --tests --examples`
|
||||||
* Format: `cargo fmt --all`
|
* Format Rust: `cargo fmt --all`
|
||||||
|
* Format Python: `ruff format .`
|
||||||
|
* Lint Python: `ruff check .`
|
||||||
|
* Bootstrap Python dev env: `cd python && uv run --extra tests --extra dev maturin develop --extras tests,dev`
|
||||||
|
* Run Python tests: `cd python && uv run --extra tests pytest python/tests -vv --durations=10 -m "not slow and not s3_test"`
|
||||||
|
* Run specific Python test: `cd python && uv run --extra tests pytest python/tests/<test_file>.py::<test_name> -q`
|
||||||
|
|
||||||
Before committing changes, run formatting.
|
For Python validation, prefer the uv-managed environment declared by `python/uv.lock`.
|
||||||
|
Do not treat system `python`, global `pytest`, or missing editable-install errors as
|
||||||
|
final blockers; bootstrap or enter the uv environment instead. If `lancedb._lancedb`
|
||||||
|
is missing or stale, or if Rust/PyO3 binding code changed, rebuild the Python
|
||||||
|
extension with the bootstrap command above before running tests.
|
||||||
|
|
||||||
|
Before committing changes, run formatting for every language you touched. At minimum:
|
||||||
|
|
||||||
|
* Rust changes: run `cargo fmt --all`.
|
||||||
|
* Python changes: run `ruff format .` and `ruff check .` from the repository root,
|
||||||
|
and run targeted tests through `cd python && uv run ...`.
|
||||||
|
* TypeScript changes: run the relevant `npm`/`pnpm` lint, format, build, and docs commands in `nodejs`.
|
||||||
|
|
||||||
|
Before creating a PR, the exact value passed to `gh pr create --title` must follow
|
||||||
|
Conventional Commits, such as `fix: support nested field paths in native index creation`
|
||||||
|
or `feat(python): add dataset multiprocessing support`. Do not use a plain natural
|
||||||
|
language summary like `Support nested field paths in native index creation` as the PR
|
||||||
|
title. The semantic-release check uses the PR title and body as the merge commit message,
|
||||||
|
so a non-conventional PR title will fail CI. After creating a PR, read the remote PR title
|
||||||
|
back and fix it immediately if it is not conventional.
|
||||||
|
|
||||||
## Coding tips
|
## Coding tips
|
||||||
|
|
||||||
|
|||||||
Generated
+3095
-2347
File diff suppressed because it is too large
Load Diff
+35
-34
@@ -1,59 +1,60 @@
|
|||||||
[workspace]
|
[workspace]
|
||||||
members = ["rust/lancedb", "nodejs", "python"]
|
members = ["rust/lancedb", "nodejs", "python"]
|
||||||
# Python package needs to be built by maturin.
|
|
||||||
exclude = ["python"]
|
|
||||||
resolver = "2"
|
resolver = "2"
|
||||||
|
|
||||||
[workspace.package]
|
[workspace.package]
|
||||||
edition = "2021"
|
edition = "2024"
|
||||||
authors = ["LanceDB Devs <dev@lancedb.com>"]
|
authors = ["LanceDB Devs <dev@lancedb.com>"]
|
||||||
license = "Apache-2.0"
|
license = "Apache-2.0"
|
||||||
repository = "https://github.com/lancedb/lancedb"
|
repository = "https://github.com/lancedb/lancedb"
|
||||||
description = "Serverless, low-latency vector database for AI applications"
|
description = "Serverless, low-latency vector database for AI applications"
|
||||||
keywords = ["lancedb", "lance", "database", "vector", "search"]
|
keywords = ["lancedb", "lance", "database", "vector", "search"]
|
||||||
categories = ["database-implementations"]
|
categories = ["database-implementations"]
|
||||||
rust-version = "1.78.0"
|
rust-version = "1.91.0"
|
||||||
|
|
||||||
[workspace.dependencies]
|
[workspace.dependencies]
|
||||||
lance = { "version" = "=1.0.3", default-features = false, "tag" = "v1.0.3", "git" = "https://github.com/lance-format/lance.git" }
|
lance = { "version" = "=7.1.0-beta.4", default-features = false, "tag" = "v7.1.0-beta.4", "git" = "https://github.com/lance-format/lance.git" }
|
||||||
lance-core = { "version" = "=1.0.3", "tag" = "v1.0.3", "git" = "https://github.com/lance-format/lance.git" }
|
lance-core = { "version" = "=7.1.0-beta.4", "tag" = "v7.1.0-beta.4", "git" = "https://github.com/lance-format/lance.git" }
|
||||||
lance-datagen = { "version" = "=1.0.3", "tag" = "v1.0.3", "git" = "https://github.com/lance-format/lance.git" }
|
lance-datagen = { "version" = "=7.1.0-beta.4", "tag" = "v7.1.0-beta.4", "git" = "https://github.com/lance-format/lance.git" }
|
||||||
lance-file = { "version" = "=1.0.3", "tag" = "v1.0.3", "git" = "https://github.com/lance-format/lance.git" }
|
lance-file = { "version" = "=7.1.0-beta.4", "tag" = "v7.1.0-beta.4", "git" = "https://github.com/lance-format/lance.git" }
|
||||||
lance-io = { "version" = "=1.0.3", default-features = false, "tag" = "v1.0.3", "git" = "https://github.com/lance-format/lance.git" }
|
lance-io = { "version" = "=7.1.0-beta.4", default-features = false, "tag" = "v7.1.0-beta.4", "git" = "https://github.com/lance-format/lance.git" }
|
||||||
lance-index = { "version" = "=1.0.3", "tag" = "v1.0.3", "git" = "https://github.com/lance-format/lance.git" }
|
lance-index = { "version" = "=7.1.0-beta.4", "tag" = "v7.1.0-beta.4", "git" = "https://github.com/lance-format/lance.git" }
|
||||||
lance-linalg = { "version" = "=1.0.3", "tag" = "v1.0.3", "git" = "https://github.com/lance-format/lance.git" }
|
lance-linalg = { "version" = "=7.1.0-beta.4", "tag" = "v7.1.0-beta.4", "git" = "https://github.com/lance-format/lance.git" }
|
||||||
lance-namespace = { "version" = "=1.0.3", "tag" = "v1.0.3", "git" = "https://github.com/lance-format/lance.git" }
|
lance-namespace = { "version" = "=7.1.0-beta.4", "tag" = "v7.1.0-beta.4", "git" = "https://github.com/lance-format/lance.git" }
|
||||||
lance-namespace-impls = { "version" = "=1.0.3", default-features = false, "tag" = "v1.0.3", "git" = "https://github.com/lance-format/lance.git" }
|
lance-namespace-impls = { "version" = "=7.1.0-beta.4", default-features = false, "tag" = "v7.1.0-beta.4", "git" = "https://github.com/lance-format/lance.git" }
|
||||||
lance-table = { "version" = "=1.0.3", "tag" = "v1.0.3", "git" = "https://github.com/lance-format/lance.git" }
|
lance-table = { "version" = "=7.1.0-beta.4", "tag" = "v7.1.0-beta.4", "git" = "https://github.com/lance-format/lance.git" }
|
||||||
lance-testing = { "version" = "=1.0.3", "tag" = "v1.0.3", "git" = "https://github.com/lance-format/lance.git" }
|
lance-testing = { "version" = "=7.1.0-beta.4", "tag" = "v7.1.0-beta.4", "git" = "https://github.com/lance-format/lance.git" }
|
||||||
lance-datafusion = { "version" = "=1.0.3", "tag" = "v1.0.3", "git" = "https://github.com/lance-format/lance.git" }
|
lance-datafusion = { "version" = "=7.1.0-beta.4", "tag" = "v7.1.0-beta.4", "git" = "https://github.com/lance-format/lance.git" }
|
||||||
lance-encoding = { "version" = "=1.0.3", "tag" = "v1.0.3", "git" = "https://github.com/lance-format/lance.git" }
|
lance-encoding = { "version" = "=7.1.0-beta.4", "tag" = "v7.1.0-beta.4", "git" = "https://github.com/lance-format/lance.git" }
|
||||||
lance-arrow = { "version" = "=1.0.3", "tag" = "v1.0.3", "git" = "https://github.com/lance-format/lance.git" }
|
lance-arrow = { "version" = "=7.1.0-beta.4", "tag" = "v7.1.0-beta.4", "git" = "https://github.com/lance-format/lance.git" }
|
||||||
ahash = "0.8"
|
ahash = "0.8"
|
||||||
# Note that this one does not include pyarrow
|
# Note that this one does not include pyarrow
|
||||||
arrow = { version = "56.2", optional = false }
|
arrow = { version = "58.0.0", optional = false }
|
||||||
arrow-array = "56.2"
|
arrow-array = "58.0.0"
|
||||||
arrow-data = "56.2"
|
arrow-data = "58.0.0"
|
||||||
arrow-ipc = "56.2"
|
arrow-ipc = "58.0.0"
|
||||||
arrow-ord = "56.2"
|
arrow-ord = "58.0.0"
|
||||||
arrow-schema = "56.2"
|
arrow-schema = "58.0.0"
|
||||||
arrow-select = "56.2"
|
arrow-select = "58.0.0"
|
||||||
arrow-cast = "56.2"
|
arrow-cast = "58.0.0"
|
||||||
async-trait = "0"
|
async-trait = "0"
|
||||||
datafusion = { version = "50.1", default-features = false }
|
datafusion = { version = "53.0.0", default-features = false }
|
||||||
datafusion-catalog = "50.1"
|
datafusion-catalog = "53.0.0"
|
||||||
datafusion-common = { version = "50.1", default-features = false }
|
datafusion-common = { version = "53.0.0", default-features = false }
|
||||||
datafusion-execution = "50.1"
|
datafusion-execution = "53.0.0"
|
||||||
datafusion-expr = "50.1"
|
datafusion-expr = "53.0.0"
|
||||||
datafusion-physical-plan = "50.1"
|
datafusion-functions = "53.0.0"
|
||||||
|
datafusion-physical-plan = "53.0.0"
|
||||||
|
datafusion-physical-expr = "53.0.0"
|
||||||
|
datafusion-sql = "53.0.0"
|
||||||
env_logger = "0.11"
|
env_logger = "0.11"
|
||||||
half = { "version" = "2.6.0", default-features = false, features = [
|
half = { "version" = "2.7.1", default-features = false, features = [
|
||||||
"num-traits",
|
"num-traits",
|
||||||
] }
|
] }
|
||||||
futures = "0"
|
futures = "0"
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
moka = { version = "0.12", features = ["future"] }
|
moka = { version = "0.12", features = ["future"] }
|
||||||
object_store = "0.12.0"
|
object_store = "0.13.2"
|
||||||
pin-project = "1.0.7"
|
pin-project = "1.0.7"
|
||||||
rand = "0.9"
|
rand = "0.9"
|
||||||
snafu = "0.8"
|
snafu = "0.8"
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
.PHONY: licenses
|
||||||
|
|
||||||
|
licenses:
|
||||||
|
cargo about generate about.hbs -o RUST_THIRD_PARTY_LICENSES.html -c about.toml
|
||||||
|
cd python && cargo about generate ../about.hbs -o RUST_THIRD_PARTY_LICENSES.html -c ../about.toml
|
||||||
|
cd python && uv sync --all-extras && uv tool run pip-licenses --python .venv/bin/python --format=markdown --with-urls --output-file=PYTHON_THIRD_PARTY_LICENSES.md
|
||||||
|
cd nodejs && cargo about generate ../about.hbs -o RUST_THIRD_PARTY_LICENSES.html -c ../about.toml
|
||||||
|
cd nodejs && npx license-checker --markdown --out NODEJS_THIRD_PARTY_LICENSES.md
|
||||||
|
cd java && ./mvnw license:aggregate-add-third-party -q
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
# **The Multimodal AI Lakehouse**
|
# **The Multimodal AI Lakehouse**
|
||||||
|
|
||||||
[**How to Install** ](#how-to-install) ✦ [**Detailed Documentation**](https://lancedb.com/docs) ✦ [**Tutorials and Recipes**](https://github.com/lancedb/vectordb-recipes/tree/main) ✦ [**Contributors**](#contributors)
|
[**How to Install** ](#how-to-install) ✦ [**Detailed Documentation**](https://docs.lancedb.com) ✦ [**Tutorials and Recipes**](https://github.com/lancedb/vectordb-recipes/tree/main) ✦ [**Contributors**](#contributors)
|
||||||
|
|
||||||
**The ultimate multimodal data platform for AI/ML applications.**
|
**The ultimate multimodal data platform for AI/ML applications.**
|
||||||
|
|
||||||
@@ -57,7 +57,7 @@ LanceDB is a central location where developers can build, train and analyze thei
|
|||||||
|
|
||||||
## **How to Install**:
|
## **How to Install**:
|
||||||
|
|
||||||
Follow the [Quickstart](https://lancedb.com/docs/quickstart/) doc to set up LanceDB locally.
|
Follow the [Quickstart](https://docs.lancedb.com/quickstart) doc to set up LanceDB locally.
|
||||||
|
|
||||||
**API & SDK:** We also support Python, Typescript and Rust SDKs
|
**API & SDK:** We also support Python, Typescript and Rust SDKs
|
||||||
|
|
||||||
@@ -66,7 +66,7 @@ Follow the [Quickstart](https://lancedb.com/docs/quickstart/) doc to set up Lanc
|
|||||||
| Python SDK | https://lancedb.github.io/lancedb/python/python/ |
|
| Python SDK | https://lancedb.github.io/lancedb/python/python/ |
|
||||||
| Typescript SDK | https://lancedb.github.io/lancedb/js/globals/ |
|
| Typescript SDK | https://lancedb.github.io/lancedb/js/globals/ |
|
||||||
| Rust SDK | https://docs.rs/lancedb/latest/lancedb/index.html |
|
| Rust SDK | https://docs.rs/lancedb/latest/lancedb/index.html |
|
||||||
| REST API | https://docs.lancedb.com/api-reference/introduction |
|
| REST API | https://docs.lancedb.com/api-reference/rest |
|
||||||
|
|
||||||
## **Join Us and Contribute**
|
## **Join Us and Contribute**
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,70 @@
|
|||||||
|
<html>
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<style>
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
body {
|
||||||
|
background: #333;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
a {
|
||||||
|
color: skyblue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.container {
|
||||||
|
font-family: sans-serif;
|
||||||
|
max-width: 800px;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
.intro {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.licenses-list {
|
||||||
|
list-style-type: none;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
.license-used-by {
|
||||||
|
margin-top: -10px;
|
||||||
|
}
|
||||||
|
.license-text {
|
||||||
|
max-height: 200px;
|
||||||
|
overflow-y: scroll;
|
||||||
|
white-space: pre-wrap;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<main class="container">
|
||||||
|
<div class="intro">
|
||||||
|
<h1>Third Party Licenses</h1>
|
||||||
|
<p>This page lists the licenses of the projects used in cargo-about.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h2>Overview of licenses:</h2>
|
||||||
|
<ul class="licenses-overview">
|
||||||
|
{{#each overview}}
|
||||||
|
<li><a href="#{{id}}">{{name}}</a> ({{count}})</li>
|
||||||
|
{{/each}}
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h2>All license text:</h2>
|
||||||
|
<ul class="licenses-list">
|
||||||
|
{{#each licenses}}
|
||||||
|
<li class="license">
|
||||||
|
<h3 id="{{id}}">{{name}}</h3>
|
||||||
|
<h4>Used by:</h4>
|
||||||
|
<ul class="license-used-by">
|
||||||
|
{{#each used_by}}
|
||||||
|
<li><a href="{{#if crate.repository}} {{crate.repository}} {{else}} https://crates.io/crates/{{crate.name}} {{/if}}">{{crate.name}} {{crate.version}}</a></li>
|
||||||
|
{{/each}}
|
||||||
|
</ul>
|
||||||
|
<pre class="license-text">{{text}}</pre>
|
||||||
|
</li>
|
||||||
|
{{/each}}
|
||||||
|
</ul>
|
||||||
|
</main>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
+18
@@ -0,0 +1,18 @@
|
|||||||
|
accepted = [
|
||||||
|
"0BSD",
|
||||||
|
"Apache-2.0",
|
||||||
|
"Apache-2.0 WITH LLVM-exception",
|
||||||
|
"BSD-2-Clause",
|
||||||
|
"BSD-3-Clause",
|
||||||
|
"BSL-1.0",
|
||||||
|
"bzip2-1.0.6",
|
||||||
|
"CC0-1.0",
|
||||||
|
"CDDL-1.0",
|
||||||
|
"CDLA-Permissive-2.0",
|
||||||
|
"ISC",
|
||||||
|
"MIT",
|
||||||
|
"MPL-2.0",
|
||||||
|
"OpenSSL",
|
||||||
|
"Unicode-3.0",
|
||||||
|
"Zlib",
|
||||||
|
]
|
||||||
@@ -3,6 +3,7 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
import functools
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
@@ -26,6 +27,7 @@ SEMVER_RE = re.compile(
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@functools.total_ordering
|
||||||
@dataclass(frozen=True)
|
@dataclass(frozen=True)
|
||||||
class SemVer:
|
class SemVer:
|
||||||
major: int
|
major: int
|
||||||
@@ -110,25 +112,25 @@ def fetch_remote_tags() -> List[TagInfo]:
|
|||||||
"api",
|
"api",
|
||||||
"-X",
|
"-X",
|
||||||
"GET",
|
"GET",
|
||||||
f"repos/{LANCE_REPO}/git/refs/tags",
|
f"repos/{LANCE_REPO}/releases",
|
||||||
"--paginate",
|
|
||||||
"--jq",
|
"--jq",
|
||||||
".[].ref",
|
".[].tag_name",
|
||||||
|
"-F",
|
||||||
|
"per_page=20",
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
tags: List[TagInfo] = []
|
tags: List[TagInfo] = []
|
||||||
for line in output.splitlines():
|
for line in output.splitlines():
|
||||||
ref = line.strip()
|
tag = line.strip()
|
||||||
if not ref.startswith("refs/tags/v"):
|
if not tag.startswith("v"):
|
||||||
continue
|
continue
|
||||||
tag = ref.split("refs/tags/")[-1]
|
|
||||||
version = tag.lstrip("v")
|
version = tag.lstrip("v")
|
||||||
try:
|
try:
|
||||||
tags.append(TagInfo(tag=tag, version=version, semver=parse_semver(version)))
|
tags.append(TagInfo(tag=tag, version=version, semver=parse_semver(version)))
|
||||||
except ValueError:
|
except ValueError:
|
||||||
continue
|
continue
|
||||||
if not tags:
|
if not tags:
|
||||||
raise RuntimeError("No Lance tags could be parsed from GitHub API output")
|
raise RuntimeError("No Lance releases could be parsed from GitHub API output")
|
||||||
return tags
|
return tags
|
||||||
|
|
||||||
|
|
||||||
@@ -156,7 +158,9 @@ def read_current_version(repo_root: Path) -> str:
|
|||||||
|
|
||||||
|
|
||||||
def determine_latest_tag(tags: Iterable[TagInfo]) -> TagInfo:
|
def determine_latest_tag(tags: Iterable[TagInfo]) -> TagInfo:
|
||||||
return max(tags, key=lambda tag: tag.semver)
|
# Stable releases (no prerelease) are always preferred over pre-releases.
|
||||||
|
# Within each group, standard semver ordering applies.
|
||||||
|
return max(tags, key=lambda tag: (not tag.semver.prerelease, tag.semver))
|
||||||
|
|
||||||
|
|
||||||
def write_outputs(args: argparse.Namespace, payload: dict) -> None:
|
def write_outputs(args: argparse.Namespace, payload: dict) -> None:
|
||||||
|
|||||||
@@ -0,0 +1,196 @@
|
|||||||
|
# cargo-deny configuration for LanceDB.
|
||||||
|
#
|
||||||
|
# Run locally with `cargo deny check`. See
|
||||||
|
# https://embarkstudios.github.io/cargo-deny/ for the full reference.
|
||||||
|
|
||||||
|
# The set of target triples we care about. cargo-deny will only consider
|
||||||
|
# dependencies that are used on at least one of these targets. Keeping this
|
||||||
|
# explicit avoids noise from platform-specific crates (e.g. wasm, android,
|
||||||
|
# ios) that we never actually ship.
|
||||||
|
[graph]
|
||||||
|
targets = [
|
||||||
|
"x86_64-unknown-linux-gnu",
|
||||||
|
"aarch64-unknown-linux-gnu",
|
||||||
|
"x86_64-apple-darwin",
|
||||||
|
"aarch64-apple-darwin",
|
||||||
|
"x86_64-pc-windows-msvc",
|
||||||
|
"aarch64-pc-windows-msvc",
|
||||||
|
]
|
||||||
|
all-features = true
|
||||||
|
|
||||||
|
[output]
|
||||||
|
feature-depth = 1
|
||||||
|
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
# Advisories: security vulnerabilities and yanked crates.
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
[advisories]
|
||||||
|
version = 2
|
||||||
|
# Fail the check if any crate in the lockfile has been yanked from crates.io.
|
||||||
|
# Yanked crates are a signal the author retracted the release (often due to
|
||||||
|
# bugs or security issues) and should not be depended on.
|
||||||
|
yanked = "deny"
|
||||||
|
# Advisory IDs we have explicitly reviewed and chosen to accept. Every
|
||||||
|
# entry must include a rationale and, where possible, an upstream issue
|
||||||
|
# pointing to a fix. Revisit this list whenever dependencies are updated.
|
||||||
|
ignore = [
|
||||||
|
# rsa: Marvin Attack timing side-channel in PKCS#1 v1.5 decryption.
|
||||||
|
# Reached only through opendal → reqsign → rsa. We do not use RSA
|
||||||
|
# decryption in LanceDB ourselves; this is dormant in the signing path.
|
||||||
|
# No fixed release exists upstream as of this writing.
|
||||||
|
# https://rustsec.org/advisories/RUSTSEC-2023-0071
|
||||||
|
{ id = "RUSTSEC-2023-0071", reason = "rsa crate via opendal/reqsign; no fixed upstream release" },
|
||||||
|
|
||||||
|
# instant: unmaintained. Pulled in via backoff → instant. Upstream
|
||||||
|
# recommends switching to `web-time`; fix has to come from backoff.
|
||||||
|
# https://rustsec.org/advisories/RUSTSEC-2024-0384
|
||||||
|
{ id = "RUSTSEC-2024-0384", reason = "transitive via backoff; waiting on backoff replacement" },
|
||||||
|
|
||||||
|
# paste: unmaintained (author archived the repo). Used transitively by
|
||||||
|
# datafusion and the arrow ecosystem; widespread, no drop-in replacement.
|
||||||
|
# https://rustsec.org/advisories/RUSTSEC-2024-0436
|
||||||
|
{ id = "RUSTSEC-2024-0436", reason = "transitive via datafusion; awaiting ecosystem migration" },
|
||||||
|
|
||||||
|
# encoding: unmaintained. Reached through lindera-dictionary, which is
|
||||||
|
# required by the native Lindera tokenizer path. Lindera has not migrated
|
||||||
|
# off this crate yet.
|
||||||
|
# https://rustsec.org/advisories/RUSTSEC-2021-0153
|
||||||
|
{ id = "RUSTSEC-2021-0153", reason = "transitive via lindera-dictionary for native Lindera tokenizer" },
|
||||||
|
|
||||||
|
# fast-float: unsound and unmaintained. Reached only through polars-arrow
|
||||||
|
# from the optional Polars integration; replacement requires a Polars
|
||||||
|
# dependency upgrade.
|
||||||
|
# https://rustsec.org/advisories/RUSTSEC-2024-0379
|
||||||
|
{ id = "RUSTSEC-2024-0379", reason = "transitive via polars-arrow; waiting on Polars migration" },
|
||||||
|
|
||||||
|
# tantivy: segfault on malformed input due to missing bounds check.
|
||||||
|
# Pulled in via lance for full-text search. We only feed tantivy
|
||||||
|
# documents we construct ourselves, not attacker-controlled bytes.
|
||||||
|
# Tracked for a lance dependency bump.
|
||||||
|
# https://rustsec.org/advisories/RUSTSEC-2025-0003
|
||||||
|
{ id = "RUSTSEC-2025-0003", reason = "tantivy via lance; inputs are internally produced, not user-supplied bytes" },
|
||||||
|
|
||||||
|
# backoff: unmaintained. Reached only via async-openai. Replacement
|
||||||
|
# requires async-openai to migrate (or us to drop async-openai).
|
||||||
|
# https://rustsec.org/advisories/RUSTSEC-2025-0012
|
||||||
|
{ id = "RUSTSEC-2025-0012", reason = "transitive via async-openai; waiting on upstream migration" },
|
||||||
|
|
||||||
|
# number_prefix: unmaintained. Transitive via indicatif → hf-hub.
|
||||||
|
# No security impact, just maintenance status.
|
||||||
|
# https://rustsec.org/advisories/RUSTSEC-2025-0119
|
||||||
|
{ id = "RUSTSEC-2025-0119", reason = "transitive via hf-hub/indicatif; cosmetic formatting crate" },
|
||||||
|
|
||||||
|
# bincode: unmaintained. Reached through lindera and lindera-dictionary,
|
||||||
|
# which are required by the native Lindera tokenizer path. Lindera has not
|
||||||
|
# migrated to another serialization format yet.
|
||||||
|
# https://rustsec.org/advisories/RUSTSEC-2025-0141
|
||||||
|
{ id = "RUSTSEC-2025-0141", reason = "transitive via lindera/lindera-dictionary for native Lindera tokenizer" },
|
||||||
|
|
||||||
|
# lru: soundness issue in IterMut. Reached only through aws-sdk-s3 in
|
||||||
|
# LanceDB's dev-dependency graph; LanceDB does not use that iterator
|
||||||
|
# directly. Clearing this requires the AWS SDK chain to update lru.
|
||||||
|
# https://rustsec.org/advisories/RUSTSEC-2026-0002
|
||||||
|
{ id = "RUSTSEC-2026-0002", reason = "transitive via aws-sdk-s3 dev-dependency; waiting on AWS SDK lru upgrade" },
|
||||||
|
|
||||||
|
# rustls-webpki 0.101.7 (old major line): name-constraint checks for
|
||||||
|
# URI / wildcard names. Pulled in only via the legacy rustls 0.21 chain
|
||||||
|
# from aws-smithy-http-client. The 0.103 line we actively use is patched.
|
||||||
|
# Clearing the 0.101 copy requires the aws-sdk chain to migrate off
|
||||||
|
# rustls 0.21.
|
||||||
|
# https://rustsec.org/advisories/RUSTSEC-2026-0098
|
||||||
|
# https://rustsec.org/advisories/RUSTSEC-2026-0099
|
||||||
|
{ id = "RUSTSEC-2026-0098", reason = "only affects rustls-webpki 0.101 from legacy aws-smithy/rustls 0.21 chain" },
|
||||||
|
{ id = "RUSTSEC-2026-0099", reason = "only affects rustls-webpki 0.101 from legacy aws-smithy/rustls 0.21 chain" },
|
||||||
|
|
||||||
|
# rustls-webpki 0.101.7: reachable panic in CRL parsing. Same legacy
|
||||||
|
# rustls 0.21 chain from aws-smithy-http-client as above. The 0.103 line
|
||||||
|
# we actively use is upgraded to 0.103.13 which contains the fix.
|
||||||
|
# https://rustsec.org/advisories/RUSTSEC-2026-0104
|
||||||
|
{ id = "RUSTSEC-2026-0104", reason = "only affects rustls-webpki 0.101 from legacy aws-smithy/rustls 0.21 chain" },
|
||||||
|
|
||||||
|
# rand 0.8.5: soundness issue only when ThreadRng reseeds inside a custom
|
||||||
|
# logger. Reached through several transitive chains. LanceDB does not use
|
||||||
|
# rand from a custom logger; upgrade once all pinned chains accept 0.8.6+.
|
||||||
|
# https://rustsec.org/advisories/RUSTSEC-2026-0097
|
||||||
|
{ id = "RUSTSEC-2026-0097", reason = "transitive rand 0.8.5; LanceDB does not call ThreadRng from custom logging" },
|
||||||
|
]
|
||||||
|
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
# Licenses: only allow licenses we've reviewed as compatible with Apache-2.0.
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
[licenses]
|
||||||
|
version = 2
|
||||||
|
# SPDX identifiers for licenses that are compatible with our Apache-2.0
|
||||||
|
# distribution. Additions require legal review.
|
||||||
|
allow = [
|
||||||
|
"Apache-2.0",
|
||||||
|
"Apache-2.0 WITH LLVM-exception",
|
||||||
|
"MIT",
|
||||||
|
"BSD-2-Clause",
|
||||||
|
"BSD-3-Clause",
|
||||||
|
"ISC",
|
||||||
|
"Unicode-3.0",
|
||||||
|
"Unicode-DFS-2016",
|
||||||
|
"Zlib",
|
||||||
|
"CC0-1.0",
|
||||||
|
"MPL-2.0",
|
||||||
|
"BSL-1.0",
|
||||||
|
"OpenSSL",
|
||||||
|
# 0BSD ("BSD Zero Clause") is effectively public domain — no attribution
|
||||||
|
# required. Pulled in by `mock_instant`.
|
||||||
|
"0BSD",
|
||||||
|
# bzip2-1.0.6 is the permissive upstream bzip2 license (BSD-like). Pulled
|
||||||
|
# in by `libbz2-rs-sys`, the pure-Rust bzip2 implementation.
|
||||||
|
"bzip2-1.0.6",
|
||||||
|
# CDLA-Permissive-2.0 is a permissive data license used by `webpki-roots`
|
||||||
|
# for the Mozilla CA root bundle. Data-only, distribution-compatible.
|
||||||
|
"CDLA-Permissive-2.0",
|
||||||
|
]
|
||||||
|
confidence-threshold = 0.8
|
||||||
|
# Crates whose license cannot be determined from Cargo metadata but whose
|
||||||
|
# license we've manually confirmed from upstream. Keep this list minimal.
|
||||||
|
[[licenses.clarify]]
|
||||||
|
# polars-arrow-format omits the `license` field in its Cargo.toml, but the
|
||||||
|
# upstream repo (pola-rs/polars-arrow-format) is dual-licensed Apache-2.0 OR
|
||||||
|
# MIT. See https://github.com/pola-rs/polars-arrow-format/blob/main/LICENSE
|
||||||
|
crate = "polars-arrow-format"
|
||||||
|
expression = "Apache-2.0 OR MIT"
|
||||||
|
license-files = []
|
||||||
|
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
# Bans: disallow specific crates and flag dependency hygiene issues.
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
[bans]
|
||||||
|
# Warn (not deny) on duplicate versions of the same crate. In a large
|
||||||
|
# workspace like this one, duplicates are common and often unavoidable
|
||||||
|
# transitively. We surface them to discourage growth, but don't fail CI.
|
||||||
|
multiple-versions = "warn"
|
||||||
|
# Wildcard version requirements (`foo = "*"`) are a footgun — they let any
|
||||||
|
# future release in without review. Ban them outright.
|
||||||
|
wildcards = "deny"
|
||||||
|
# Internal workspace crates reference each other via `path = "..."`, which
|
||||||
|
# cargo-deny sees as a wildcard version. That's fine for private workspace
|
||||||
|
# members (not published to crates.io), so allow it specifically for paths.
|
||||||
|
allow-wildcard-paths = true
|
||||||
|
# Features that, if enabled, should cause the check to fail.
|
||||||
|
deny = []
|
||||||
|
# Crates to skip when checking for duplicate versions.
|
||||||
|
skip = []
|
||||||
|
# Similar to `skip`, but also skips the entire transitive subtree.
|
||||||
|
skip-tree = []
|
||||||
|
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
# Sources: restrict where crates can come from.
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
[sources]
|
||||||
|
# Deny any registry other than the ones explicitly listed below.
|
||||||
|
unknown-registry = "deny"
|
||||||
|
# Deny any git dependency whose host isn't in the allow-list below. This
|
||||||
|
# prevents accidental pulls from arbitrary forks.
|
||||||
|
unknown-git = "deny"
|
||||||
|
allow-registry = ["https://github.com/rust-lang/crates.io-index"]
|
||||||
|
# Lance is developed in a sibling repo and pulled as a git dependency until
|
||||||
|
# releases are cut to crates.io. Allow that specific host.
|
||||||
|
allow-git = [
|
||||||
|
"https://github.com/lance-format/lance",
|
||||||
|
]
|
||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
version: "3.9"
|
version: "3.9"
|
||||||
services:
|
services:
|
||||||
localstack:
|
localstack:
|
||||||
image: localstack/localstack:3.3
|
image: localstack/localstack:4.0
|
||||||
ports:
|
ports:
|
||||||
- 4566:4566
|
- 4566:4566
|
||||||
environment:
|
environment:
|
||||||
|
|||||||
+16
-16
@@ -1,27 +1,27 @@
|
|||||||
#Simple base dockerfile that supports basic dependencies required to run lance with FTS and Hybrid Search
|
# Simple base dockerfile that supports basic dependencies required to run lance with FTS and Hybrid Search
|
||||||
#Usage docker build -t lancedb:latest -f Dockerfile .
|
# Usage: docker build -t lancedb:latest -f Dockerfile .
|
||||||
FROM python:3.10-slim-buster
|
FROM python:3.12-slim-bookworm
|
||||||
|
|
||||||
# Install Rust
|
# Install build dependencies in a single layer
|
||||||
RUN apt-get update && apt-get install -y curl build-essential && \
|
RUN apt-get update && \
|
||||||
curl https://sh.rustup.rs -sSf | sh -s -- -y
|
apt-get install -y --no-install-recommends \
|
||||||
|
curl \
|
||||||
# Set the environment variable for Rust
|
build-essential \
|
||||||
ENV PATH="/root/.cargo/bin:${PATH}"
|
protobuf-compiler \
|
||||||
|
git \
|
||||||
# Install protobuf compiler
|
ca-certificates && \
|
||||||
RUN apt-get install -y protobuf-compiler && \
|
|
||||||
apt-get clean && \
|
apt-get clean && \
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
RUN apt-get -y update &&\
|
# Install Rust (pinned installer, non-interactive)
|
||||||
apt-get -y upgrade && \
|
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable --profile minimal
|
||||||
apt-get -y install git
|
|
||||||
|
|
||||||
|
# Set the environment variable for Rust
|
||||||
|
ENV PATH="/root/.cargo/bin:${PATH}"
|
||||||
|
|
||||||
# Verify installations
|
# Verify installations
|
||||||
RUN python --version && \
|
RUN python --version && \
|
||||||
rustc --version && \
|
rustc --version && \
|
||||||
protoc --version
|
protoc --version
|
||||||
|
|
||||||
RUN pip install tantivy lancedb
|
RUN pip install --no-cache-dir lancedb
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
# LanceDB Documentation
|
# LanceDB Documentation
|
||||||
|
|
||||||
LanceDB docs are available at [lancedb.com/docs](https://lancedb.com/docs).
|
LanceDB docs are available at [docs.lancedb.com](https://docs.lancedb.com).
|
||||||
|
|
||||||
The SDK docs are built and deployed automatically by [Github Actions](../.github/workflows/docs.yml)
|
The SDK docs are built and deployed automatically by [Github Actions](../.github/workflows/docs.yml)
|
||||||
whenever a commit is pushed to the `main` branch. So it is possible for the docs to show
|
whenever a commit is pushed to the `main` branch. So it is possible for the docs to show
|
||||||
|
|||||||
+10
-3
@@ -52,14 +52,21 @@ plugins:
|
|||||||
options:
|
options:
|
||||||
docstring_style: numpy
|
docstring_style: numpy
|
||||||
heading_level: 3
|
heading_level: 3
|
||||||
show_source: true
|
|
||||||
show_symbol_type_in_heading: true
|
|
||||||
show_signature_annotations: true
|
show_signature_annotations: true
|
||||||
show_root_heading: true
|
show_root_heading: true
|
||||||
|
show_docstring_examples: true
|
||||||
|
show_docstring_attributes: false
|
||||||
|
show_docstring_other_parameters: true
|
||||||
|
show_symbol_type_heading: true
|
||||||
|
show_labels: false
|
||||||
|
show_if_no_docstring: true
|
||||||
|
show_source: false
|
||||||
members_order: source
|
members_order: source
|
||||||
docstring_section_style: list
|
docstring_section_style: list
|
||||||
signature_crossrefs: true
|
signature_crossrefs: true
|
||||||
separate_signature: true
|
separate_signature: true
|
||||||
|
filters:
|
||||||
|
- "!^_"
|
||||||
import:
|
import:
|
||||||
# for cross references
|
# for cross references
|
||||||
- https://arrow.apache.org/docs/objects.inv
|
- https://arrow.apache.org/docs/objects.inv
|
||||||
@@ -113,7 +120,7 @@ markdown_extensions:
|
|||||||
emoji_index: !!python/name:material.extensions.emoji.twemoji
|
emoji_index: !!python/name:material.extensions.emoji.twemoji
|
||||||
emoji_generator: !!python/name:material.extensions.emoji.to_svg
|
emoji_generator: !!python/name:material.extensions.emoji.to_svg
|
||||||
- markdown.extensions.toc:
|
- markdown.extensions.toc:
|
||||||
toc_depth: 3
|
toc_depth: 4
|
||||||
permalink: true
|
permalink: true
|
||||||
permalink_title: Anchor link to this section
|
permalink_title: Anchor link to this section
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
mkdocs==1.5.3
|
mkdocs==1.6.1
|
||||||
mkdocs-jupyter==0.24.1
|
mkdocs-jupyter==0.24.1
|
||||||
mkdocs-material==9.5.3
|
mkdocs-material==9.6.23
|
||||||
mkdocs-autorefs<=1.0
|
mkdocs-autorefs>=0.5,<=1.0
|
||||||
mkdocstrings[python]==0.25.2
|
mkdocstrings[python]>=0.24,<1.0
|
||||||
griffe
|
griffe>=0.40,<1.0
|
||||||
mkdocs-render-swagger-plugin
|
mkdocs-render-swagger-plugin>=0.1.0
|
||||||
pydantic
|
pydantic>=2.0,<3.0
|
||||||
mkdocs-redirects
|
mkdocs-redirects>=1.2.0
|
||||||
+62
@@ -0,0 +1,62 @@
|
|||||||
|
# VoyageAI Embeddings
|
||||||
|
|
||||||
|
Voyage AI provides cutting-edge embedding and rerankers.
|
||||||
|
|
||||||
|
|
||||||
|
Using voyageai API requires voyageai package, which can be installed using `pip install voyageai`. Voyage AI embeddings are used to generate embeddings for text data. The embeddings can be used for various tasks like semantic search, clustering, and classification.
|
||||||
|
You also need to set the `VOYAGE_API_KEY` environment variable to use the VoyageAI API.
|
||||||
|
|
||||||
|
Supported models are:
|
||||||
|
|
||||||
|
**Voyage-4 Series (Latest)**
|
||||||
|
|
||||||
|
- voyage-4 (1024 dims, general-purpose and multilingual retrieval, 320K batch tokens)
|
||||||
|
- voyage-4-lite (1024 dims, optimized for latency and cost, 1M batch tokens)
|
||||||
|
- voyage-4-large (1024 dims, best retrieval quality, 120K batch tokens)
|
||||||
|
|
||||||
|
**Voyage-3 Series**
|
||||||
|
|
||||||
|
- voyage-3
|
||||||
|
- voyage-3-lite
|
||||||
|
|
||||||
|
**Domain-Specific Models**
|
||||||
|
|
||||||
|
- voyage-finance-2
|
||||||
|
- voyage-multilingual-2
|
||||||
|
- voyage-law-2
|
||||||
|
- voyage-code-2
|
||||||
|
|
||||||
|
|
||||||
|
Supported parameters (to be passed in `create` method) are:
|
||||||
|
|
||||||
|
| Parameter | Type | Default Value | Description |
|
||||||
|
|---|---|--------|---------|
|
||||||
|
| `name` | `str` | `None` | The model ID of the model to use. Supported base models for Text Embeddings: voyage-4, voyage-4-lite, voyage-4-large, voyage-3, voyage-3-lite, voyage-finance-2, voyage-multilingual-2, voyage-law-2, voyage-code-2 |
|
||||||
|
| `input_type` | `str` | `None` | Type of the input text. Default to None. Other options: query, document. |
|
||||||
|
| `truncation` | `bool` | `True` | Whether to truncate the input texts to fit within the context length. |
|
||||||
|
|
||||||
|
|
||||||
|
Usage Example:
|
||||||
|
|
||||||
|
```python
|
||||||
|
import lancedb
|
||||||
|
from lancedb.pydantic import LanceModel, Vector
|
||||||
|
from lancedb.embeddings import EmbeddingFunctionRegistry
|
||||||
|
|
||||||
|
voyageai = EmbeddingFunctionRegistry
|
||||||
|
.get_instance()
|
||||||
|
.get("voyageai")
|
||||||
|
.create(name="voyage-3")
|
||||||
|
|
||||||
|
class TextModel(LanceModel):
|
||||||
|
text: str = voyageai.SourceField()
|
||||||
|
vector: Vector(voyageai.ndims()) = voyageai.VectorField()
|
||||||
|
|
||||||
|
data = [ { "text": "hello world" },
|
||||||
|
{ "text": "goodbye world" }]
|
||||||
|
|
||||||
|
db = lancedb.connect("~/.lancedb")
|
||||||
|
tbl = db.create_table("test", schema=TextModel, mode="overwrite")
|
||||||
|
|
||||||
|
tbl.add(data)
|
||||||
|
```
|
||||||
+15
-15
@@ -14,7 +14,7 @@ Add the following dependency to your `pom.xml`:
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.lancedb</groupId>
|
<groupId>com.lancedb</groupId>
|
||||||
<artifactId>lancedb-core</artifactId>
|
<artifactId>lancedb-core</artifactId>
|
||||||
<version>0.24.0-beta.0</version>
|
<version>0.30.0-beta.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -57,32 +57,32 @@ LanceNamespace namespaceClient = LanceDbNamespaceClientBuilder.newBuilder()
|
|||||||
|
|
||||||
## Metadata Operations
|
## Metadata Operations
|
||||||
|
|
||||||
### Creating a Namespace
|
### Creating a Namespace Path
|
||||||
|
|
||||||
Namespaces organize tables hierarchically. Create a namespace before creating tables within it:
|
Namespace paths organize tables hierarchically. Create the desired namespace path before creating tables within it:
|
||||||
|
|
||||||
```java
|
```java
|
||||||
import org.lance.namespace.model.CreateNamespaceRequest;
|
import org.lance.namespace.model.CreateNamespaceRequest;
|
||||||
import org.lance.namespace.model.CreateNamespaceResponse;
|
import org.lance.namespace.model.CreateNamespaceResponse;
|
||||||
|
|
||||||
// Create a child namespace
|
// Create a child namespace path
|
||||||
CreateNamespaceRequest request = new CreateNamespaceRequest();
|
CreateNamespaceRequest request = new CreateNamespaceRequest();
|
||||||
request.setId(Arrays.asList("my_namespace"));
|
request.setId(Arrays.asList("my_namespace"));
|
||||||
|
|
||||||
CreateNamespaceResponse response = namespaceClient.createNamespace(request);
|
CreateNamespaceResponse response = namespaceClient.createNamespace(request);
|
||||||
```
|
```
|
||||||
|
|
||||||
You can also create nested namespaces:
|
You can also create nested namespace paths:
|
||||||
|
|
||||||
```java
|
```java
|
||||||
// Create a nested namespace: parent/child
|
// Create a nested namespace path: parent/child
|
||||||
CreateNamespaceRequest request = new CreateNamespaceRequest();
|
CreateNamespaceRequest request = new CreateNamespaceRequest();
|
||||||
request.setId(Arrays.asList("parent_namespace", "child_namespace"));
|
request.setId(Arrays.asList("parent_namespace", "child_namespace"));
|
||||||
|
|
||||||
CreateNamespaceResponse response = namespaceClient.createNamespace(request);
|
CreateNamespaceResponse response = namespaceClient.createNamespace(request);
|
||||||
```
|
```
|
||||||
|
|
||||||
### Describing a Namespace
|
### Describing a Namespace Path
|
||||||
|
|
||||||
```java
|
```java
|
||||||
import org.lance.namespace.model.DescribeNamespaceRequest;
|
import org.lance.namespace.model.DescribeNamespaceRequest;
|
||||||
@@ -95,22 +95,22 @@ DescribeNamespaceResponse response = namespaceClient.describeNamespace(request);
|
|||||||
System.out.println("Namespace properties: " + response.getProperties());
|
System.out.println("Namespace properties: " + response.getProperties());
|
||||||
```
|
```
|
||||||
|
|
||||||
### Listing Namespaces
|
### Listing Namespace Paths
|
||||||
|
|
||||||
```java
|
```java
|
||||||
import org.lance.namespace.model.ListNamespacesRequest;
|
import org.lance.namespace.model.ListNamespacesRequest;
|
||||||
import org.lance.namespace.model.ListNamespacesResponse;
|
import org.lance.namespace.model.ListNamespacesResponse;
|
||||||
|
|
||||||
// List all namespaces at root level
|
// List all namespace paths at the root level
|
||||||
ListNamespacesRequest request = new ListNamespacesRequest();
|
ListNamespacesRequest request = new ListNamespacesRequest();
|
||||||
request.setId(Arrays.asList()); // Empty for root
|
request.setId(Arrays.asList()); // Empty for root
|
||||||
|
|
||||||
ListNamespacesResponse response = namespaceClient.listNamespaces(request);
|
ListNamespacesResponse response = namespaceClient.listNamespaces(request);
|
||||||
for (String ns : response.getNamespaces()) {
|
for (String ns : response.getNamespaces()) {
|
||||||
System.out.println("Namespace: " + ns);
|
System.out.println("Namespace path: " + ns);
|
||||||
}
|
}
|
||||||
|
|
||||||
// List child namespaces under a parent
|
// List child namespace paths under a parent path
|
||||||
ListNamespacesRequest childRequest = new ListNamespacesRequest();
|
ListNamespacesRequest childRequest = new ListNamespacesRequest();
|
||||||
childRequest.setId(Arrays.asList("parent_namespace"));
|
childRequest.setId(Arrays.asList("parent_namespace"));
|
||||||
|
|
||||||
@@ -123,7 +123,7 @@ ListNamespacesResponse childResponse = namespaceClient.listNamespaces(childReque
|
|||||||
import org.lance.namespace.model.ListTablesRequest;
|
import org.lance.namespace.model.ListTablesRequest;
|
||||||
import org.lance.namespace.model.ListTablesResponse;
|
import org.lance.namespace.model.ListTablesResponse;
|
||||||
|
|
||||||
// List tables in a namespace
|
// List tables in a namespace path
|
||||||
ListTablesRequest request = new ListTablesRequest();
|
ListTablesRequest request = new ListTablesRequest();
|
||||||
request.setId(Arrays.asList("my_namespace"));
|
request.setId(Arrays.asList("my_namespace"));
|
||||||
|
|
||||||
@@ -133,7 +133,7 @@ for (String table : response.getTables()) {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
### Dropping a Namespace
|
### Dropping a Namespace Path
|
||||||
|
|
||||||
```java
|
```java
|
||||||
import org.lance.namespace.model.DropNamespaceRequest;
|
import org.lance.namespace.model.DropNamespaceRequest;
|
||||||
@@ -175,7 +175,7 @@ DropTableResponse response = namespaceClient.dropTable(request);
|
|||||||
|
|
||||||
### Creating a Table
|
### Creating a Table
|
||||||
|
|
||||||
Tables are created within a namespace by providing data in Apache Arrow IPC format:
|
Tables are created within a namespace path by providing data in Apache Arrow IPC format:
|
||||||
|
|
||||||
```java
|
```java
|
||||||
import org.lance.namespace.LanceNamespace;
|
import org.lance.namespace.LanceNamespace;
|
||||||
@@ -242,7 +242,7 @@ try (BufferAllocator allocator = new RootAllocator();
|
|||||||
}
|
}
|
||||||
byte[] tableData = out.toByteArray();
|
byte[] tableData = out.toByteArray();
|
||||||
|
|
||||||
// Create table in a namespace
|
// Create a table in a namespace path
|
||||||
CreateTableRequest request = new CreateTableRequest();
|
CreateTableRequest request = new CreateTableRequest();
|
||||||
request.setId(Arrays.asList("my_namespace", "my_table"));
|
request.setId(Arrays.asList("my_namespace", "my_table"));
|
||||||
CreateTableResponse response = namespaceClient.createTable(request, tableData);
|
CreateTableResponse response = namespaceClient.createTable(request, tableData);
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ const results = await table.vectorSearch([0.1, 0.3]).limit(20).toArray();
|
|||||||
console.log(results);
|
console.log(results);
|
||||||
```
|
```
|
||||||
|
|
||||||
The [quickstart](https://lancedb.com/docs/quickstart/basic-usage/) contains more complete examples.
|
The [quickstart](https://docs.lancedb.com/quickstart/) contains more complete examples.
|
||||||
|
|
||||||
## Development
|
## Development
|
||||||
|
|
||||||
|
|||||||
@@ -12,20 +12,22 @@ Typescript.
|
|||||||
* `src/`: Rust bindings source code
|
* `src/`: Rust bindings source code
|
||||||
* `lancedb/`: Typescript package source code
|
* `lancedb/`: Typescript package source code
|
||||||
* `__test__/`: Unit tests
|
* `__test__/`: Unit tests
|
||||||
* `examples/`: An npm package with the examples shown in the documentation
|
* `examples/`: A pnpm package with the examples shown in the documentation
|
||||||
|
|
||||||
## Development environment
|
## Development environment
|
||||||
|
|
||||||
To set up your development environment, you will need to install the following:
|
To set up your development environment, you will need to install the following:
|
||||||
|
|
||||||
1. Node.js 14 or later
|
1. Node.js 22 or later (required by pnpm 11)
|
||||||
2. Rust's package manager, Cargo. Use [rustup](https://rustup.rs/) to install.
|
2. [pnpm](https://pnpm.io/installation) 11 or later (or run via `corepack enable`,
|
||||||
3. [protoc](https://grpc.io/docs/protoc-installation/) (Protocol Buffers compiler)
|
which uses the `packageManager` field in `package.json`)
|
||||||
|
3. Rust's package manager, Cargo. Use [rustup](https://rustup.rs/) to install.
|
||||||
|
4. [protoc](https://grpc.io/docs/protoc-installation/) (Protocol Buffers compiler)
|
||||||
|
|
||||||
Initial setup:
|
Initial setup:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
npm install
|
pnpm install
|
||||||
```
|
```
|
||||||
|
|
||||||
### Commit Hooks
|
### Commit Hooks
|
||||||
@@ -39,38 +41,38 @@ pre-commit install
|
|||||||
|
|
||||||
## Development
|
## Development
|
||||||
|
|
||||||
Most common development commands can be run using the npm scripts.
|
Most common development commands can be run using the pnpm scripts.
|
||||||
|
|
||||||
Build the package
|
Build the package
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
npm install
|
pnpm install
|
||||||
npm run build
|
pnpm build
|
||||||
```
|
```
|
||||||
|
|
||||||
Lint:
|
Lint:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
npm run lint
|
pnpm lint
|
||||||
```
|
```
|
||||||
|
|
||||||
Format and fix lints:
|
Format and fix lints:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
npm run lint-fix
|
pnpm lint-fix
|
||||||
```
|
```
|
||||||
|
|
||||||
Run tests:
|
Run tests:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
npm test
|
pnpm test
|
||||||
```
|
```
|
||||||
|
|
||||||
To run a single test:
|
To run a single test:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
# Single file: table.test.ts
|
# Single file: table.test.ts
|
||||||
npm test -- table.test.ts
|
pnpm test -- table.test.ts
|
||||||
# Single test: 'merge insert' in table.test.ts
|
# Single test: 'merge insert' in table.test.ts
|
||||||
npm test -- table.test.ts --testNamePattern=merge\ insert
|
pnpm test -- table.test.ts --testNamePattern=merge\ insert
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -61,8 +61,8 @@ sharing the same data, deletion, and index files.
|
|||||||
* **options.sourceVersion?**: `number`
|
* **options.sourceVersion?**: `number`
|
||||||
The version of the source table to clone.
|
The version of the source table to clone.
|
||||||
|
|
||||||
* **options.targetNamespace?**: `string`[]
|
* **options.targetNamespacePath?**: `string`[]
|
||||||
The namespace for the target table (defaults to root namespace).
|
The namespace path for the target table (defaults to root namespace).
|
||||||
|
|
||||||
#### Returns
|
#### Returns
|
||||||
|
|
||||||
@@ -116,13 +116,13 @@ Creates a new empty Table
|
|||||||
|
|
||||||
`Promise`<[`Table`](Table.md)>
|
`Promise`<[`Table`](Table.md)>
|
||||||
|
|
||||||
#### createEmptyTable(name, schema, namespace, options)
|
#### createEmptyTable(name, schema, namespacePath, options)
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
abstract createEmptyTable(
|
abstract createEmptyTable(
|
||||||
name,
|
name,
|
||||||
schema,
|
schema,
|
||||||
namespace?,
|
namespacePath?,
|
||||||
options?): Promise<Table>
|
options?): Promise<Table>
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -136,8 +136,8 @@ Creates a new empty Table
|
|||||||
* **schema**: [`SchemaLike`](../type-aliases/SchemaLike.md)
|
* **schema**: [`SchemaLike`](../type-aliases/SchemaLike.md)
|
||||||
The schema of the table
|
The schema of the table
|
||||||
|
|
||||||
* **namespace?**: `string`[]
|
* **namespacePath?**: `string`[]
|
||||||
The namespace to create the table in (defaults to root namespace)
|
The namespace path to create the table in (defaults to root namespace)
|
||||||
|
|
||||||
* **options?**: `Partial`<[`CreateTableOptions`](../interfaces/CreateTableOptions.md)>
|
* **options?**: `Partial`<[`CreateTableOptions`](../interfaces/CreateTableOptions.md)>
|
||||||
Additional options
|
Additional options
|
||||||
@@ -148,12 +148,39 @@ Creates a new empty Table
|
|||||||
|
|
||||||
***
|
***
|
||||||
|
|
||||||
### createTable()
|
### createNamespace()
|
||||||
|
|
||||||
#### createTable(options, namespace)
|
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
abstract createTable(options, namespace?): Promise<Table>
|
abstract createNamespace(namespacePath, options?): Promise<CreateNamespaceResponse>
|
||||||
|
```
|
||||||
|
|
||||||
|
Create a new namespace at the given path.
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
* **namespacePath**: `string`[]
|
||||||
|
The namespace path to create.
|
||||||
|
|
||||||
|
* **options?**: `Partial`<[`CreateNamespaceOptions`](../interfaces/CreateNamespaceOptions.md)>
|
||||||
|
Creation `mode`
|
||||||
|
("create" | "exist_ok" | "overwrite") and optional `properties`
|
||||||
|
to attach to the namespace.
|
||||||
|
|
||||||
|
#### Returns
|
||||||
|
|
||||||
|
`Promise`<[`CreateNamespaceResponse`](../interfaces/CreateNamespaceResponse.md)>
|
||||||
|
|
||||||
|
The properties of the
|
||||||
|
created namespace and an optional transaction id.
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
### createTable()
|
||||||
|
|
||||||
|
#### createTable(options, namespacePath)
|
||||||
|
|
||||||
|
```ts
|
||||||
|
abstract createTable(options, namespacePath?): Promise<Table>
|
||||||
```
|
```
|
||||||
|
|
||||||
Creates a new Table and initialize it with new data.
|
Creates a new Table and initialize it with new data.
|
||||||
@@ -163,8 +190,8 @@ Creates a new Table and initialize it with new data.
|
|||||||
* **options**: `object` & `Partial`<[`CreateTableOptions`](../interfaces/CreateTableOptions.md)>
|
* **options**: `object` & `Partial`<[`CreateTableOptions`](../interfaces/CreateTableOptions.md)>
|
||||||
The options object.
|
The options object.
|
||||||
|
|
||||||
* **namespace?**: `string`[]
|
* **namespacePath?**: `string`[]
|
||||||
The namespace to create the table in (defaults to root namespace)
|
The namespace path to create the table in (defaults to root namespace)
|
||||||
|
|
||||||
##### Returns
|
##### Returns
|
||||||
|
|
||||||
@@ -197,13 +224,13 @@ Creates a new Table and initialize it with new data.
|
|||||||
|
|
||||||
`Promise`<[`Table`](Table.md)>
|
`Promise`<[`Table`](Table.md)>
|
||||||
|
|
||||||
#### createTable(name, data, namespace, options)
|
#### createTable(name, data, namespacePath, options)
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
abstract createTable(
|
abstract createTable(
|
||||||
name,
|
name,
|
||||||
data,
|
data,
|
||||||
namespace?,
|
namespacePath?,
|
||||||
options?): Promise<Table>
|
options?): Promise<Table>
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -218,8 +245,8 @@ Creates a new Table and initialize it with new data.
|
|||||||
Non-empty Array of Records
|
Non-empty Array of Records
|
||||||
to be inserted into the table
|
to be inserted into the table
|
||||||
|
|
||||||
* **namespace?**: `string`[]
|
* **namespacePath?**: `string`[]
|
||||||
The namespace to create the table in (defaults to root namespace)
|
The namespace path to create the table in (defaults to root namespace)
|
||||||
|
|
||||||
* **options?**: `Partial`<[`CreateTableOptions`](../interfaces/CreateTableOptions.md)>
|
* **options?**: `Partial`<[`CreateTableOptions`](../interfaces/CreateTableOptions.md)>
|
||||||
Additional options
|
Additional options
|
||||||
@@ -230,6 +257,29 @@ Creates a new Table and initialize it with new data.
|
|||||||
|
|
||||||
***
|
***
|
||||||
|
|
||||||
|
### describeNamespace()
|
||||||
|
|
||||||
|
```ts
|
||||||
|
abstract describeNamespace(namespacePath): Promise<DescribeNamespaceResponse>
|
||||||
|
```
|
||||||
|
|
||||||
|
Describe a namespace, returning its properties.
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
* **namespacePath**: `string`[]
|
||||||
|
The namespace path to describe, in
|
||||||
|
parent → child order, e.g. `["analytics", "sales"]`.
|
||||||
|
|
||||||
|
#### Returns
|
||||||
|
|
||||||
|
`Promise`<[`DescribeNamespaceResponse`](../interfaces/DescribeNamespaceResponse.md)>
|
||||||
|
|
||||||
|
The namespace's properties
|
||||||
|
(may be undefined if the namespace has none).
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
### display()
|
### display()
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
@@ -247,15 +297,15 @@ Return a brief description of the connection
|
|||||||
### dropAllTables()
|
### dropAllTables()
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
abstract dropAllTables(namespace?): Promise<void>
|
abstract dropAllTables(namespacePath?): Promise<void>
|
||||||
```
|
```
|
||||||
|
|
||||||
Drop all tables in the database.
|
Drop all tables in the database.
|
||||||
|
|
||||||
#### Parameters
|
#### Parameters
|
||||||
|
|
||||||
* **namespace?**: `string`[]
|
* **namespacePath?**: `string`[]
|
||||||
The namespace to drop tables from (defaults to root namespace).
|
The namespace path to drop tables from (defaults to root namespace).
|
||||||
|
|
||||||
#### Returns
|
#### Returns
|
||||||
|
|
||||||
@@ -263,10 +313,40 @@ Drop all tables in the database.
|
|||||||
|
|
||||||
***
|
***
|
||||||
|
|
||||||
|
### dropNamespace()
|
||||||
|
|
||||||
|
```ts
|
||||||
|
abstract dropNamespace(namespacePath, options?): Promise<DropNamespaceResponse>
|
||||||
|
```
|
||||||
|
|
||||||
|
Drop a namespace.
|
||||||
|
|
||||||
|
Use `behavior: "cascade"` to also drop everything contained in the
|
||||||
|
namespace (sub-namespaces and tables). The default `"restrict"`
|
||||||
|
behavior refuses to drop a non-empty namespace.
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
* **namespacePath**: `string`[]
|
||||||
|
The namespace path to drop.
|
||||||
|
|
||||||
|
* **options?**: `Partial`<[`DropNamespaceOptions`](../interfaces/DropNamespaceOptions.md)>
|
||||||
|
`mode` ("skip" | "fail"
|
||||||
|
for missing-namespace handling) and `behavior` ("restrict" | "cascade").
|
||||||
|
|
||||||
|
#### Returns
|
||||||
|
|
||||||
|
`Promise`<[`DropNamespaceResponse`](../interfaces/DropNamespaceResponse.md)>
|
||||||
|
|
||||||
|
Any properties returned by
|
||||||
|
the server and an optional transaction id.
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
### dropTable()
|
### dropTable()
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
abstract dropTable(name, namespace?): Promise<void>
|
abstract dropTable(name, namespacePath?): Promise<void>
|
||||||
```
|
```
|
||||||
|
|
||||||
Drop an existing table.
|
Drop an existing table.
|
||||||
@@ -276,8 +356,8 @@ Drop an existing table.
|
|||||||
* **name**: `string`
|
* **name**: `string`
|
||||||
The name of the table to drop.
|
The name of the table to drop.
|
||||||
|
|
||||||
* **namespace?**: `string`[]
|
* **namespacePath?**: `string`[]
|
||||||
The namespace of the table (defaults to root namespace).
|
The namespace path of the table (defaults to root namespace).
|
||||||
|
|
||||||
#### Returns
|
#### Returns
|
||||||
|
|
||||||
@@ -299,12 +379,42 @@ Return true if the connection has not been closed
|
|||||||
|
|
||||||
***
|
***
|
||||||
|
|
||||||
|
### listNamespaces()
|
||||||
|
|
||||||
|
```ts
|
||||||
|
abstract listNamespaces(namespacePath?, options?): Promise<ListNamespacesResponse>
|
||||||
|
```
|
||||||
|
|
||||||
|
List the immediate child namespaces under the given parent.
|
||||||
|
|
||||||
|
Results may be paginated. To retrieve subsequent pages, pass the
|
||||||
|
`pageToken` returned by a previous call.
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
* **namespacePath?**: `string`[]
|
||||||
|
The parent namespace path. Defaults
|
||||||
|
to the root namespace if omitted.
|
||||||
|
|
||||||
|
* **options?**: `Partial`<[`ListNamespacesOptions`](../interfaces/ListNamespacesOptions.md)>
|
||||||
|
Pagination options
|
||||||
|
(`pageToken`, `limit`).
|
||||||
|
|
||||||
|
#### Returns
|
||||||
|
|
||||||
|
`Promise`<[`ListNamespacesResponse`](../interfaces/ListNamespacesResponse.md)>
|
||||||
|
|
||||||
|
Child namespace names and
|
||||||
|
an optional token for fetching the next page.
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
### openTable()
|
### openTable()
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
abstract openTable(
|
abstract openTable(
|
||||||
name,
|
name,
|
||||||
namespace?,
|
namespacePath?,
|
||||||
options?): Promise<Table>
|
options?): Promise<Table>
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -315,8 +425,8 @@ Open a table in the database.
|
|||||||
* **name**: `string`
|
* **name**: `string`
|
||||||
The name of the table
|
The name of the table
|
||||||
|
|
||||||
* **namespace?**: `string`[]
|
* **namespacePath?**: `string`[]
|
||||||
The namespace of the table (defaults to root namespace)
|
The namespace path of the table (defaults to root namespace)
|
||||||
|
|
||||||
* **options?**: `Partial`<[`OpenTableOptions`](../interfaces/OpenTableOptions.md)>
|
* **options?**: `Partial`<[`OpenTableOptions`](../interfaces/OpenTableOptions.md)>
|
||||||
Additional options
|
Additional options
|
||||||
@@ -327,6 +437,39 @@ Open a table in the database.
|
|||||||
|
|
||||||
***
|
***
|
||||||
|
|
||||||
|
### renameTable()
|
||||||
|
|
||||||
|
```ts
|
||||||
|
abstract renameTable(
|
||||||
|
currentName,
|
||||||
|
newName,
|
||||||
|
options?): Promise<void>
|
||||||
|
```
|
||||||
|
|
||||||
|
Rename a table.
|
||||||
|
|
||||||
|
Currently only supported by LanceDB Cloud. Local OSS connections and
|
||||||
|
namespace-backed connections (via [connectNamespace](../functions/connectNamespace.md)) reject with
|
||||||
|
a "not supported" error.
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
* **currentName**: `string`
|
||||||
|
The current name of the table.
|
||||||
|
|
||||||
|
* **newName**: `string`
|
||||||
|
The new name for the table.
|
||||||
|
|
||||||
|
* **options?**: [`RenameTableOptions`](../interfaces/RenameTableOptions.md)
|
||||||
|
Optional namespace paths. When
|
||||||
|
`newNamespacePath` is omitted the table stays in `namespacePath`.
|
||||||
|
|
||||||
|
#### Returns
|
||||||
|
|
||||||
|
`Promise`<`void`>
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
### tableNames()
|
### tableNames()
|
||||||
|
|
||||||
#### tableNames(options)
|
#### tableNames(options)
|
||||||
@@ -349,10 +492,10 @@ Tables will be returned in lexicographical order.
|
|||||||
|
|
||||||
`Promise`<`string`[]>
|
`Promise`<`string`[]>
|
||||||
|
|
||||||
#### tableNames(namespace, options)
|
#### tableNames(namespacePath, options)
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
abstract tableNames(namespace?, options?): Promise<string[]>
|
abstract tableNames(namespacePath?, options?): Promise<string[]>
|
||||||
```
|
```
|
||||||
|
|
||||||
List all the table names in this database.
|
List all the table names in this database.
|
||||||
@@ -361,8 +504,8 @@ Tables will be returned in lexicographical order.
|
|||||||
|
|
||||||
##### Parameters
|
##### Parameters
|
||||||
|
|
||||||
* **namespace?**: `string`[]
|
* **namespacePath?**: `string`[]
|
||||||
The namespace to list tables from (defaults to root namespace)
|
The namespace path to list tables from (defaults to root namespace)
|
||||||
|
|
||||||
* **options?**: `Partial`<[`TableNamesOptions`](../interfaces/TableNamesOptions.md)>
|
* **options?**: `Partial`<[`TableNamesOptions`](../interfaces/TableNamesOptions.md)>
|
||||||
options to control the
|
options to control the
|
||||||
|
|||||||
@@ -343,6 +343,30 @@ This is useful for pagination.
|
|||||||
|
|
||||||
***
|
***
|
||||||
|
|
||||||
|
### orderBy()
|
||||||
|
|
||||||
|
```ts
|
||||||
|
orderBy(ordering): this
|
||||||
|
```
|
||||||
|
|
||||||
|
Sort the results by the specified column(s).
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
* **ordering**: [`ColumnOrdering`](../interfaces/ColumnOrdering.md) \| [`ColumnOrdering`](../interfaces/ColumnOrdering.md)[]
|
||||||
|
|
||||||
|
#### Returns
|
||||||
|
|
||||||
|
`this`
|
||||||
|
|
||||||
|
This query builder.
|
||||||
|
|
||||||
|
#### Inherited from
|
||||||
|
|
||||||
|
`StandardQueryBase.orderBy`
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
### outputSchema()
|
### outputSchema()
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
|
|||||||
@@ -0,0 +1,173 @@
|
|||||||
|
[**@lancedb/lancedb**](../README.md) • **Docs**
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
[@lancedb/lancedb](../globals.md) / Scannable
|
||||||
|
|
||||||
|
# Class: Scannable
|
||||||
|
|
||||||
|
A data source that can be scanned as a stream of Arrow `RecordBatch`es.
|
||||||
|
|
||||||
|
`Scannable` wraps the schema + optional row count + rescannable flag and
|
||||||
|
a callback that yields batches one at a time. It is passed to consumers
|
||||||
|
(e.g. `Table.add`, `createTable`, `mergeInsert` — follow-up work) that
|
||||||
|
need to pull data without materializing the full dataset in JS memory.
|
||||||
|
|
||||||
|
Batches cross the JS↔Rust boundary as Arrow IPC Stream messages; a fresh
|
||||||
|
writer serializes each batch, and the Rust side decodes it with
|
||||||
|
`arrow_ipc::reader::StreamReader`. One batch is in flight at a time.
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
### numRows
|
||||||
|
|
||||||
|
```ts
|
||||||
|
readonly numRows: null | number;
|
||||||
|
```
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
### rescannable
|
||||||
|
|
||||||
|
```ts
|
||||||
|
readonly rescannable: boolean;
|
||||||
|
```
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
### schema
|
||||||
|
|
||||||
|
```ts
|
||||||
|
readonly schema: Schema<any>;
|
||||||
|
```
|
||||||
|
|
||||||
|
## Methods
|
||||||
|
|
||||||
|
### fromFactory()
|
||||||
|
|
||||||
|
```ts
|
||||||
|
static fromFactory(
|
||||||
|
schema,
|
||||||
|
factory,
|
||||||
|
opts): Promise<Scannable>
|
||||||
|
```
|
||||||
|
|
||||||
|
Build a Scannable from an explicit schema and a factory that returns a
|
||||||
|
fresh batch iterator on each call.
|
||||||
|
|
||||||
|
The factory is invoked once per scan. Each iterator yields
|
||||||
|
`RecordBatch`es matching the declared schema. Use this when you need
|
||||||
|
direct control over the pull loop — for example, to wrap a streaming
|
||||||
|
source whose batches are produced lazily.
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
* **schema**: `Schema`<`any`>
|
||||||
|
The Arrow schema of the produced batches.
|
||||||
|
|
||||||
|
* **factory**
|
||||||
|
Called at the start of each scan to produce a batch
|
||||||
|
iterator. Must be idempotent when `rescannable` is true.
|
||||||
|
|
||||||
|
* **opts**: [`ScannableOptions`](../interfaces/ScannableOptions.md) = `{}`
|
||||||
|
Optional hints. `rescannable` defaults to `true`; set to
|
||||||
|
`false` if calling `factory()` twice would not reproduce the same data.
|
||||||
|
|
||||||
|
#### Returns
|
||||||
|
|
||||||
|
`Promise`<[`Scannable`](Scannable.md)>
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
### fromIterable()
|
||||||
|
|
||||||
|
```ts
|
||||||
|
static fromIterable(
|
||||||
|
schema,
|
||||||
|
iter,
|
||||||
|
opts): Promise<Scannable>
|
||||||
|
```
|
||||||
|
|
||||||
|
Build a Scannable from an iterable of `RecordBatch`es. `rescannable`
|
||||||
|
defaults to `false`. Pass an explicit schema so the consumer can
|
||||||
|
validate before any batch is pulled.
|
||||||
|
|
||||||
|
`opts.rescannable: true` is honest for replayable iterables (Arrays,
|
||||||
|
Sets, or custom iterables whose `[Symbol.iterator]()` returns a fresh
|
||||||
|
iterator each call). It is rejected for one-shot iterables (generators,
|
||||||
|
async generators, or already-an-iterator inputs) because their
|
||||||
|
`[Symbol.iterator]()` returns the same exhausted object on the second
|
||||||
|
scan. For replayable sources outside this shape, use
|
||||||
|
`fromFactory(schema, () => createIter(), { rescannable: true })`.
|
||||||
|
|
||||||
|
Note: when `opts.rescannable` is `true`, the constructor calls
|
||||||
|
`[Symbol.iterator]()` once on the input to perform the structural check.
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
* **schema**: `Schema`<`any`>
|
||||||
|
|
||||||
|
* **iter**: `Iterable`<`RecordBatch`<`any`>> \| `AsyncIterable`<`RecordBatch`<`any`>>
|
||||||
|
|
||||||
|
* **opts**: [`ScannableOptions`](../interfaces/ScannableOptions.md) = `{}`
|
||||||
|
|
||||||
|
#### Returns
|
||||||
|
|
||||||
|
`Promise`<[`Scannable`](Scannable.md)>
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
### fromRecordBatchReader()
|
||||||
|
|
||||||
|
```ts
|
||||||
|
static fromRecordBatchReader(reader, opts): Promise<Scannable>
|
||||||
|
```
|
||||||
|
|
||||||
|
Build a Scannable from an Arrow `RecordBatchReader`. A reader can only
|
||||||
|
be consumed once; `rescannable` defaults to `false`.
|
||||||
|
|
||||||
|
The reader must already be opened (via `.open()`) so its `.schema` is
|
||||||
|
populated. `RecordBatchReader.from(...)` returns an unopened reader.
|
||||||
|
|
||||||
|
`opts.rescannable: true` is rejected because `RecordBatchReader` is a
|
||||||
|
self-iterator (its `[Symbol.iterator]()` returns itself), and this
|
||||||
|
constructor does not call `reader.reset()` between scans, so a second
|
||||||
|
scan would always see an exhausted reader. For genuinely replayable
|
||||||
|
sources, use
|
||||||
|
`fromFactory(schema, () => openReader(), { rescannable: true })`,
|
||||||
|
which mints a fresh reader on each scan.
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
* **reader**: `RecordBatchReader`<`any`>
|
||||||
|
|
||||||
|
* **opts**: [`ScannableOptions`](../interfaces/ScannableOptions.md) = `{}`
|
||||||
|
|
||||||
|
#### Returns
|
||||||
|
|
||||||
|
`Promise`<[`Scannable`](Scannable.md)>
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
### fromTable()
|
||||||
|
|
||||||
|
```ts
|
||||||
|
static fromTable(table, opts): Promise<Scannable>
|
||||||
|
```
|
||||||
|
|
||||||
|
Build a Scannable from an in-memory Arrow `Table`. Always rescannable;
|
||||||
|
the table's batches are replayed on each scan.
|
||||||
|
|
||||||
|
The table's row count is authoritative: `opts.numRows` must either be
|
||||||
|
omitted or equal to `table.numRows`. `opts.rescannable` of `false` is
|
||||||
|
rejected because in-memory Tables are always rescannable.
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
* **table**: `Table`<`any`>
|
||||||
|
|
||||||
|
* **opts**: [`ScannableOptions`](../interfaces/ScannableOptions.md) = `{}`
|
||||||
|
|
||||||
|
#### Returns
|
||||||
|
|
||||||
|
`Promise`<[`Scannable`](Scannable.md)>
|
||||||
+167
-19
@@ -71,11 +71,12 @@ Add new columns with defined values.
|
|||||||
|
|
||||||
#### Parameters
|
#### Parameters
|
||||||
|
|
||||||
* **newColumnTransforms**: [`AddColumnsSql`](../interfaces/AddColumnsSql.md)[]
|
* **newColumnTransforms**: `Field`<`any`> \| `Field`<`any`>[] \| `Schema`<`any`> \| [`AddColumnsSql`](../interfaces/AddColumnsSql.md)[]
|
||||||
pairs of column names and
|
Either:
|
||||||
the SQL expression to use to calculate the value of the new column. These
|
- An array of objects with column names and SQL expressions to calculate values
|
||||||
expressions will be evaluated for each row in the table, and can
|
- A single Arrow Field defining one column with its data type (column will be initialized with null values)
|
||||||
reference existing columns in the table.
|
- An array of Arrow Fields defining columns with their data types (columns will be initialized with null values)
|
||||||
|
- An Arrow Schema defining columns with their data types (columns will be initialized with null values)
|
||||||
|
|
||||||
#### Returns
|
#### Returns
|
||||||
|
|
||||||
@@ -367,6 +368,27 @@ Use [Table.listIndices](Table.md#listindices) to find the names of the indices.
|
|||||||
|
|
||||||
***
|
***
|
||||||
|
|
||||||
|
### initialStorageOptions()
|
||||||
|
|
||||||
|
```ts
|
||||||
|
abstract initialStorageOptions(): Promise<undefined | null | Record<string, string>>
|
||||||
|
```
|
||||||
|
|
||||||
|
Get the initial storage options that were passed in when opening this table.
|
||||||
|
|
||||||
|
For dynamically refreshed options (e.g., credential vending), use
|
||||||
|
[Table.latestStorageOptions](Table.md#lateststorageoptions).
|
||||||
|
|
||||||
|
Warning: This is an internal API and the return value is subject to change.
|
||||||
|
|
||||||
|
#### Returns
|
||||||
|
|
||||||
|
`Promise`<`undefined` \| `null` \| `Record`<`string`, `string`>>
|
||||||
|
|
||||||
|
The storage options, or undefined if no storage options were configured.
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
### isOpen()
|
### isOpen()
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
@@ -381,6 +403,28 @@ Return true if the table has not been closed
|
|||||||
|
|
||||||
***
|
***
|
||||||
|
|
||||||
|
### latestStorageOptions()
|
||||||
|
|
||||||
|
```ts
|
||||||
|
abstract latestStorageOptions(): Promise<undefined | null | Record<string, string>>
|
||||||
|
```
|
||||||
|
|
||||||
|
Get the latest storage options, refreshing from provider if configured.
|
||||||
|
|
||||||
|
This method is useful for credential vending scenarios where storage options
|
||||||
|
may be refreshed dynamically. If no dynamic provider is configured, this
|
||||||
|
returns the initial static options.
|
||||||
|
|
||||||
|
Warning: This is an internal API and the return value is subject to change.
|
||||||
|
|
||||||
|
#### Returns
|
||||||
|
|
||||||
|
`Promise`<`undefined` \| `null` \| `Record`<`string`, `string`>>
|
||||||
|
|
||||||
|
The storage options, or undefined if no storage options were configured.
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
### listIndices()
|
### listIndices()
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
@@ -441,19 +485,7 @@ Modeled after ``VACUUM`` in PostgreSQL.
|
|||||||
- Prune: Removes old versions of the dataset
|
- Prune: Removes old versions of the dataset
|
||||||
- Index: Optimizes the indices, adding new data to existing indices
|
- Index: Optimizes the indices, adding new data to existing indices
|
||||||
|
|
||||||
Experimental API
|
The frequency an application should call optimize is based on the frequency of
|
||||||
----------------
|
|
||||||
|
|
||||||
The optimization process is undergoing active development and may change.
|
|
||||||
Our goal with these changes is to improve the performance of optimization and
|
|
||||||
reduce the complexity.
|
|
||||||
|
|
||||||
That being said, it is essential today to run optimize if you want the best
|
|
||||||
performance. It should be stable and safe to use in production, but it our
|
|
||||||
hope that the API may be simplified (or not even need to be called) in the
|
|
||||||
future.
|
|
||||||
|
|
||||||
The frequency an application shoudl call optimize is based on the frequency of
|
|
||||||
data modifications. If data is frequently added, deleted, or updated then
|
data modifications. If data is frequently added, deleted, or updated then
|
||||||
optimize should be run frequently. A good rule of thumb is to run optimize if
|
optimize should be run frequently. A good rule of thumb is to run optimize if
|
||||||
you have added or modified 100,000 or more records or run more than 20 data
|
you have added or modified 100,000 or more records or run more than 20 data
|
||||||
@@ -469,6 +501,34 @@ Modeled after ``VACUUM`` in PostgreSQL.
|
|||||||
|
|
||||||
***
|
***
|
||||||
|
|
||||||
|
### prewarmData()
|
||||||
|
|
||||||
|
```ts
|
||||||
|
abstract prewarmData(columns?): Promise<void>
|
||||||
|
```
|
||||||
|
|
||||||
|
Prewarm one or more columns of data in the table.
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
* **columns?**: `string`[]
|
||||||
|
The columns to prewarm. If undefined, all columns are prewarmed.
|
||||||
|
This will load the column data into the page cache so that future queries that
|
||||||
|
read those columns avoid the initial cold-start latency. This call initiates
|
||||||
|
prewarming and returns once the request is accepted; the warming itself may
|
||||||
|
continue in the background. Calling it on already-prewarmed columns is a
|
||||||
|
no-op on the server.
|
||||||
|
Prewarming is generally useful for columns used in filters or projections.
|
||||||
|
Large columns (e.g. high-dimensional vectors or binary data) may not be
|
||||||
|
practical to prewarm.
|
||||||
|
This feature is currently only supported on remote tables.
|
||||||
|
|
||||||
|
#### Returns
|
||||||
|
|
||||||
|
`Promise`<`void`>
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
### prewarmIndex()
|
### prewarmIndex()
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
@@ -630,6 +690,74 @@ of the given query
|
|||||||
|
|
||||||
***
|
***
|
||||||
|
|
||||||
|
### setLsmWriteSpec()
|
||||||
|
|
||||||
|
```ts
|
||||||
|
abstract setLsmWriteSpec(spec): Promise<void>
|
||||||
|
```
|
||||||
|
|
||||||
|
Install an [LsmWriteSpec](../interfaces/LsmWriteSpec.md) on this table, selecting Lance's MemWAL
|
||||||
|
LSM-style write path for future `mergeInsert` calls.
|
||||||
|
|
||||||
|
`LsmWriteSpec` chooses one of three sharding strategies via `specType`:
|
||||||
|
|
||||||
|
- `"bucket"` — hash-bucket writes by the single-column unenforced primary
|
||||||
|
key (`column` and `numBuckets` required).
|
||||||
|
- `"identity"` — shard by the raw value of a scalar `column`.
|
||||||
|
- `"unsharded"` — route every write to a single shard.
|
||||||
|
|
||||||
|
All variants require the table to have an unenforced primary key
|
||||||
|
([Table#setUnenforcedPrimaryKey](Table.md#setunenforcedprimarykey)); bucket sharding additionally
|
||||||
|
requires it to be the single column being bucketed.
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
* **spec**: [`LsmWriteSpec`](../interfaces/LsmWriteSpec.md)
|
||||||
|
The sharding spec to install.
|
||||||
|
|
||||||
|
#### Returns
|
||||||
|
|
||||||
|
`Promise`<`void`>
|
||||||
|
|
||||||
|
#### Example
|
||||||
|
|
||||||
|
```ts
|
||||||
|
await table.setUnenforcedPrimaryKey("id");
|
||||||
|
await table.setLsmWriteSpec({
|
||||||
|
specType: "bucket",
|
||||||
|
column: "id",
|
||||||
|
numBuckets: 16,
|
||||||
|
maintainedIndexes: ["id_idx"],
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
### setUnenforcedPrimaryKey()
|
||||||
|
|
||||||
|
```ts
|
||||||
|
abstract setUnenforcedPrimaryKey(columns): Promise<void>
|
||||||
|
```
|
||||||
|
|
||||||
|
Set the unenforced primary key for this table to a single column.
|
||||||
|
|
||||||
|
"Unenforced" means LanceDB does not check uniqueness on writes; the
|
||||||
|
column is recorded in the schema as the primary key for use by features
|
||||||
|
such as `merge_insert`. Only single-column primary keys are supported,
|
||||||
|
and the key cannot be changed once set.
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
* **columns**: `string` \| `string`[]
|
||||||
|
The primary key column. A one-element
|
||||||
|
array is also accepted; passing more than one column is rejected.
|
||||||
|
|
||||||
|
#### Returns
|
||||||
|
|
||||||
|
`Promise`<`void`>
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
### stats()
|
### stats()
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
@@ -705,8 +833,11 @@ Create a query that returns a subset of the rows in the table.
|
|||||||
|
|
||||||
#### Parameters
|
#### Parameters
|
||||||
|
|
||||||
* **rowIds**: `number`[]
|
* **rowIds**: readonly (`number` \| `bigint`)[]
|
||||||
The row ids of the rows to return.
|
The row ids of the rows to return.
|
||||||
|
Row ids returned by `withRowId()` are `bigint`, so `bigint[]` is supported.
|
||||||
|
For convenience / backwards compatibility, `number[]` is also accepted (for
|
||||||
|
small row ids that fit in a safe integer).
|
||||||
|
|
||||||
#### Returns
|
#### Returns
|
||||||
|
|
||||||
@@ -730,6 +861,23 @@ Return the table as an arrow table
|
|||||||
|
|
||||||
***
|
***
|
||||||
|
|
||||||
|
### unsetLsmWriteSpec()
|
||||||
|
|
||||||
|
```ts
|
||||||
|
abstract unsetLsmWriteSpec(): Promise<void>
|
||||||
|
```
|
||||||
|
|
||||||
|
Remove the [LsmWriteSpec](../interfaces/LsmWriteSpec.md) from this table, reverting to the standard
|
||||||
|
`mergeInsert` write path.
|
||||||
|
|
||||||
|
Errors if no spec is currently set.
|
||||||
|
|
||||||
|
#### Returns
|
||||||
|
|
||||||
|
`Promise`<`void`>
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
### update()
|
### update()
|
||||||
|
|
||||||
#### update(opts)
|
#### update(opts)
|
||||||
|
|||||||
@@ -498,6 +498,30 @@ This is useful for pagination.
|
|||||||
|
|
||||||
***
|
***
|
||||||
|
|
||||||
|
### orderBy()
|
||||||
|
|
||||||
|
```ts
|
||||||
|
orderBy(ordering): this
|
||||||
|
```
|
||||||
|
|
||||||
|
Sort the results by the specified column(s).
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
* **ordering**: [`ColumnOrdering`](../interfaces/ColumnOrdering.md) \| [`ColumnOrdering`](../interfaces/ColumnOrdering.md)[]
|
||||||
|
|
||||||
|
#### Returns
|
||||||
|
|
||||||
|
`this`
|
||||||
|
|
||||||
|
This query builder.
|
||||||
|
|
||||||
|
#### Inherited from
|
||||||
|
|
||||||
|
`StandardQueryBase.orderBy`
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
### outputSchema()
|
### outputSchema()
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
|
|||||||
@@ -0,0 +1,131 @@
|
|||||||
|
[**@lancedb/lancedb**](../README.md) • **Docs**
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
[@lancedb/lancedb](../globals.md) / connectNamespace
|
||||||
|
|
||||||
|
# Function: connectNamespace()
|
||||||
|
|
||||||
|
## connectNamespace(implName, config, options)
|
||||||
|
|
||||||
|
```ts
|
||||||
|
function connectNamespace(
|
||||||
|
implName,
|
||||||
|
config,
|
||||||
|
options?): Promise<Connection>
|
||||||
|
```
|
||||||
|
|
||||||
|
Connect to a LanceDB database through a namespace.
|
||||||
|
|
||||||
|
Unlike [connect](connect.md), which routes by URI scheme (local path vs.
|
||||||
|
`db://` cloud), `connectNamespace` always returns a namespace-backed
|
||||||
|
connection. The `implName` selects the namespace implementation:
|
||||||
|
|
||||||
|
- `"dir"` — directory namespace, configured with [DirNamespaceConfig](../interfaces/DirNamespaceConfig.md).
|
||||||
|
- `"rest"` — remote REST catalog, configured with [RestNamespaceConfig](../interfaces/RestNamespaceConfig.md).
|
||||||
|
- Any other string — full module path for a custom implementation,
|
||||||
|
configured with a free-form string-keyed `properties` map.
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
* **implName**: `"dir"`
|
||||||
|
|
||||||
|
* **config**: [`DirNamespaceConfig`](../interfaces/DirNamespaceConfig.md)
|
||||||
|
|
||||||
|
* **options?**: `Partial`<[`ConnectNamespaceOptions`](../interfaces/ConnectNamespaceOptions.md)>
|
||||||
|
|
||||||
|
### Returns
|
||||||
|
|
||||||
|
`Promise`<[`Connection`](../classes/Connection.md)>
|
||||||
|
|
||||||
|
### Examples
|
||||||
|
|
||||||
|
```ts
|
||||||
|
const db = await connectNamespace("dir", { root: "/path/to/db" });
|
||||||
|
await db.createTable("users", [{ id: 1 }]);
|
||||||
|
```
|
||||||
|
|
||||||
|
```ts
|
||||||
|
const db = await connectNamespace("rest", {
|
||||||
|
uri: "https://catalog.example.com",
|
||||||
|
headers: { "x-api-key": process.env.CATALOG_KEY ?? "" },
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
```ts
|
||||||
|
const db = await connectNamespace("my.custom.Namespace", {
|
||||||
|
endpoint: "...",
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
## connectNamespace(implName, config, options)
|
||||||
|
|
||||||
|
```ts
|
||||||
|
function connectNamespace(
|
||||||
|
implName,
|
||||||
|
config,
|
||||||
|
options?): Promise<Connection>
|
||||||
|
```
|
||||||
|
|
||||||
|
Connect through the built-in REST namespace.
|
||||||
|
|
||||||
|
Configured with [RestNamespaceConfig](../interfaces/RestNamespaceConfig.md). See the function-level
|
||||||
|
documentation above for the full surface, examples, and how this
|
||||||
|
relates to [connect](connect.md).
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
* **implName**: `"rest"`
|
||||||
|
|
||||||
|
* **config**: [`RestNamespaceConfig`](../interfaces/RestNamespaceConfig.md)
|
||||||
|
|
||||||
|
* **options?**: `Partial`<[`ConnectNamespaceOptions`](../interfaces/ConnectNamespaceOptions.md)>
|
||||||
|
|
||||||
|
### Returns
|
||||||
|
|
||||||
|
`Promise`<[`Connection`](../classes/Connection.md)>
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```ts
|
||||||
|
const db = await connectNamespace("rest", {
|
||||||
|
uri: "https://catalog.example.com",
|
||||||
|
headers: { "x-api-key": process.env.CATALOG_KEY ?? "" },
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
## connectNamespace(implName, properties, options)
|
||||||
|
|
||||||
|
```ts
|
||||||
|
function connectNamespace(
|
||||||
|
implName,
|
||||||
|
properties,
|
||||||
|
options?): Promise<Connection>
|
||||||
|
```
|
||||||
|
|
||||||
|
Connect through a custom namespace implementation by full module path,
|
||||||
|
configured with a free-form string-keyed `properties` map. Use the
|
||||||
|
typed overloads above for the built-in `"dir"` and `"rest"` impls.
|
||||||
|
|
||||||
|
See the function-level documentation above for examples and how this
|
||||||
|
relates to [connect](connect.md).
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
* **implName**: `string`
|
||||||
|
|
||||||
|
* **properties**: `Record`<`string`, `string`>
|
||||||
|
|
||||||
|
* **options?**: `Partial`<[`ConnectNamespaceOptions`](../interfaces/ConnectNamespaceOptions.md)>
|
||||||
|
|
||||||
|
### Returns
|
||||||
|
|
||||||
|
`Promise`<[`Connection`](../classes/Connection.md)>
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```ts
|
||||||
|
const db = await connectNamespace("my.custom.Namespace", {
|
||||||
|
endpoint: "...",
|
||||||
|
});
|
||||||
|
```
|
||||||
@@ -32,6 +32,7 @@
|
|||||||
- [PhraseQuery](classes/PhraseQuery.md)
|
- [PhraseQuery](classes/PhraseQuery.md)
|
||||||
- [Query](classes/Query.md)
|
- [Query](classes/Query.md)
|
||||||
- [QueryBase](classes/QueryBase.md)
|
- [QueryBase](classes/QueryBase.md)
|
||||||
|
- [Scannable](classes/Scannable.md)
|
||||||
- [Session](classes/Session.md)
|
- [Session](classes/Session.md)
|
||||||
- [StaticHeaderProvider](classes/StaticHeaderProvider.md)
|
- [StaticHeaderProvider](classes/StaticHeaderProvider.md)
|
||||||
- [Table](classes/Table.md)
|
- [Table](classes/Table.md)
|
||||||
@@ -50,11 +51,19 @@
|
|||||||
- [AlterColumnsResult](interfaces/AlterColumnsResult.md)
|
- [AlterColumnsResult](interfaces/AlterColumnsResult.md)
|
||||||
- [ClientConfig](interfaces/ClientConfig.md)
|
- [ClientConfig](interfaces/ClientConfig.md)
|
||||||
- [ColumnAlteration](interfaces/ColumnAlteration.md)
|
- [ColumnAlteration](interfaces/ColumnAlteration.md)
|
||||||
|
- [ColumnOrdering](interfaces/ColumnOrdering.md)
|
||||||
- [CompactionStats](interfaces/CompactionStats.md)
|
- [CompactionStats](interfaces/CompactionStats.md)
|
||||||
|
- [ConnectNamespaceOptions](interfaces/ConnectNamespaceOptions.md)
|
||||||
- [ConnectionOptions](interfaces/ConnectionOptions.md)
|
- [ConnectionOptions](interfaces/ConnectionOptions.md)
|
||||||
|
- [CreateNamespaceOptions](interfaces/CreateNamespaceOptions.md)
|
||||||
|
- [CreateNamespaceResponse](interfaces/CreateNamespaceResponse.md)
|
||||||
- [CreateTableOptions](interfaces/CreateTableOptions.md)
|
- [CreateTableOptions](interfaces/CreateTableOptions.md)
|
||||||
- [DeleteResult](interfaces/DeleteResult.md)
|
- [DeleteResult](interfaces/DeleteResult.md)
|
||||||
|
- [DescribeNamespaceResponse](interfaces/DescribeNamespaceResponse.md)
|
||||||
|
- [DirNamespaceConfig](interfaces/DirNamespaceConfig.md)
|
||||||
- [DropColumnsResult](interfaces/DropColumnsResult.md)
|
- [DropColumnsResult](interfaces/DropColumnsResult.md)
|
||||||
|
- [DropNamespaceOptions](interfaces/DropNamespaceOptions.md)
|
||||||
|
- [DropNamespaceResponse](interfaces/DropNamespaceResponse.md)
|
||||||
- [ExecutableQuery](interfaces/ExecutableQuery.md)
|
- [ExecutableQuery](interfaces/ExecutableQuery.md)
|
||||||
- [FragmentStatistics](interfaces/FragmentStatistics.md)
|
- [FragmentStatistics](interfaces/FragmentStatistics.md)
|
||||||
- [FragmentSummaryStats](interfaces/FragmentSummaryStats.md)
|
- [FragmentSummaryStats](interfaces/FragmentSummaryStats.md)
|
||||||
@@ -69,13 +78,19 @@
|
|||||||
- [IvfFlatOptions](interfaces/IvfFlatOptions.md)
|
- [IvfFlatOptions](interfaces/IvfFlatOptions.md)
|
||||||
- [IvfPqOptions](interfaces/IvfPqOptions.md)
|
- [IvfPqOptions](interfaces/IvfPqOptions.md)
|
||||||
- [IvfRqOptions](interfaces/IvfRqOptions.md)
|
- [IvfRqOptions](interfaces/IvfRqOptions.md)
|
||||||
|
- [ListNamespacesOptions](interfaces/ListNamespacesOptions.md)
|
||||||
|
- [ListNamespacesResponse](interfaces/ListNamespacesResponse.md)
|
||||||
|
- [LsmWriteSpec](interfaces/LsmWriteSpec.md)
|
||||||
- [MergeResult](interfaces/MergeResult.md)
|
- [MergeResult](interfaces/MergeResult.md)
|
||||||
- [OpenTableOptions](interfaces/OpenTableOptions.md)
|
- [OpenTableOptions](interfaces/OpenTableOptions.md)
|
||||||
- [OptimizeOptions](interfaces/OptimizeOptions.md)
|
- [OptimizeOptions](interfaces/OptimizeOptions.md)
|
||||||
- [OptimizeStats](interfaces/OptimizeStats.md)
|
- [OptimizeStats](interfaces/OptimizeStats.md)
|
||||||
- [QueryExecutionOptions](interfaces/QueryExecutionOptions.md)
|
- [QueryExecutionOptions](interfaces/QueryExecutionOptions.md)
|
||||||
- [RemovalStats](interfaces/RemovalStats.md)
|
- [RemovalStats](interfaces/RemovalStats.md)
|
||||||
|
- [RenameTableOptions](interfaces/RenameTableOptions.md)
|
||||||
|
- [RestNamespaceConfig](interfaces/RestNamespaceConfig.md)
|
||||||
- [RetryConfig](interfaces/RetryConfig.md)
|
- [RetryConfig](interfaces/RetryConfig.md)
|
||||||
|
- [ScannableOptions](interfaces/ScannableOptions.md)
|
||||||
- [ShuffleOptions](interfaces/ShuffleOptions.md)
|
- [ShuffleOptions](interfaces/ShuffleOptions.md)
|
||||||
- [SplitCalculatedOptions](interfaces/SplitCalculatedOptions.md)
|
- [SplitCalculatedOptions](interfaces/SplitCalculatedOptions.md)
|
||||||
- [SplitHashOptions](interfaces/SplitHashOptions.md)
|
- [SplitHashOptions](interfaces/SplitHashOptions.md)
|
||||||
@@ -90,6 +105,7 @@
|
|||||||
- [UpdateResult](interfaces/UpdateResult.md)
|
- [UpdateResult](interfaces/UpdateResult.md)
|
||||||
- [Version](interfaces/Version.md)
|
- [Version](interfaces/Version.md)
|
||||||
- [WriteExecutionOptions](interfaces/WriteExecutionOptions.md)
|
- [WriteExecutionOptions](interfaces/WriteExecutionOptions.md)
|
||||||
|
- [WriteProgress](interfaces/WriteProgress.md)
|
||||||
|
|
||||||
## Type Aliases
|
## Type Aliases
|
||||||
|
|
||||||
@@ -107,6 +123,7 @@
|
|||||||
|
|
||||||
- [RecordBatchIterator](functions/RecordBatchIterator.md)
|
- [RecordBatchIterator](functions/RecordBatchIterator.md)
|
||||||
- [connect](functions/connect.md)
|
- [connect](functions/connect.md)
|
||||||
|
- [connectNamespace](functions/connectNamespace.md)
|
||||||
- [makeArrowTable](functions/makeArrowTable.md)
|
- [makeArrowTable](functions/makeArrowTable.md)
|
||||||
- [packBits](functions/packBits.md)
|
- [packBits](functions/packBits.md)
|
||||||
- [permutationBuilder](functions/permutationBuilder.md)
|
- [permutationBuilder](functions/permutationBuilder.md)
|
||||||
|
|||||||
@@ -19,3 +19,39 @@ mode: "append" | "overwrite";
|
|||||||
If "append" (the default) then the new data will be added to the table
|
If "append" (the default) then the new data will be added to the table
|
||||||
|
|
||||||
If "overwrite" then the new data will replace the existing data in the table.
|
If "overwrite" then the new data will replace the existing data in the table.
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
### progress()
|
||||||
|
|
||||||
|
```ts
|
||||||
|
progress: (progress) => void;
|
||||||
|
```
|
||||||
|
|
||||||
|
Optional callback invoked periodically with write progress.
|
||||||
|
|
||||||
|
The callback is fired once per batch written and once more with
|
||||||
|
`done: true` when the write completes. Calls are dispatched
|
||||||
|
asynchronously to the JS event loop and never block the write — a slow
|
||||||
|
callback will queue events rather than back-pressure the writer.
|
||||||
|
|
||||||
|
Errors thrown from the callback are logged with `console.warn` and
|
||||||
|
swallowed — they do not abort the write.
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
* **progress**: [`WriteProgress`](WriteProgress.md)
|
||||||
|
|
||||||
|
#### Returns
|
||||||
|
|
||||||
|
`void`
|
||||||
|
|
||||||
|
#### Example
|
||||||
|
|
||||||
|
```ts
|
||||||
|
await table.add(data, {
|
||||||
|
progress: (p) => {
|
||||||
|
console.log(`${p.outputRows}/${p.totalRows ?? "?"} rows`);
|
||||||
|
},
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|||||||
@@ -53,3 +53,18 @@ optional tlsConfig: TlsConfig;
|
|||||||
```ts
|
```ts
|
||||||
optional userAgent: string;
|
optional userAgent: string;
|
||||||
```
|
```
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
### userId?
|
||||||
|
|
||||||
|
```ts
|
||||||
|
optional userId: string;
|
||||||
|
```
|
||||||
|
|
||||||
|
User identifier for tracking purposes.
|
||||||
|
|
||||||
|
This is sent as the `x-lancedb-user-id` header in requests to LanceDB Cloud/Enterprise.
|
||||||
|
It can be set directly, or via the `LANCEDB_USER_ID` environment variable.
|
||||||
|
Alternatively, set `LANCEDB_USER_ID_ENV_KEY` to specify another environment
|
||||||
|
variable that contains the user ID value.
|
||||||
|
|||||||
@@ -0,0 +1,31 @@
|
|||||||
|
[**@lancedb/lancedb**](../README.md) • **Docs**
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
[@lancedb/lancedb](../globals.md) / ColumnOrdering
|
||||||
|
|
||||||
|
# Interface: ColumnOrdering
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
### ascending?
|
||||||
|
|
||||||
|
```ts
|
||||||
|
optional ascending: boolean;
|
||||||
|
```
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
### columnName
|
||||||
|
|
||||||
|
```ts
|
||||||
|
columnName: string;
|
||||||
|
```
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
### nullsFirst?
|
||||||
|
|
||||||
|
```ts
|
||||||
|
optional nullsFirst: boolean;
|
||||||
|
```
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
[**@lancedb/lancedb**](../README.md) • **Docs**
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
[@lancedb/lancedb](../globals.md) / ConnectNamespaceOptions
|
||||||
|
|
||||||
|
# Interface: ConnectNamespaceOptions
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
### namespaceClientProperties?
|
||||||
|
|
||||||
|
```ts
|
||||||
|
optional namespaceClientProperties: Record<string, string>;
|
||||||
|
```
|
||||||
|
|
||||||
|
Extra properties for the backing namespace client.
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
### readConsistencyInterval?
|
||||||
|
|
||||||
|
```ts
|
||||||
|
optional readConsistencyInterval: number;
|
||||||
|
```
|
||||||
|
|
||||||
|
The interval, in seconds, at which to check for updates to the table
|
||||||
|
from other processes. If None, then consistency is not checked. For
|
||||||
|
performance reasons, this is the default. For strong consistency, set
|
||||||
|
this to zero seconds. Then every read will check for updates from other
|
||||||
|
processes. As a compromise, you can set this to a non-zero value for
|
||||||
|
eventual consistency.
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
### session?
|
||||||
|
|
||||||
|
```ts
|
||||||
|
optional session: Session;
|
||||||
|
```
|
||||||
|
|
||||||
|
The session to use for this connection. Holds shared caches and other
|
||||||
|
session-specific state.
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
### storageOptions?
|
||||||
|
|
||||||
|
```ts
|
||||||
|
optional storageOptions: Record<string, string>;
|
||||||
|
```
|
||||||
|
|
||||||
|
Configuration for object storage. The available options are described
|
||||||
|
at https://docs.lancedb.com/storage/
|
||||||
@@ -41,22 +41,49 @@ for testing purposes.
|
|||||||
|
|
||||||
***
|
***
|
||||||
|
|
||||||
|
### manifestEnabled?
|
||||||
|
|
||||||
|
```ts
|
||||||
|
optional manifestEnabled: boolean;
|
||||||
|
```
|
||||||
|
|
||||||
|
(For LanceDB OSS only): use directory namespace manifests as the source
|
||||||
|
of truth for table metadata. Existing directory-listed root tables are
|
||||||
|
migrated into the manifest on access.
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
### namespaceClientProperties?
|
||||||
|
|
||||||
|
```ts
|
||||||
|
optional namespaceClientProperties: Record<string, string>;
|
||||||
|
```
|
||||||
|
|
||||||
|
(For LanceDB OSS only): extra properties for the backing namespace
|
||||||
|
client used by manifest-enabled native connections.
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
### readConsistencyInterval?
|
### readConsistencyInterval?
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
optional readConsistencyInterval: number;
|
optional readConsistencyInterval: number;
|
||||||
```
|
```
|
||||||
|
|
||||||
(For LanceDB OSS only): The interval, in seconds, at which to check for
|
The interval, in seconds, at which to check for updates to the table
|
||||||
updates to the table from other processes. If None, then consistency is not
|
from other processes. If None, then consistency is not checked. For
|
||||||
checked. For performance reasons, this is the default. For strong
|
performance reasons, this is the default. For strong consistency, set
|
||||||
consistency, set this to zero seconds. Then every read will check for
|
this to zero seconds. Then every read will check for updates from other
|
||||||
updates from other processes. As a compromise, you can set this to a
|
processes. As a compromise, you can set this to a non-zero value for
|
||||||
non-zero value for eventual consistency. If more than that interval
|
eventual consistency. If more than that interval has passed since the
|
||||||
has passed since the last check, then the table will be checked for updates.
|
last check, then the table will be checked for updates. Note: this
|
||||||
Note: this consistency only applies to read operations. Write operations are
|
consistency only applies to read operations. Write operations are
|
||||||
always consistent.
|
always consistent.
|
||||||
|
|
||||||
|
Stronger consistency is not free. The smaller the interval, the more
|
||||||
|
often each read pays the cost of checking for updates against object
|
||||||
|
storage, raising per-read latency and cost.
|
||||||
|
|
||||||
***
|
***
|
||||||
|
|
||||||
### region?
|
### region?
|
||||||
@@ -89,4 +116,4 @@ optional storageOptions: Record<string, string>;
|
|||||||
|
|
||||||
(For LanceDB OSS only): configuration for object storage.
|
(For LanceDB OSS only): configuration for object storage.
|
||||||
|
|
||||||
The available options are described at https://lancedb.com/docs/storage/
|
The available options are described at https://docs.lancedb.com/storage/
|
||||||
|
|||||||
@@ -0,0 +1,27 @@
|
|||||||
|
[**@lancedb/lancedb**](../README.md) • **Docs**
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
[@lancedb/lancedb](../globals.md) / CreateNamespaceOptions
|
||||||
|
|
||||||
|
# Interface: CreateNamespaceOptions
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
### mode?
|
||||||
|
|
||||||
|
```ts
|
||||||
|
optional mode: "overwrite" | "create" | "exist_ok";
|
||||||
|
```
|
||||||
|
|
||||||
|
Creation mode.
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
### properties?
|
||||||
|
|
||||||
|
```ts
|
||||||
|
optional properties: Record<string, string>;
|
||||||
|
```
|
||||||
|
|
||||||
|
Properties to set on the new namespace.
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
[**@lancedb/lancedb**](../README.md) • **Docs**
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
[@lancedb/lancedb](../globals.md) / CreateNamespaceResponse
|
||||||
|
|
||||||
|
# Interface: CreateNamespaceResponse
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
### properties?
|
||||||
|
|
||||||
|
```ts
|
||||||
|
optional properties: Record<string, string>;
|
||||||
|
```
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
### transactionId?
|
||||||
|
|
||||||
|
```ts
|
||||||
|
optional transactionId: string;
|
||||||
|
```
|
||||||
@@ -97,4 +97,4 @@ Configuration for object storage.
|
|||||||
Options already set on the connection will be inherited by the table,
|
Options already set on the connection will be inherited by the table,
|
||||||
but can be overridden here.
|
but can be overridden here.
|
||||||
|
|
||||||
The available options are described at https://lancedb.com/docs/storage/
|
The available options are described at https://docs.lancedb.com/storage/
|
||||||
|
|||||||
@@ -8,6 +8,14 @@
|
|||||||
|
|
||||||
## Properties
|
## Properties
|
||||||
|
|
||||||
|
### numDeletedRows
|
||||||
|
|
||||||
|
```ts
|
||||||
|
numDeletedRows: number;
|
||||||
|
```
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
### version
|
### version
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
[**@lancedb/lancedb**](../README.md) • **Docs**
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
[@lancedb/lancedb](../globals.md) / DescribeNamespaceResponse
|
||||||
|
|
||||||
|
# Interface: DescribeNamespaceResponse
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
### properties?
|
||||||
|
|
||||||
|
```ts
|
||||||
|
optional properties: Record<string, string>;
|
||||||
|
```
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
[**@lancedb/lancedb**](../README.md) • **Docs**
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
[@lancedb/lancedb](../globals.md) / DirNamespaceConfig
|
||||||
|
|
||||||
|
# Interface: DirNamespaceConfig
|
||||||
|
|
||||||
|
Configuration for the built-in directory namespace (`"dir"`).
|
||||||
|
|
||||||
|
The directory namespace stores tables under a single root path (local
|
||||||
|
filesystem or object storage URI). See
|
||||||
|
[https://docs.lancedb.com/namespaces](https://docs.lancedb.com/namespaces) for the documented surface;
|
||||||
|
less-common knobs live under [DirNamespaceConfig.extraProperties](DirNamespaceConfig.md#extraproperties).
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
### extraProperties?
|
||||||
|
|
||||||
|
```ts
|
||||||
|
optional extraProperties: Record<string, string>;
|
||||||
|
```
|
||||||
|
|
||||||
|
Additional raw properties passed verbatim to the namespace
|
||||||
|
implementation (e.g. `storage.*`, `credential_vendor.*`). Typed
|
||||||
|
fields above take precedence on key collision.
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
### manifestEnabled?
|
||||||
|
|
||||||
|
```ts
|
||||||
|
optional manifestEnabled: boolean;
|
||||||
|
```
|
||||||
|
|
||||||
|
Whether to maintain a namespace manifest at the root. Required for
|
||||||
|
child namespaces. Defaults to true on the impl side.
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
### root
|
||||||
|
|
||||||
|
```ts
|
||||||
|
root: string;
|
||||||
|
```
|
||||||
|
|
||||||
|
Root path or URI containing the LanceDB tables.
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
[**@lancedb/lancedb**](../README.md) • **Docs**
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
[@lancedb/lancedb](../globals.md) / DropNamespaceOptions
|
||||||
|
|
||||||
|
# Interface: DropNamespaceOptions
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
### behavior?
|
||||||
|
|
||||||
|
```ts
|
||||||
|
optional behavior: "restrict" | "cascade";
|
||||||
|
```
|
||||||
|
|
||||||
|
Refuse to drop if non-empty (restrict) or drop recursively (cascade).
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
### mode?
|
||||||
|
|
||||||
|
```ts
|
||||||
|
optional mode: "fail" | "skip";
|
||||||
|
```
|
||||||
|
|
||||||
|
Whether to skip if the namespace doesn't exist, or fail.
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
[**@lancedb/lancedb**](../README.md) • **Docs**
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
[@lancedb/lancedb](../globals.md) / DropNamespaceResponse
|
||||||
|
|
||||||
|
# Interface: DropNamespaceResponse
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
### properties?
|
||||||
|
|
||||||
|
```ts
|
||||||
|
optional properties: Record<string, string>;
|
||||||
|
```
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
### transactionId?
|
||||||
|
|
||||||
|
```ts
|
||||||
|
optional transactionId: string[];
|
||||||
|
```
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
[**@lancedb/lancedb**](../README.md) • **Docs**
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
[@lancedb/lancedb](../globals.md) / ListNamespacesOptions
|
||||||
|
|
||||||
|
# Interface: ListNamespacesOptions
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
### limit?
|
||||||
|
|
||||||
|
```ts
|
||||||
|
optional limit: number;
|
||||||
|
```
|
||||||
|
|
||||||
|
An optional limit to the number of results to return.
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
### pageToken?
|
||||||
|
|
||||||
|
```ts
|
||||||
|
optional pageToken: string;
|
||||||
|
```
|
||||||
|
|
||||||
|
Token from a previous response for pagination.
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
[**@lancedb/lancedb**](../README.md) • **Docs**
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
[@lancedb/lancedb](../globals.md) / ListNamespacesResponse
|
||||||
|
|
||||||
|
# Interface: ListNamespacesResponse
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
### namespaces
|
||||||
|
|
||||||
|
```ts
|
||||||
|
namespaces: string[];
|
||||||
|
```
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
### pageToken?
|
||||||
|
|
||||||
|
```ts
|
||||||
|
optional pageToken: string;
|
||||||
|
```
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
[**@lancedb/lancedb**](../README.md) • **Docs**
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
[@lancedb/lancedb](../globals.md) / LsmWriteSpec
|
||||||
|
|
||||||
|
# Interface: LsmWriteSpec
|
||||||
|
|
||||||
|
Specification selecting Lance's MemWAL LSM-style write path for
|
||||||
|
`mergeInsert`.
|
||||||
|
|
||||||
|
`specType` is `"bucket"`, `"identity"`, or `"unsharded"`. For `"bucket"`,
|
||||||
|
`column` and `numBuckets` are required; for `"identity"`, `column` is
|
||||||
|
required.
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
### column?
|
||||||
|
|
||||||
|
```ts
|
||||||
|
optional column: string;
|
||||||
|
```
|
||||||
|
|
||||||
|
Bucket and identity variants: the sharding column.
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
### maintainedIndexes?
|
||||||
|
|
||||||
|
```ts
|
||||||
|
optional maintainedIndexes: string[];
|
||||||
|
```
|
||||||
|
|
||||||
|
Names of indexes the MemWAL should keep up to date during writes.
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
### numBuckets?
|
||||||
|
|
||||||
|
```ts
|
||||||
|
optional numBuckets: number;
|
||||||
|
```
|
||||||
|
|
||||||
|
Bucket variant: the number of buckets, in `[1, 1024]`.
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
### specType
|
||||||
|
|
||||||
|
```ts
|
||||||
|
specType: "bucket" | "identity" | "unsharded";
|
||||||
|
```
|
||||||
|
|
||||||
|
One of `"bucket"`, `"identity"`, or `"unsharded"`.
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
### writerConfigDefaults?
|
||||||
|
|
||||||
|
```ts
|
||||||
|
optional writerConfigDefaults: Record<string, string>;
|
||||||
|
```
|
||||||
|
|
||||||
|
Default `ShardWriter` configuration recorded in the MemWAL index.
|
||||||
@@ -42,4 +42,4 @@ Configuration for object storage.
|
|||||||
Options already set on the connection will be inherited by the table,
|
Options already set on the connection will be inherited by the table,
|
||||||
but can be overridden here.
|
but can be overridden here.
|
||||||
|
|
||||||
The available options are described at https://lancedb.com/docs/storage/
|
The available options are described at https://docs.lancedb.com/storage/
|
||||||
|
|||||||
@@ -37,3 +37,12 @@ tbl.optimize({cleanupOlderThan: new Date()});
|
|||||||
```ts
|
```ts
|
||||||
deleteUnverified: boolean;
|
deleteUnverified: boolean;
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Because they may be part of an in-progress transaction, files newer than
|
||||||
|
7 days old are not deleted by default. If you are sure that there are no
|
||||||
|
in-progress transactions, then you can set this to true to delete all
|
||||||
|
files older than `cleanupOlderThan`.
|
||||||
|
|
||||||
|
**WARNING**: This should only be set to true if you can guarantee that
|
||||||
|
no other process is currently working on this dataset. Otherwise the
|
||||||
|
dataset could be put into a corrupted state.
|
||||||
|
|||||||
@@ -0,0 +1,29 @@
|
|||||||
|
[**@lancedb/lancedb**](../README.md) • **Docs**
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
[@lancedb/lancedb](../globals.md) / RenameTableOptions
|
||||||
|
|
||||||
|
# Interface: RenameTableOptions
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
### namespacePath?
|
||||||
|
|
||||||
|
```ts
|
||||||
|
optional namespacePath: string[];
|
||||||
|
```
|
||||||
|
|
||||||
|
The namespace path of the table being renamed. Defaults to the root
|
||||||
|
namespace (`[]`) when omitted.
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
### newNamespacePath?
|
||||||
|
|
||||||
|
```ts
|
||||||
|
optional newNamespacePath: string[];
|
||||||
|
```
|
||||||
|
|
||||||
|
The namespace path to move the table to as part of the rename. When
|
||||||
|
omitted the table stays in `namespacePath`.
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
[**@lancedb/lancedb**](../README.md) • **Docs**
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
[@lancedb/lancedb](../globals.md) / RestNamespaceConfig
|
||||||
|
|
||||||
|
# Interface: RestNamespaceConfig
|
||||||
|
|
||||||
|
Configuration for the built-in REST namespace (`"rest"`).
|
||||||
|
|
||||||
|
The REST namespace talks to a remote catalog server over HTTP. See
|
||||||
|
[https://docs.lancedb.com/namespaces](https://docs.lancedb.com/namespaces) for the documented surface;
|
||||||
|
less-common knobs (TLS, metrics) live under
|
||||||
|
[RestNamespaceConfig.extraProperties](RestNamespaceConfig.md#extraproperties).
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
### extraProperties?
|
||||||
|
|
||||||
|
```ts
|
||||||
|
optional extraProperties: Record<string, string>;
|
||||||
|
```
|
||||||
|
|
||||||
|
Additional raw properties passed verbatim to the namespace
|
||||||
|
implementation (e.g. `tls.*`, `ops_metrics_enabled`, `delimiter`).
|
||||||
|
Typed fields above take precedence on key collision.
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
### headers?
|
||||||
|
|
||||||
|
```ts
|
||||||
|
optional headers: Record<string, string>;
|
||||||
|
```
|
||||||
|
|
||||||
|
HTTP headers forwarded with each request. Keys are passed through
|
||||||
|
as-is (e.g. `"x-api-key"`, `"Authorization"`).
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
### uri
|
||||||
|
|
||||||
|
```ts
|
||||||
|
uri: string;
|
||||||
|
```
|
||||||
|
|
||||||
|
Catalog endpoint URL.
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
[**@lancedb/lancedb**](../README.md) • **Docs**
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
[@lancedb/lancedb](../globals.md) / ScannableOptions
|
||||||
|
|
||||||
|
# Interface: ScannableOptions
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
### numRows?
|
||||||
|
|
||||||
|
```ts
|
||||||
|
optional numRows: number;
|
||||||
|
```
|
||||||
|
|
||||||
|
Hint about the number of rows. Not validated against the stream.
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
### rescannable?
|
||||||
|
|
||||||
|
```ts
|
||||||
|
optional rescannable: boolean;
|
||||||
|
```
|
||||||
|
|
||||||
|
Whether the source can be scanned more than once. Defaults to `true` for
|
||||||
|
`fromTable` / `fromFactory` and `false` for `fromIterable` /
|
||||||
|
`fromRecordBatchReader`.
|
||||||
@@ -0,0 +1,84 @@
|
|||||||
|
[**@lancedb/lancedb**](../README.md) • **Docs**
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
[@lancedb/lancedb](../globals.md) / WriteProgress
|
||||||
|
|
||||||
|
# Interface: WriteProgress
|
||||||
|
|
||||||
|
Progress snapshot for a write operation, delivered to the `progress`
|
||||||
|
callback passed to [Table.add](../classes/Table.md#add).
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
### activeTasks
|
||||||
|
|
||||||
|
```ts
|
||||||
|
activeTasks: number;
|
||||||
|
```
|
||||||
|
|
||||||
|
Number of parallel write tasks currently in flight.
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
### done
|
||||||
|
|
||||||
|
```ts
|
||||||
|
done: boolean;
|
||||||
|
```
|
||||||
|
|
||||||
|
`true` for the final callback; `false` otherwise.
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
### elapsedSeconds
|
||||||
|
|
||||||
|
```ts
|
||||||
|
elapsedSeconds: number;
|
||||||
|
```
|
||||||
|
|
||||||
|
Wall-clock seconds since the write started.
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
### outputBytes
|
||||||
|
|
||||||
|
```ts
|
||||||
|
outputBytes: number;
|
||||||
|
```
|
||||||
|
|
||||||
|
Number of bytes written so far.
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
### outputRows
|
||||||
|
|
||||||
|
```ts
|
||||||
|
outputRows: number;
|
||||||
|
```
|
||||||
|
|
||||||
|
Number of rows written so far.
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
### totalRows?
|
||||||
|
|
||||||
|
```ts
|
||||||
|
optional totalRows: number;
|
||||||
|
```
|
||||||
|
|
||||||
|
Total rows expected, when the input source reports it.
|
||||||
|
|
||||||
|
Always set on the final callback (the one with `done: true`), falling
|
||||||
|
back to the actual number of rows written when the source could not
|
||||||
|
report a row count up front.
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
### totalTasks
|
||||||
|
|
||||||
|
```ts
|
||||||
|
totalTasks: number;
|
||||||
|
```
|
||||||
|
|
||||||
|
Total number of parallel write tasks (the write parallelism).
|
||||||
@@ -52,7 +52,7 @@ new EmbeddingFunction<T, M>(): EmbeddingFunction<T, M>
|
|||||||
### computeQueryEmbeddings()
|
### computeQueryEmbeddings()
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
computeQueryEmbeddings(data): Promise<number[] | Float32Array | Float64Array>
|
computeQueryEmbeddings(data): Promise<number[] | Uint8Array | Float32Array | Float64Array>
|
||||||
```
|
```
|
||||||
|
|
||||||
Compute the embeddings for a single query
|
Compute the embeddings for a single query
|
||||||
@@ -63,7 +63,7 @@ Compute the embeddings for a single query
|
|||||||
|
|
||||||
#### Returns
|
#### Returns
|
||||||
|
|
||||||
`Promise`<`number`[] \| `Float32Array` \| `Float64Array`>
|
`Promise`<`number`[] \| `Uint8Array` \| `Float32Array` \| `Float64Array`>
|
||||||
|
|
||||||
***
|
***
|
||||||
|
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ new TextEmbeddingFunction<M>(): TextEmbeddingFunction<M>
|
|||||||
### computeQueryEmbeddings()
|
### computeQueryEmbeddings()
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
computeQueryEmbeddings(data): Promise<number[] | Float32Array | Float64Array>
|
computeQueryEmbeddings(data): Promise<number[] | Uint8Array | Float32Array | Float64Array>
|
||||||
```
|
```
|
||||||
|
|
||||||
Compute the embeddings for a single query
|
Compute the embeddings for a single query
|
||||||
@@ -48,7 +48,7 @@ Compute the embeddings for a single query
|
|||||||
|
|
||||||
#### Returns
|
#### Returns
|
||||||
|
|
||||||
`Promise`<`number`[] \| `Float32Array` \| `Float64Array`>
|
`Promise`<`number`[] \| `Uint8Array` \| `Float32Array` \| `Float64Array`>
|
||||||
|
|
||||||
#### Overrides
|
#### Overrides
|
||||||
|
|
||||||
|
|||||||
@@ -7,5 +7,10 @@
|
|||||||
# Type Alias: IntoVector
|
# Type Alias: IntoVector
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
type IntoVector: Float32Array | Float64Array | number[] | Promise<Float32Array | Float64Array | number[]>;
|
type IntoVector:
|
||||||
|
| Float32Array
|
||||||
|
| Float64Array
|
||||||
|
| Uint8Array
|
||||||
|
| number[]
|
||||||
|
| Promise<Float32Array | Float64Array | Uint8Array | number[]>;
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -36,6 +36,20 @@ is also an [asynchronous API client](#connections-asynchronous).
|
|||||||
|
|
||||||
::: lancedb.table.Tags
|
::: lancedb.table.Tags
|
||||||
|
|
||||||
|
## Expressions
|
||||||
|
|
||||||
|
Type-safe expression builder for filters and projections. Use these instead
|
||||||
|
of raw SQL strings with [where][lancedb.query.LanceQueryBuilder.where] and
|
||||||
|
[select][lancedb.query.LanceQueryBuilder.select].
|
||||||
|
|
||||||
|
::: lancedb.expr.Expr
|
||||||
|
|
||||||
|
::: lancedb.expr.col
|
||||||
|
|
||||||
|
::: lancedb.expr.lit
|
||||||
|
|
||||||
|
::: lancedb.expr.func
|
||||||
|
|
||||||
## Querying (Synchronous)
|
## Querying (Synchronous)
|
||||||
|
|
||||||
::: lancedb.query.Query
|
::: lancedb.query.Query
|
||||||
@@ -80,11 +94,11 @@ is also an [asynchronous API client](#connections-asynchronous).
|
|||||||
|
|
||||||
## Full text search
|
## Full text search
|
||||||
|
|
||||||
::: lancedb.fts.create_index
|
Use [lancedb.table.Table.create_fts_index][] for the synchronous API or
|
||||||
|
[lancedb.table.AsyncTable.create_index][] with [lancedb.index.FTS][] for the
|
||||||
|
asynchronous API.
|
||||||
|
|
||||||
::: lancedb.fts.populate_index
|
::: lancedb.index.FTS
|
||||||
|
|
||||||
::: lancedb.fts.search_index
|
|
||||||
|
|
||||||
## Utilities
|
## Utilities
|
||||||
|
|
||||||
@@ -152,6 +166,12 @@ lists the indices that LanceDb supports.
|
|||||||
|
|
||||||
::: lancedb.index.IvfFlat
|
::: lancedb.index.IvfFlat
|
||||||
|
|
||||||
|
::: lancedb.index.IvfSq
|
||||||
|
|
||||||
|
::: lancedb.index.IvfRq
|
||||||
|
|
||||||
|
::: lancedb.index.HnswFlat
|
||||||
|
|
||||||
::: lancedb.table.IndexStatistics
|
::: lancedb.table.IndexStatistics
|
||||||
|
|
||||||
## Querying (Asynchronous)
|
## Querying (Asynchronous)
|
||||||
|
|||||||
@@ -0,0 +1,71 @@
|
|||||||
|
|
||||||
|
List of third-party dependencies grouped by their license type.
|
||||||
|
|
||||||
|
Apache 2.0:
|
||||||
|
|
||||||
|
* error-prone annotations (com.google.errorprone:error_prone_annotations:2.28.0 - https://errorprone.info/error_prone_annotations)
|
||||||
|
|
||||||
|
Apache License 2.0:
|
||||||
|
|
||||||
|
* JsonNullable Jackson module (org.openapitools:jackson-databind-nullable:0.2.6 - https://github.com/OpenAPITools/jackson-databind-nullable)
|
||||||
|
|
||||||
|
Apache License V2.0:
|
||||||
|
|
||||||
|
* FlatBuffers Java API (com.google.flatbuffers:flatbuffers-java:23.5.26 - https://github.com/google/flatbuffers)
|
||||||
|
|
||||||
|
Apache License, Version 2.0:
|
||||||
|
|
||||||
|
* Apache Commons Codec (commons-codec:commons-codec:1.15 - https://commons.apache.org/proper/commons-codec/)
|
||||||
|
* Apache HttpClient (org.apache.httpcomponents.client5:httpclient5:5.2.1 - https://hc.apache.org/httpcomponents-client-5.0.x/5.2.1/httpclient5/)
|
||||||
|
* Apache HttpComponents Core HTTP/1.1 (org.apache.httpcomponents.core5:httpcore5:5.2 - https://hc.apache.org/httpcomponents-core-5.2.x/5.2/httpcore5/)
|
||||||
|
* Apache HttpComponents Core HTTP/2 (org.apache.httpcomponents.core5:httpcore5-h2:5.2 - https://hc.apache.org/httpcomponents-core-5.2.x/5.2/httpcore5-h2/)
|
||||||
|
* Arrow Format (org.apache.arrow:arrow-format:15.0.0 - https://arrow.apache.org/arrow-format/)
|
||||||
|
* Arrow Java C Data Interface (org.apache.arrow:arrow-c-data:15.0.0 - https://arrow.apache.org/arrow-c-data/)
|
||||||
|
* Arrow Java Dataset (org.apache.arrow:arrow-dataset:15.0.0 - https://arrow.apache.org/arrow-dataset/)
|
||||||
|
* Arrow Memory - Core (org.apache.arrow:arrow-memory-core:15.0.0 - https://arrow.apache.org/arrow-memory/arrow-memory-core/)
|
||||||
|
* Arrow Memory - Netty (org.apache.arrow:arrow-memory-netty:15.0.0 - https://arrow.apache.org/arrow-memory/arrow-memory-netty/)
|
||||||
|
* Arrow Vectors (org.apache.arrow:arrow-vector:15.0.0 - https://arrow.apache.org/arrow-vector/)
|
||||||
|
* Guava: Google Core Libraries for Java (com.google.guava:guava:33.3.1-jre - https://github.com/google/guava)
|
||||||
|
* J2ObjC Annotations (com.google.j2objc:j2objc-annotations:3.0.0 - https://github.com/google/j2objc/)
|
||||||
|
* Netty/Buffer (io.netty:netty-buffer:4.1.104.Final - https://netty.io/netty-buffer/)
|
||||||
|
* Netty/Common (io.netty:netty-common:4.1.104.Final - https://netty.io/netty-common/)
|
||||||
|
|
||||||
|
Apache-2.0:
|
||||||
|
|
||||||
|
* Apache Commons Lang (org.apache.commons:commons-lang3:3.18.0 - https://commons.apache.org/proper/commons-lang/)
|
||||||
|
* lance-namespace-apache-client (org.lance:lance-namespace-apache-client:0.4.5 - https://github.com/openapitools/openapi-generator)
|
||||||
|
* lance-namespace-core (org.lance:lance-namespace-core:0.4.5 - https://lance.org/format/namespace/lance-namespace-core/)
|
||||||
|
|
||||||
|
EDL 1.0:
|
||||||
|
|
||||||
|
* Jakarta Activation API jar (jakarta.activation:jakarta.activation-api:1.2.2 - https://github.com/eclipse-ee4j/jaf/jakarta.activation-api)
|
||||||
|
|
||||||
|
Eclipse Distribution License - v 1.0:
|
||||||
|
|
||||||
|
* Eclipse Collections API (org.eclipse.collections:eclipse-collections-api:11.1.0 - https://github.com/eclipse/eclipse-collections/eclipse-collections-api)
|
||||||
|
* Eclipse Collections Main Library (org.eclipse.collections:eclipse-collections:11.1.0 - https://github.com/eclipse/eclipse-collections/eclipse-collections)
|
||||||
|
* Jakarta XML Binding API (jakarta.xml.bind:jakarta.xml.bind-api:2.3.3 - https://github.com/eclipse-ee4j/jaxb-api/jakarta.xml.bind-api)
|
||||||
|
|
||||||
|
Eclipse Public License - v 1.0:
|
||||||
|
|
||||||
|
* Eclipse Collections API (org.eclipse.collections:eclipse-collections-api:11.1.0 - https://github.com/eclipse/eclipse-collections/eclipse-collections-api)
|
||||||
|
* Eclipse Collections Main Library (org.eclipse.collections:eclipse-collections:11.1.0 - https://github.com/eclipse/eclipse-collections/eclipse-collections)
|
||||||
|
|
||||||
|
The Apache Software License, Version 2.0:
|
||||||
|
|
||||||
|
* FindBugs-jsr305 (com.google.code.findbugs:jsr305:3.0.2 - http://findbugs.sourceforge.net/)
|
||||||
|
* Guava InternalFutureFailureAccess and InternalFutures (com.google.guava:failureaccess:1.0.2 - https://github.com/google/guava/failureaccess)
|
||||||
|
* Guava ListenableFuture only (com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava - https://github.com/google/guava/listenablefuture)
|
||||||
|
* Jackson datatype: JSR310 (com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.16.0 - https://github.com/FasterXML/jackson-modules-java8/jackson-datatype-jsr310)
|
||||||
|
* Jackson module: Old JAXB Annotations (javax.xml.bind) (com.fasterxml.jackson.module:jackson-module-jaxb-annotations:2.17.1 - https://github.com/FasterXML/jackson-modules-base)
|
||||||
|
* Jackson-annotations (com.fasterxml.jackson.core:jackson-annotations:2.16.0 - https://github.com/FasterXML/jackson)
|
||||||
|
* Jackson-core (com.fasterxml.jackson.core:jackson-core:2.16.0 - https://github.com/FasterXML/jackson-core)
|
||||||
|
* jackson-databind (com.fasterxml.jackson.core:jackson-databind:2.15.2 - https://github.com/FasterXML/jackson)
|
||||||
|
* Jackson-JAXRS: base (com.fasterxml.jackson.jaxrs:jackson-jaxrs-base:2.17.1 - https://github.com/FasterXML/jackson-jaxrs-providers/jackson-jaxrs-base)
|
||||||
|
* Jackson-JAXRS: JSON (com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:2.17.1 - https://github.com/FasterXML/jackson-jaxrs-providers/jackson-jaxrs-json-provider)
|
||||||
|
* JAR JNI Loader (org.questdb:jar-jni:1.1.1 - https://github.com/questdb/rust-maven-plugin)
|
||||||
|
* Lance Core (org.lance:lance-core:2.0.0 - https://lance.org/)
|
||||||
|
|
||||||
|
The MIT License:
|
||||||
|
|
||||||
|
* Checker Qual (org.checkerframework:checker-qual:3.43.0 - https://checkerframework.org/)
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
# LanceDB Java SDK
|
# LanceDB Java Enterprise Client
|
||||||
|
|
||||||
## Configuration and Initialization
|
## Configuration and Initialization
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,71 @@
|
|||||||
|
|
||||||
|
List of third-party dependencies grouped by their license type.
|
||||||
|
|
||||||
|
Apache 2.0:
|
||||||
|
|
||||||
|
* error-prone annotations (com.google.errorprone:error_prone_annotations:2.28.0 - https://errorprone.info/error_prone_annotations)
|
||||||
|
|
||||||
|
Apache License 2.0:
|
||||||
|
|
||||||
|
* JsonNullable Jackson module (org.openapitools:jackson-databind-nullable:0.2.6 - https://github.com/OpenAPITools/jackson-databind-nullable)
|
||||||
|
|
||||||
|
Apache License V2.0:
|
||||||
|
|
||||||
|
* FlatBuffers Java API (com.google.flatbuffers:flatbuffers-java:23.5.26 - https://github.com/google/flatbuffers)
|
||||||
|
|
||||||
|
Apache License, Version 2.0:
|
||||||
|
|
||||||
|
* Apache Commons Codec (commons-codec:commons-codec:1.15 - https://commons.apache.org/proper/commons-codec/)
|
||||||
|
* Apache HttpClient (org.apache.httpcomponents.client5:httpclient5:5.2.1 - https://hc.apache.org/httpcomponents-client-5.0.x/5.2.1/httpclient5/)
|
||||||
|
* Apache HttpComponents Core HTTP/1.1 (org.apache.httpcomponents.core5:httpcore5:5.2 - https://hc.apache.org/httpcomponents-core-5.2.x/5.2/httpcore5/)
|
||||||
|
* Apache HttpComponents Core HTTP/2 (org.apache.httpcomponents.core5:httpcore5-h2:5.2 - https://hc.apache.org/httpcomponents-core-5.2.x/5.2/httpcore5-h2/)
|
||||||
|
* Arrow Format (org.apache.arrow:arrow-format:15.0.0 - https://arrow.apache.org/arrow-format/)
|
||||||
|
* Arrow Java C Data Interface (org.apache.arrow:arrow-c-data:15.0.0 - https://arrow.apache.org/arrow-c-data/)
|
||||||
|
* Arrow Java Dataset (org.apache.arrow:arrow-dataset:15.0.0 - https://arrow.apache.org/arrow-dataset/)
|
||||||
|
* Arrow Memory - Core (org.apache.arrow:arrow-memory-core:15.0.0 - https://arrow.apache.org/arrow-memory/arrow-memory-core/)
|
||||||
|
* Arrow Memory - Netty (org.apache.arrow:arrow-memory-netty:15.0.0 - https://arrow.apache.org/arrow-memory/arrow-memory-netty/)
|
||||||
|
* Arrow Vectors (org.apache.arrow:arrow-vector:15.0.0 - https://arrow.apache.org/arrow-vector/)
|
||||||
|
* Guava: Google Core Libraries for Java (com.google.guava:guava:33.3.1-jre - https://github.com/google/guava)
|
||||||
|
* J2ObjC Annotations (com.google.j2objc:j2objc-annotations:3.0.0 - https://github.com/google/j2objc/)
|
||||||
|
* Netty/Buffer (io.netty:netty-buffer:4.1.104.Final - https://netty.io/netty-buffer/)
|
||||||
|
* Netty/Common (io.netty:netty-common:4.1.104.Final - https://netty.io/netty-common/)
|
||||||
|
|
||||||
|
Apache-2.0:
|
||||||
|
|
||||||
|
* Apache Commons Lang (org.apache.commons:commons-lang3:3.18.0 - https://commons.apache.org/proper/commons-lang/)
|
||||||
|
* lance-namespace-apache-client (org.lance:lance-namespace-apache-client:0.4.5 - https://github.com/openapitools/openapi-generator)
|
||||||
|
* lance-namespace-core (org.lance:lance-namespace-core:0.4.5 - https://lance.org/format/namespace/lance-namespace-core/)
|
||||||
|
|
||||||
|
EDL 1.0:
|
||||||
|
|
||||||
|
* Jakarta Activation API jar (jakarta.activation:jakarta.activation-api:1.2.2 - https://github.com/eclipse-ee4j/jaf/jakarta.activation-api)
|
||||||
|
|
||||||
|
Eclipse Distribution License - v 1.0:
|
||||||
|
|
||||||
|
* Eclipse Collections API (org.eclipse.collections:eclipse-collections-api:11.1.0 - https://github.com/eclipse/eclipse-collections/eclipse-collections-api)
|
||||||
|
* Eclipse Collections Main Library (org.eclipse.collections:eclipse-collections:11.1.0 - https://github.com/eclipse/eclipse-collections/eclipse-collections)
|
||||||
|
* Jakarta XML Binding API (jakarta.xml.bind:jakarta.xml.bind-api:2.3.3 - https://github.com/eclipse-ee4j/jaxb-api/jakarta.xml.bind-api)
|
||||||
|
|
||||||
|
Eclipse Public License - v 1.0:
|
||||||
|
|
||||||
|
* Eclipse Collections API (org.eclipse.collections:eclipse-collections-api:11.1.0 - https://github.com/eclipse/eclipse-collections/eclipse-collections-api)
|
||||||
|
* Eclipse Collections Main Library (org.eclipse.collections:eclipse-collections:11.1.0 - https://github.com/eclipse/eclipse-collections/eclipse-collections)
|
||||||
|
|
||||||
|
The Apache Software License, Version 2.0:
|
||||||
|
|
||||||
|
* FindBugs-jsr305 (com.google.code.findbugs:jsr305:3.0.2 - http://findbugs.sourceforge.net/)
|
||||||
|
* Guava InternalFutureFailureAccess and InternalFutures (com.google.guava:failureaccess:1.0.2 - https://github.com/google/guava/failureaccess)
|
||||||
|
* Guava ListenableFuture only (com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava - https://github.com/google/guava/listenablefuture)
|
||||||
|
* Jackson datatype: JSR310 (com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.16.0 - https://github.com/FasterXML/jackson-modules-java8/jackson-datatype-jsr310)
|
||||||
|
* Jackson module: Old JAXB Annotations (javax.xml.bind) (com.fasterxml.jackson.module:jackson-module-jaxb-annotations:2.17.1 - https://github.com/FasterXML/jackson-modules-base)
|
||||||
|
* Jackson-annotations (com.fasterxml.jackson.core:jackson-annotations:2.16.0 - https://github.com/FasterXML/jackson)
|
||||||
|
* Jackson-core (com.fasterxml.jackson.core:jackson-core:2.16.0 - https://github.com/FasterXML/jackson-core)
|
||||||
|
* jackson-databind (com.fasterxml.jackson.core:jackson-databind:2.15.2 - https://github.com/FasterXML/jackson)
|
||||||
|
* Jackson-JAXRS: base (com.fasterxml.jackson.jaxrs:jackson-jaxrs-base:2.17.1 - https://github.com/FasterXML/jackson-jaxrs-providers/jackson-jaxrs-base)
|
||||||
|
* Jackson-JAXRS: JSON (com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:2.17.1 - https://github.com/FasterXML/jackson-jaxrs-providers/jackson-jaxrs-json-provider)
|
||||||
|
* JAR JNI Loader (org.questdb:jar-jni:1.1.1 - https://github.com/questdb/rust-maven-plugin)
|
||||||
|
* Lance Core (org.lance:lance-core:2.0.0 - https://lance.org/)
|
||||||
|
|
||||||
|
The MIT License:
|
||||||
|
|
||||||
|
* Checker Qual (org.checkerframework:checker-qual:3.43.0 - https://checkerframework.org/)
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.lancedb</groupId>
|
<groupId>com.lancedb</groupId>
|
||||||
<artifactId>lancedb-parent</artifactId>
|
<artifactId>lancedb-parent</artifactId>
|
||||||
<version>0.24.0-beta.0</version>
|
<version>0.30.0-beta.1</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
@@ -56,21 +56,21 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.logging.log4j</groupId>
|
<groupId>org.apache.logging.log4j</groupId>
|
||||||
<artifactId>log4j-slf4j2-impl</artifactId>
|
<artifactId>log4j-slf4j2-impl</artifactId>
|
||||||
<version>2.24.3</version>
|
<version>2.25.3</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.logging.log4j</groupId>
|
<groupId>org.apache.logging.log4j</groupId>
|
||||||
<artifactId>log4j-core</artifactId>
|
<artifactId>log4j-core</artifactId>
|
||||||
<version>2.24.3</version>
|
<version>2.25.3</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.logging.log4j</groupId>
|
<groupId>org.apache.logging.log4j</groupId>
|
||||||
<artifactId>log4j-api</artifactId>
|
<artifactId>log4j-api</artifactId>
|
||||||
<version>2.24.3</version>
|
<version>2.25.3</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|||||||
+25
-11
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<groupId>com.lancedb</groupId>
|
<groupId>com.lancedb</groupId>
|
||||||
<artifactId>lancedb-parent</artifactId>
|
<artifactId>lancedb-parent</artifactId>
|
||||||
<version>0.24.0-beta.0</version>
|
<version>0.30.0-beta.1</version>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<name>${project.artifactId}</name>
|
<name>${project.artifactId}</name>
|
||||||
<description>LanceDB Java SDK Parent POM</description>
|
<description>LanceDB Java SDK Parent POM</description>
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
<properties>
|
<properties>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<arrow.version>15.0.0</arrow.version>
|
<arrow.version>15.0.0</arrow.version>
|
||||||
<lance-core.version>1.0.0-rc.2</lance-core.version>
|
<lance-core.version>7.1.0-beta.4</lance-core.version>
|
||||||
<spotless.skip>false</spotless.skip>
|
<spotless.skip>false</spotless.skip>
|
||||||
<spotless.version>2.30.0</spotless.version>
|
<spotless.version>2.30.0</spotless.version>
|
||||||
<spotless.java.googlejavaformat.version>1.7</spotless.java.googlejavaformat.version>
|
<spotless.java.googlejavaformat.version>1.7</spotless.java.googlejavaformat.version>
|
||||||
@@ -111,7 +111,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-source-plugin</artifactId>
|
<artifactId>maven-source-plugin</artifactId>
|
||||||
<version>2.2.1</version>
|
<version>3.3.1</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>attach-sources</id>
|
<id>attach-sources</id>
|
||||||
@@ -124,7 +124,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-javadoc-plugin</artifactId>
|
<artifactId>maven-javadoc-plugin</artifactId>
|
||||||
<version>2.9.1</version>
|
<version>3.11.2</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>attach-javadocs</id>
|
<id>attach-javadocs</id>
|
||||||
@@ -160,20 +160,33 @@
|
|||||||
<groupId>com.diffplug.spotless</groupId>
|
<groupId>com.diffplug.spotless</groupId>
|
||||||
<artifactId>spotless-maven-plugin</artifactId>
|
<artifactId>spotless-maven-plugin</artifactId>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>license-maven-plugin</artifactId>
|
||||||
|
<version>2.4.0</version>
|
||||||
|
<configuration>
|
||||||
|
<outputDirectory>${project.basedir}</outputDirectory>
|
||||||
|
<thirdPartyFilename>JAVA_THIRD_PARTY_LICENSES.md</thirdPartyFilename>
|
||||||
|
<fileTemplate>/org/codehaus/mojo/license/third-party-file-groupByLicense.ftl</fileTemplate>
|
||||||
|
<includedScopes>compile,runtime</includedScopes>
|
||||||
|
<excludedScopes>test,provided</excludedScopes>
|
||||||
|
<sortArtifactByName>true</sortArtifactByName>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
<pluginManagement>
|
<pluginManagement>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-clean-plugin</artifactId>
|
<artifactId>maven-clean-plugin</artifactId>
|
||||||
<version>3.1.0</version>
|
<version>3.4.1</version>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-resources-plugin</artifactId>
|
<artifactId>maven-resources-plugin</artifactId>
|
||||||
<version>3.0.2</version>
|
<version>3.3.1</version>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<version>3.8.1</version>
|
<version>3.14.0</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<compilerArgs>
|
<compilerArgs>
|
||||||
<arg>-h</arg>
|
<arg>-h</arg>
|
||||||
@@ -192,11 +205,11 @@
|
|||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-jar-plugin</artifactId>
|
<artifactId>maven-jar-plugin</artifactId>
|
||||||
<version>3.0.2</version>
|
<version>3.4.2</version>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-install-plugin</artifactId>
|
<artifactId>maven-install-plugin</artifactId>
|
||||||
<version>2.5.2</version>
|
<version>3.1.3</version>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>com.diffplug.spotless</groupId>
|
<groupId>com.diffplug.spotless</groupId>
|
||||||
@@ -292,11 +305,12 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.sonatype.central</groupId>
|
<groupId>org.sonatype.central</groupId>
|
||||||
<artifactId>central-publishing-maven-plugin</artifactId>
|
<artifactId>central-publishing-maven-plugin</artifactId>
|
||||||
<version>0.4.0</version>
|
<version>0.8.0</version>
|
||||||
<extensions>true</extensions>
|
<extensions>true</extensions>
|
||||||
<configuration>
|
<configuration>
|
||||||
<publishingServerId>ossrh</publishingServerId>
|
<publishingServerId>ossrh</publishingServerId>
|
||||||
<tokenAuth>true</tokenAuth>
|
<tokenAuth>true</tokenAuth>
|
||||||
|
<autoPublish>true</autoPublish>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
@@ -313,7 +327,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-gpg-plugin</artifactId>
|
<artifactId>maven-gpg-plugin</artifactId>
|
||||||
<version>1.5</version>
|
<version>3.2.7</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>sign-artifacts</id>
|
<id>sign-artifacts</id>
|
||||||
|
|||||||
+6
-6
@@ -3,11 +3,11 @@ The core Rust library is in the `../rust/lancedb` directory, the rust binding
|
|||||||
code is in the `src/` directory and the typescript bindings are in
|
code is in the `src/` directory and the typescript bindings are in
|
||||||
the `lancedb/` directory.
|
the `lancedb/` directory.
|
||||||
|
|
||||||
Whenever you change the Rust code, you will need to recompile: `npm run build`.
|
Whenever you change the Rust code, you will need to recompile: `pnpm build`.
|
||||||
|
|
||||||
Common commands:
|
Common commands:
|
||||||
* Build: `npm run build`
|
* Build: `pnpm build`
|
||||||
* Lint: `npm run lint`
|
* Lint: `pnpm lint`
|
||||||
* Fix lints: `npm run lint-fix`
|
* Fix lints: `pnpm lint-fix`
|
||||||
* Test: `npm test`
|
* Test: `pnpm test`
|
||||||
* Run single test file: `npm test __test__/arrow.test.ts`
|
* Run single test file: `pnpm test __test__/arrow.test.ts`
|
||||||
|
|||||||
+15
-13
@@ -12,20 +12,22 @@ Typescript.
|
|||||||
* `src/`: Rust bindings source code
|
* `src/`: Rust bindings source code
|
||||||
* `lancedb/`: Typescript package source code
|
* `lancedb/`: Typescript package source code
|
||||||
* `__test__/`: Unit tests
|
* `__test__/`: Unit tests
|
||||||
* `examples/`: An npm package with the examples shown in the documentation
|
* `examples/`: A pnpm package with the examples shown in the documentation
|
||||||
|
|
||||||
## Development environment
|
## Development environment
|
||||||
|
|
||||||
To set up your development environment, you will need to install the following:
|
To set up your development environment, you will need to install the following:
|
||||||
|
|
||||||
1. Node.js 14 or later
|
1. Node.js 22 or later (required by pnpm 11)
|
||||||
2. Rust's package manager, Cargo. Use [rustup](https://rustup.rs/) to install.
|
2. [pnpm](https://pnpm.io/installation) 11 or later (or run via `corepack enable`,
|
||||||
3. [protoc](https://grpc.io/docs/protoc-installation/) (Protocol Buffers compiler)
|
which uses the `packageManager` field in `package.json`)
|
||||||
|
3. Rust's package manager, Cargo. Use [rustup](https://rustup.rs/) to install.
|
||||||
|
4. [protoc](https://grpc.io/docs/protoc-installation/) (Protocol Buffers compiler)
|
||||||
|
|
||||||
Initial setup:
|
Initial setup:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
npm install
|
pnpm install
|
||||||
```
|
```
|
||||||
|
|
||||||
### Commit Hooks
|
### Commit Hooks
|
||||||
@@ -39,38 +41,38 @@ pre-commit install
|
|||||||
|
|
||||||
## Development
|
## Development
|
||||||
|
|
||||||
Most common development commands can be run using the npm scripts.
|
Most common development commands can be run using the pnpm scripts.
|
||||||
|
|
||||||
Build the package
|
Build the package
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
npm install
|
pnpm install
|
||||||
npm run build
|
pnpm build
|
||||||
```
|
```
|
||||||
|
|
||||||
Lint:
|
Lint:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
npm run lint
|
pnpm lint
|
||||||
```
|
```
|
||||||
|
|
||||||
Format and fix lints:
|
Format and fix lints:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
npm run lint-fix
|
pnpm lint-fix
|
||||||
```
|
```
|
||||||
|
|
||||||
Run tests:
|
Run tests:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
npm test
|
pnpm test
|
||||||
```
|
```
|
||||||
|
|
||||||
To run a single test:
|
To run a single test:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
# Single file: table.test.ts
|
# Single file: table.test.ts
|
||||||
npm test -- table.test.ts
|
pnpm test -- table.test.ts
|
||||||
# Single test: 'merge insert' in table.test.ts
|
# Single test: 'merge insert' in table.test.ts
|
||||||
npm test -- table.test.ts --testNamePattern=merge\ insert
|
pnpm test -- table.test.ts --testNamePattern=merge\ insert
|
||||||
```
|
```
|
||||||
|
|||||||
+12
-8
@@ -1,7 +1,8 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "lancedb-nodejs"
|
name = "lancedb-nodejs"
|
||||||
edition.workspace = true
|
edition.workspace = true
|
||||||
version = "0.24.0-beta.0"
|
version = "0.30.0-beta.1"
|
||||||
|
publish = false
|
||||||
license.workspace = true
|
license.workspace = true
|
||||||
description.workspace = true
|
description.workspace = true
|
||||||
repository.workspace = true
|
repository.workspace = true
|
||||||
@@ -15,25 +16,28 @@ crate-type = ["cdylib"]
|
|||||||
async-trait.workspace = true
|
async-trait.workspace = true
|
||||||
arrow-ipc.workspace = true
|
arrow-ipc.workspace = true
|
||||||
arrow-array.workspace = true
|
arrow-array.workspace = true
|
||||||
|
arrow-buffer = "58.0.0"
|
||||||
|
half.workspace = true
|
||||||
arrow-schema.workspace = true
|
arrow-schema.workspace = true
|
||||||
env_logger.workspace = true
|
env_logger.workspace = true
|
||||||
futures.workspace = true
|
futures.workspace = true
|
||||||
lancedb = { path = "../rust/lancedb", default-features = false }
|
lancedb = { path = "../rust/lancedb", default-features = false }
|
||||||
napi = { version = "2.16.8", default-features = false, features = [
|
lance-namespace.workspace = true
|
||||||
|
napi = { version = "3.8.3", default-features = false, features = [
|
||||||
"napi9",
|
"napi9",
|
||||||
"async"
|
"async"
|
||||||
] }
|
] }
|
||||||
napi-derive = "2.16.4"
|
napi-derive = "3.5.2"
|
||||||
# Prevent dynamic linking of lzma, which comes from datafusion
|
# Prevent dynamic linking of lzma, which comes from datafusion
|
||||||
lzma-sys = { version = "*", features = ["static"] }
|
lzma-sys = { version = "0.1", features = ["static"] }
|
||||||
log.workspace = true
|
log.workspace = true
|
||||||
|
|
||||||
# Workaround for build failure until we can fix it.
|
# Pin to resolve build failures; update periodically for security patches.
|
||||||
aws-lc-sys = "=0.28.0"
|
aws-lc-sys = "=0.40.0"
|
||||||
aws-lc-rs = "=1.13.0"
|
aws-lc-rs = "=1.16.3"
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
napi-build = "2.1"
|
napi-build = "2.3.1"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["remote", "lancedb/aws", "lancedb/gcs", "lancedb/azure", "lancedb/dynamodb", "lancedb/oss", "lancedb/huggingface"]
|
default = ["remote", "lancedb/aws", "lancedb/gcs", "lancedb/azure", "lancedb/dynamodb", "lancedb/oss", "lancedb/huggingface"]
|
||||||
|
|||||||
@@ -0,0 +1,668 @@
|
|||||||
|
[@75lb/deep-merge@1.1.2](https://github.com/75lb/deep-merge) - MIT
|
||||||
|
[@aashutoshrathi/word-wrap@1.2.6](https://github.com/aashutoshrathi/word-wrap) - MIT
|
||||||
|
[@ampproject/remapping@2.2.1](https://github.com/ampproject/remapping) - Apache-2.0
|
||||||
|
[@aws-crypto/crc32@3.0.0](https://github.com/aws/aws-sdk-js-crypto-helpers) - Apache-2.0
|
||||||
|
[@aws-crypto/crc32c@3.0.0](https://github.com/aws/aws-sdk-js-crypto-helpers) - Apache-2.0
|
||||||
|
[@aws-crypto/ie11-detection@3.0.0](https://github.com/aws/aws-sdk-js-crypto-helpers) - Apache-2.0
|
||||||
|
[@aws-crypto/sha1-browser@3.0.0](https://github.com/aws/aws-sdk-js-crypto-helpers) - Apache-2.0
|
||||||
|
[@aws-crypto/sha256-browser@3.0.0](https://github.com/aws/aws-sdk-js-crypto-helpers) - Apache-2.0
|
||||||
|
[@aws-crypto/sha256-browser@5.2.0](https://github.com/aws/aws-sdk-js-crypto-helpers) - Apache-2.0
|
||||||
|
[@aws-crypto/sha256-js@3.0.0](https://github.com/aws/aws-sdk-js-crypto-helpers) - Apache-2.0
|
||||||
|
[@aws-crypto/sha256-js@5.2.0](https://github.com/aws/aws-sdk-js-crypto-helpers) - Apache-2.0
|
||||||
|
[@aws-crypto/supports-web-crypto@3.0.0](https://github.com/aws/aws-sdk-js-crypto-helpers) - Apache-2.0
|
||||||
|
[@aws-crypto/supports-web-crypto@5.2.0](https://github.com/aws/aws-sdk-js-crypto-helpers) - Apache-2.0
|
||||||
|
[@aws-crypto/util@3.0.0](https://github.com/aws/aws-sdk-js-crypto-helpers) - Apache-2.0
|
||||||
|
[@aws-crypto/util@5.2.0](https://github.com/aws/aws-sdk-js-crypto-helpers) - Apache-2.0
|
||||||
|
[@aws-sdk/client-dynamodb@3.602.0](https://github.com/aws/aws-sdk-js-v3) - Apache-2.0
|
||||||
|
[@aws-sdk/client-kms@3.549.0](https://github.com/aws/aws-sdk-js-v3) - Apache-2.0
|
||||||
|
[@aws-sdk/client-s3@3.550.0](https://github.com/aws/aws-sdk-js-v3) - Apache-2.0
|
||||||
|
[@aws-sdk/client-sso-oidc@3.549.0](https://github.com/aws/aws-sdk-js-v3) - Apache-2.0
|
||||||
|
[@aws-sdk/client-sso-oidc@3.600.0](https://github.com/aws/aws-sdk-js-v3) - Apache-2.0
|
||||||
|
[@aws-sdk/client-sso@3.549.0](https://github.com/aws/aws-sdk-js-v3) - Apache-2.0
|
||||||
|
[@aws-sdk/client-sso@3.598.0](https://github.com/aws/aws-sdk-js-v3) - Apache-2.0
|
||||||
|
[@aws-sdk/client-sts@3.549.0](https://github.com/aws/aws-sdk-js-v3) - Apache-2.0
|
||||||
|
[@aws-sdk/client-sts@3.600.0](https://github.com/aws/aws-sdk-js-v3) - Apache-2.0
|
||||||
|
[@aws-sdk/core@3.549.0](https://github.com/aws/aws-sdk-js-v3) - Apache-2.0
|
||||||
|
[@aws-sdk/core@3.598.0](https://github.com/aws/aws-sdk-js-v3) - Apache-2.0
|
||||||
|
[@aws-sdk/credential-provider-env@3.535.0](https://github.com/aws/aws-sdk-js-v3) - Apache-2.0
|
||||||
|
[@aws-sdk/credential-provider-env@3.598.0](https://github.com/aws/aws-sdk-js-v3) - Apache-2.0
|
||||||
|
[@aws-sdk/credential-provider-http@3.535.0](https://github.com/aws/aws-sdk-js-v3) - Apache-2.0
|
||||||
|
[@aws-sdk/credential-provider-http@3.598.0](https://github.com/aws/aws-sdk-js-v3) - Apache-2.0
|
||||||
|
[@aws-sdk/credential-provider-ini@3.549.0](https://github.com/aws/aws-sdk-js-v3) - Apache-2.0
|
||||||
|
[@aws-sdk/credential-provider-ini@3.598.0](https://github.com/aws/aws-sdk-js-v3) - Apache-2.0
|
||||||
|
[@aws-sdk/credential-provider-node@3.549.0](https://github.com/aws/aws-sdk-js-v3) - Apache-2.0
|
||||||
|
[@aws-sdk/credential-provider-node@3.600.0](https://github.com/aws/aws-sdk-js-v3) - Apache-2.0
|
||||||
|
[@aws-sdk/credential-provider-process@3.535.0](https://github.com/aws/aws-sdk-js-v3) - Apache-2.0
|
||||||
|
[@aws-sdk/credential-provider-process@3.598.0](https://github.com/aws/aws-sdk-js-v3) - Apache-2.0
|
||||||
|
[@aws-sdk/credential-provider-sso@3.549.0](https://github.com/aws/aws-sdk-js-v3) - Apache-2.0
|
||||||
|
[@aws-sdk/credential-provider-sso@3.598.0](https://github.com/aws/aws-sdk-js-v3) - Apache-2.0
|
||||||
|
[@aws-sdk/credential-provider-web-identity@3.549.0](https://github.com/aws/aws-sdk-js-v3) - Apache-2.0
|
||||||
|
[@aws-sdk/credential-provider-web-identity@3.598.0](https://github.com/aws/aws-sdk-js-v3) - Apache-2.0
|
||||||
|
[@aws-sdk/endpoint-cache@3.572.0](https://github.com/aws/aws-sdk-js-v3) - Apache-2.0
|
||||||
|
[@aws-sdk/middleware-bucket-endpoint@3.535.0](https://github.com/aws/aws-sdk-js-v3) - Apache-2.0
|
||||||
|
[@aws-sdk/middleware-endpoint-discovery@3.598.0](https://github.com/aws/aws-sdk-js-v3) - Apache-2.0
|
||||||
|
[@aws-sdk/middleware-expect-continue@3.535.0](https://github.com/aws/aws-sdk-js-v3) - Apache-2.0
|
||||||
|
[@aws-sdk/middleware-flexible-checksums@3.535.0](https://github.com/aws/aws-sdk-js-v3) - Apache-2.0
|
||||||
|
[@aws-sdk/middleware-host-header@3.535.0](https://github.com/aws/aws-sdk-js-v3) - Apache-2.0
|
||||||
|
[@aws-sdk/middleware-host-header@3.598.0](https://github.com/aws/aws-sdk-js-v3) - Apache-2.0
|
||||||
|
[@aws-sdk/middleware-location-constraint@3.535.0](https://github.com/aws/aws-sdk-js-v3) - Apache-2.0
|
||||||
|
[@aws-sdk/middleware-logger@3.535.0](https://github.com/aws/aws-sdk-js-v3) - Apache-2.0
|
||||||
|
[@aws-sdk/middleware-logger@3.598.0](https://github.com/aws/aws-sdk-js-v3) - Apache-2.0
|
||||||
|
[@aws-sdk/middleware-recursion-detection@3.535.0](https://github.com/aws/aws-sdk-js-v3) - Apache-2.0
|
||||||
|
[@aws-sdk/middleware-recursion-detection@3.598.0](https://github.com/aws/aws-sdk-js-v3) - Apache-2.0
|
||||||
|
[@aws-sdk/middleware-sdk-s3@3.535.0](https://github.com/aws/aws-sdk-js-v3) - Apache-2.0
|
||||||
|
[@aws-sdk/middleware-signing@3.535.0](https://github.com/aws/aws-sdk-js-v3) - Apache-2.0
|
||||||
|
[@aws-sdk/middleware-ssec@3.537.0](https://github.com/aws/aws-sdk-js-v3) - Apache-2.0
|
||||||
|
[@aws-sdk/middleware-user-agent@3.540.0](https://github.com/aws/aws-sdk-js-v3) - Apache-2.0
|
||||||
|
[@aws-sdk/middleware-user-agent@3.598.0](https://github.com/aws/aws-sdk-js-v3) - Apache-2.0
|
||||||
|
[@aws-sdk/region-config-resolver@3.535.0](https://github.com/aws/aws-sdk-js-v3) - Apache-2.0
|
||||||
|
[@aws-sdk/region-config-resolver@3.598.0](https://github.com/aws/aws-sdk-js-v3) - Apache-2.0
|
||||||
|
[@aws-sdk/signature-v4-multi-region@3.535.0](https://github.com/aws/aws-sdk-js-v3) - Apache-2.0
|
||||||
|
[@aws-sdk/token-providers@3.549.0](https://github.com/aws/aws-sdk-js-v3) - Apache-2.0
|
||||||
|
[@aws-sdk/token-providers@3.598.0](https://github.com/aws/aws-sdk-js-v3) - Apache-2.0
|
||||||
|
[@aws-sdk/types@3.535.0](https://github.com/aws/aws-sdk-js-v3) - Apache-2.0
|
||||||
|
[@aws-sdk/types@3.598.0](https://github.com/aws/aws-sdk-js-v3) - Apache-2.0
|
||||||
|
[@aws-sdk/util-arn-parser@3.535.0](https://github.com/aws/aws-sdk-js-v3) - Apache-2.0
|
||||||
|
[@aws-sdk/util-endpoints@3.540.0](https://github.com/aws/aws-sdk-js-v3) - Apache-2.0
|
||||||
|
[@aws-sdk/util-endpoints@3.598.0](https://github.com/aws/aws-sdk-js-v3) - Apache-2.0
|
||||||
|
[@aws-sdk/util-locate-window@3.535.0](https://github.com/aws/aws-sdk-js-v3) - Apache-2.0
|
||||||
|
[@aws-sdk/util-user-agent-browser@3.535.0](https://github.com/aws/aws-sdk-js-v3) - Apache-2.0
|
||||||
|
[@aws-sdk/util-user-agent-browser@3.598.0](https://github.com/aws/aws-sdk-js-v3) - Apache-2.0
|
||||||
|
[@aws-sdk/util-user-agent-node@3.535.0](https://github.com/aws/aws-sdk-js-v3) - Apache-2.0
|
||||||
|
[@aws-sdk/util-user-agent-node@3.598.0](https://github.com/aws/aws-sdk-js-v3) - Apache-2.0
|
||||||
|
[@aws-sdk/util-utf8-browser@3.259.0](https://github.com/aws/aws-sdk-js-v3) - Apache-2.0
|
||||||
|
[@aws-sdk/xml-builder@3.535.0](https://github.com/aws/aws-sdk-js-v3) - Apache-2.0
|
||||||
|
[@babel/code-frame@7.26.2](https://github.com/babel/babel) - MIT
|
||||||
|
[@babel/compat-data@7.23.5](https://github.com/babel/babel) - MIT
|
||||||
|
[@babel/core@7.23.7](https://github.com/babel/babel) - MIT
|
||||||
|
[@babel/generator@7.23.6](https://github.com/babel/babel) - MIT
|
||||||
|
[@babel/helper-compilation-targets@7.23.6](https://github.com/babel/babel) - MIT
|
||||||
|
[@babel/helper-environment-visitor@7.22.20](https://github.com/babel/babel) - MIT
|
||||||
|
[@babel/helper-function-name@7.23.0](https://github.com/babel/babel) - MIT
|
||||||
|
[@babel/helper-hoist-variables@7.22.5](https://github.com/babel/babel) - MIT
|
||||||
|
[@babel/helper-module-imports@7.22.15](https://github.com/babel/babel) - MIT
|
||||||
|
[@babel/helper-module-transforms@7.23.3](https://github.com/babel/babel) - MIT
|
||||||
|
[@babel/helper-plugin-utils@7.22.5](https://github.com/babel/babel) - MIT
|
||||||
|
[@babel/helper-simple-access@7.22.5](https://github.com/babel/babel) - MIT
|
||||||
|
[@babel/helper-split-export-declaration@7.22.6](https://github.com/babel/babel) - MIT
|
||||||
|
[@babel/helper-string-parser@7.25.9](https://github.com/babel/babel) - MIT
|
||||||
|
[@babel/helper-validator-identifier@7.25.9](https://github.com/babel/babel) - MIT
|
||||||
|
[@babel/helper-validator-option@7.23.5](https://github.com/babel/babel) - MIT
|
||||||
|
[@babel/helpers@7.27.0](https://github.com/babel/babel) - MIT
|
||||||
|
[@babel/parser@7.27.0](https://github.com/babel/babel) - MIT
|
||||||
|
[@babel/plugin-syntax-async-generators@7.8.4](https://github.com/babel/babel/tree/master/packages/babel-plugin-syntax-async-generators) - MIT
|
||||||
|
[@babel/plugin-syntax-bigint@7.8.3](https://github.com/babel/babel/tree/master/packages/babel-plugin-syntax-bigint) - MIT
|
||||||
|
[@babel/plugin-syntax-class-properties@7.12.13](https://github.com/babel/babel) - MIT
|
||||||
|
[@babel/plugin-syntax-import-meta@7.10.4](https://github.com/babel/babel) - MIT
|
||||||
|
[@babel/plugin-syntax-json-strings@7.8.3](https://github.com/babel/babel/tree/master/packages/babel-plugin-syntax-json-strings) - MIT
|
||||||
|
[@babel/plugin-syntax-jsx@7.23.3](https://github.com/babel/babel) - MIT
|
||||||
|
[@babel/plugin-syntax-logical-assignment-operators@7.10.4](https://github.com/babel/babel) - MIT
|
||||||
|
[@babel/plugin-syntax-nullish-coalescing-operator@7.8.3](https://github.com/babel/babel/tree/master/packages/babel-plugin-syntax-nullish-coalescing-operator) - MIT
|
||||||
|
[@babel/plugin-syntax-numeric-separator@7.10.4](https://github.com/babel/babel) - MIT
|
||||||
|
[@babel/plugin-syntax-object-rest-spread@7.8.3](https://github.com/babel/babel/tree/master/packages/babel-plugin-syntax-object-rest-spread) - MIT
|
||||||
|
[@babel/plugin-syntax-optional-catch-binding@7.8.3](https://github.com/babel/babel/tree/master/packages/babel-plugin-syntax-optional-catch-binding) - MIT
|
||||||
|
[@babel/plugin-syntax-optional-chaining@7.8.3](https://github.com/babel/babel/tree/master/packages/babel-plugin-syntax-optional-chaining) - MIT
|
||||||
|
[@babel/plugin-syntax-top-level-await@7.14.5](https://github.com/babel/babel) - MIT
|
||||||
|
[@babel/plugin-syntax-typescript@7.23.3](https://github.com/babel/babel) - MIT
|
||||||
|
[@babel/template@7.27.0](https://github.com/babel/babel) - MIT
|
||||||
|
[@babel/traverse@7.23.7](https://github.com/babel/babel) - MIT
|
||||||
|
[@babel/types@7.27.0](https://github.com/babel/babel) - MIT
|
||||||
|
[@bcoe/v8-coverage@0.2.3](https://github.com/demurgos/v8-coverage) - MIT
|
||||||
|
[@biomejs/biome@1.8.3](https://github.com/biomejs/biome) - MIT OR Apache-2.0
|
||||||
|
[@biomejs/cli-darwin-arm64@1.8.3](https://github.com/biomejs/biome) - MIT OR Apache-2.0
|
||||||
|
[@eslint-community/eslint-utils@4.4.0](https://github.com/eslint-community/eslint-utils) - MIT
|
||||||
|
[@eslint-community/regexpp@4.10.0](https://github.com/eslint-community/regexpp) - MIT
|
||||||
|
[@eslint/eslintrc@2.1.4](https://github.com/eslint/eslintrc) - MIT
|
||||||
|
[@eslint/js@8.57.0](https://github.com/eslint/eslint) - MIT
|
||||||
|
[@huggingface/jinja@0.3.2](https://github.com/huggingface/huggingface.js) - MIT
|
||||||
|
[@huggingface/transformers@3.0.2](https://github.com/huggingface/transformers.js) - Apache-2.0
|
||||||
|
[@humanwhocodes/config-array@0.11.14](https://github.com/humanwhocodes/config-array) - Apache-2.0
|
||||||
|
[@humanwhocodes/module-importer@1.0.1](https://github.com/humanwhocodes/module-importer) - Apache-2.0
|
||||||
|
[@humanwhocodes/object-schema@2.0.2](https://github.com/humanwhocodes/object-schema) - BSD-3-Clause
|
||||||
|
[@img/sharp-darwin-arm64@0.33.5](https://github.com/lovell/sharp) - Apache-2.0
|
||||||
|
[@img/sharp-libvips-darwin-arm64@1.0.4](https://github.com/lovell/sharp-libvips) - LGPL-3.0-or-later
|
||||||
|
[@isaacs/cliui@8.0.2](https://github.com/yargs/cliui) - ISC
|
||||||
|
[@isaacs/fs-minipass@4.0.1](https://github.com/npm/fs-minipass) - ISC
|
||||||
|
[@istanbuljs/load-nyc-config@1.1.0](https://github.com/istanbuljs/load-nyc-config) - ISC
|
||||||
|
[@istanbuljs/schema@0.1.3](https://github.com/istanbuljs/schema) - MIT
|
||||||
|
[@jest/console@29.7.0](https://github.com/jestjs/jest) - MIT
|
||||||
|
[@jest/core@29.7.0](https://github.com/jestjs/jest) - MIT
|
||||||
|
[@jest/environment@29.7.0](https://github.com/jestjs/jest) - MIT
|
||||||
|
[@jest/expect-utils@29.7.0](https://github.com/jestjs/jest) - MIT
|
||||||
|
[@jest/expect@29.7.0](https://github.com/jestjs/jest) - MIT
|
||||||
|
[@jest/fake-timers@29.7.0](https://github.com/jestjs/jest) - MIT
|
||||||
|
[@jest/globals@29.7.0](https://github.com/jestjs/jest) - MIT
|
||||||
|
[@jest/reporters@29.7.0](https://github.com/jestjs/jest) - MIT
|
||||||
|
[@jest/schemas@29.6.3](https://github.com/jestjs/jest) - MIT
|
||||||
|
[@jest/source-map@29.6.3](https://github.com/jestjs/jest) - MIT
|
||||||
|
[@jest/test-result@29.7.0](https://github.com/jestjs/jest) - MIT
|
||||||
|
[@jest/test-sequencer@29.7.0](https://github.com/jestjs/jest) - MIT
|
||||||
|
[@jest/transform@29.7.0](https://github.com/jestjs/jest) - MIT
|
||||||
|
[@jest/types@29.6.3](https://github.com/jestjs/jest) - MIT
|
||||||
|
[@jridgewell/gen-mapping@0.3.3](https://github.com/jridgewell/gen-mapping) - MIT
|
||||||
|
[@jridgewell/resolve-uri@3.1.1](https://github.com/jridgewell/resolve-uri) - MIT
|
||||||
|
[@jridgewell/set-array@1.1.2](https://github.com/jridgewell/set-array) - MIT
|
||||||
|
[@jridgewell/sourcemap-codec@1.4.15](https://github.com/jridgewell/sourcemap-codec) - MIT
|
||||||
|
[@jridgewell/trace-mapping@0.3.22](https://github.com/jridgewell/trace-mapping) - MIT
|
||||||
|
[@lancedb/lancedb@0.26.2](https://github.com/lancedb/lancedb) - Apache-2.0
|
||||||
|
[@napi-rs/cli@2.18.3](https://github.com/napi-rs/napi-rs) - MIT
|
||||||
|
[@nodelib/fs.scandir@2.1.5](https://github.com/nodelib/nodelib/tree/master/packages/fs/fs.scandir) - MIT
|
||||||
|
[@nodelib/fs.stat@2.0.5](https://github.com/nodelib/nodelib/tree/master/packages/fs/fs.stat) - MIT
|
||||||
|
[@nodelib/fs.walk@1.2.8](https://github.com/nodelib/nodelib/tree/master/packages/fs/fs.walk) - MIT
|
||||||
|
[@pkgjs/parseargs@0.11.0](https://github.com/pkgjs/parseargs) - MIT
|
||||||
|
[@protobufjs/aspromise@1.1.2](https://github.com/dcodeIO/protobuf.js) - BSD-3-Clause
|
||||||
|
[@protobufjs/base64@1.1.2](https://github.com/dcodeIO/protobuf.js) - BSD-3-Clause
|
||||||
|
[@protobufjs/codegen@2.0.4](https://github.com/dcodeIO/protobuf.js) - BSD-3-Clause
|
||||||
|
[@protobufjs/eventemitter@1.1.0](https://github.com/dcodeIO/protobuf.js) - BSD-3-Clause
|
||||||
|
[@protobufjs/fetch@1.1.0](https://github.com/dcodeIO/protobuf.js) - BSD-3-Clause
|
||||||
|
[@protobufjs/float@1.0.2](https://github.com/dcodeIO/protobuf.js) - BSD-3-Clause
|
||||||
|
[@protobufjs/inquire@1.1.0](https://github.com/dcodeIO/protobuf.js) - BSD-3-Clause
|
||||||
|
[@protobufjs/path@1.1.2](https://github.com/dcodeIO/protobuf.js) - BSD-3-Clause
|
||||||
|
[@protobufjs/pool@1.1.0](https://github.com/dcodeIO/protobuf.js) - BSD-3-Clause
|
||||||
|
[@protobufjs/utf8@1.1.0](https://github.com/dcodeIO/protobuf.js) - BSD-3-Clause
|
||||||
|
[@shikijs/core@1.10.3](https://github.com/shikijs/shiki) - MIT
|
||||||
|
[@sinclair/typebox@0.27.8](https://github.com/sinclairzx81/typebox) - MIT
|
||||||
|
[@sinonjs/commons@3.0.1](https://github.com/sinonjs/commons) - BSD-3-Clause
|
||||||
|
[@sinonjs/fake-timers@10.3.0](https://github.com/sinonjs/fake-timers) - BSD-3-Clause
|
||||||
|
[@smithy/abort-controller@2.2.0](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/abort-controller@3.1.0](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/chunked-blob-reader-native@2.2.0](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/chunked-blob-reader@2.2.0](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/config-resolver@2.2.0](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/config-resolver@3.0.3](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/core@1.4.2](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/core@2.2.3](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/credential-provider-imds@2.3.0](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/credential-provider-imds@3.1.2](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/eventstream-codec@2.2.0](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/eventstream-serde-browser@2.2.0](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/eventstream-serde-config-resolver@2.2.0](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/eventstream-serde-node@2.2.0](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/eventstream-serde-universal@2.2.0](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/fetch-http-handler@2.5.0](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/fetch-http-handler@3.1.0](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/hash-blob-browser@2.2.0](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/hash-node@2.2.0](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/hash-node@3.0.2](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/hash-stream-node@2.2.0](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/invalid-dependency@2.2.0](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/invalid-dependency@3.0.2](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/is-array-buffer@2.2.0](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/is-array-buffer@3.0.0](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/md5-js@2.2.0](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/middleware-content-length@2.2.0](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/middleware-content-length@3.0.2](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/middleware-endpoint@2.5.1](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/middleware-endpoint@3.0.3](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/middleware-retry@2.3.1](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/middleware-retry@3.0.6](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/middleware-serde@2.3.0](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/middleware-serde@3.0.2](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/middleware-stack@2.2.0](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/middleware-stack@3.0.2](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/node-config-provider@2.3.0](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/node-config-provider@3.1.2](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/node-http-handler@2.5.0](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/node-http-handler@3.1.0](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/property-provider@2.2.0](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/property-provider@3.1.2](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/protocol-http@3.3.0](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/protocol-http@4.0.2](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/querystring-builder@2.2.0](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/querystring-builder@3.0.2](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/querystring-parser@2.2.0](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/querystring-parser@3.0.2](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/service-error-classification@2.1.5](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/service-error-classification@3.0.2](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/shared-ini-file-loader@2.4.0](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/shared-ini-file-loader@3.1.2](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/signature-v4@2.2.1](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/signature-v4@3.1.1](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/smithy-client@2.5.1](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/smithy-client@3.1.4](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/types@2.12.0](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/types@3.2.0](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/url-parser@2.2.0](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/url-parser@3.0.2](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/util-base64@2.3.0](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/util-base64@3.0.0](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/util-body-length-browser@2.2.0](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/util-body-length-browser@3.0.0](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/util-body-length-node@2.3.0](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/util-body-length-node@3.0.0](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/util-buffer-from@2.2.0](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/util-buffer-from@3.0.0](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/util-config-provider@2.3.0](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/util-config-provider@3.0.0](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/util-defaults-mode-browser@2.2.1](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/util-defaults-mode-browser@3.0.6](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/util-defaults-mode-node@2.3.1](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/util-defaults-mode-node@3.0.6](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/util-endpoints@1.2.0](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/util-endpoints@2.0.3](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/util-hex-encoding@2.2.0](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/util-hex-encoding@3.0.0](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/util-middleware@2.2.0](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/util-middleware@3.0.2](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/util-retry@2.2.0](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/util-retry@3.0.2](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/util-stream@2.2.0](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/util-stream@3.0.4](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/util-uri-escape@2.2.0](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/util-uri-escape@3.0.0](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/util-utf8@2.3.0](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/util-utf8@3.0.0](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/util-waiter@2.2.0](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@smithy/util-waiter@3.1.1](https://github.com/awslabs/smithy-typescript) - Apache-2.0
|
||||||
|
[@swc/helpers@0.5.12](https://github.com/swc-project/swc) - Apache-2.0
|
||||||
|
[@types/axios@0.14.0](https://github.com/mzabriskie/axios) - MIT
|
||||||
|
[@types/babel__core@7.20.5](https://github.com/DefinitelyTyped/DefinitelyTyped) - MIT
|
||||||
|
[@types/babel__generator@7.6.8](https://github.com/DefinitelyTyped/DefinitelyTyped) - MIT
|
||||||
|
[@types/babel__template@7.4.4](https://github.com/DefinitelyTyped/DefinitelyTyped) - MIT
|
||||||
|
[@types/babel__traverse@7.20.5](https://github.com/DefinitelyTyped/DefinitelyTyped) - MIT
|
||||||
|
[@types/command-line-args@5.2.3](https://github.com/DefinitelyTyped/DefinitelyTyped) - MIT
|
||||||
|
[@types/command-line-usage@5.0.2](https://github.com/DefinitelyTyped/DefinitelyTyped) - MIT
|
||||||
|
[@types/command-line-usage@5.0.4](https://github.com/DefinitelyTyped/DefinitelyTyped) - MIT
|
||||||
|
[@types/graceful-fs@4.1.9](https://github.com/DefinitelyTyped/DefinitelyTyped) - MIT
|
||||||
|
[@types/hast@3.0.4](https://github.com/DefinitelyTyped/DefinitelyTyped) - MIT
|
||||||
|
[@types/istanbul-lib-coverage@2.0.6](https://github.com/DefinitelyTyped/DefinitelyTyped) - MIT
|
||||||
|
[@types/istanbul-lib-report@3.0.3](https://github.com/DefinitelyTyped/DefinitelyTyped) - MIT
|
||||||
|
[@types/istanbul-reports@3.0.4](https://github.com/DefinitelyTyped/DefinitelyTyped) - MIT
|
||||||
|
[@types/jest@29.5.12](https://github.com/DefinitelyTyped/DefinitelyTyped) - MIT
|
||||||
|
[@types/json-schema@7.0.15](https://github.com/DefinitelyTyped/DefinitelyTyped) - MIT
|
||||||
|
[@types/node-fetch@2.6.11](https://github.com/DefinitelyTyped/DefinitelyTyped) - MIT
|
||||||
|
[@types/node@18.19.26](https://github.com/DefinitelyTyped/DefinitelyTyped) - MIT
|
||||||
|
[@types/node@20.16.10](https://github.com/DefinitelyTyped/DefinitelyTyped) - MIT
|
||||||
|
[@types/node@20.17.9](https://github.com/DefinitelyTyped/DefinitelyTyped) - MIT
|
||||||
|
[@types/node@22.7.4](https://github.com/DefinitelyTyped/DefinitelyTyped) - MIT
|
||||||
|
[@types/semver@7.5.6](https://github.com/DefinitelyTyped/DefinitelyTyped) - MIT
|
||||||
|
[@types/stack-utils@2.0.3](https://github.com/DefinitelyTyped/DefinitelyTyped) - MIT
|
||||||
|
[@types/tmp@0.2.6](https://github.com/DefinitelyTyped/DefinitelyTyped) - MIT
|
||||||
|
[@types/unist@3.0.2](https://github.com/DefinitelyTyped/DefinitelyTyped) - MIT
|
||||||
|
[@types/yargs-parser@21.0.3](https://github.com/DefinitelyTyped/DefinitelyTyped) - MIT
|
||||||
|
[@types/yargs@17.0.32](https://github.com/DefinitelyTyped/DefinitelyTyped) - MIT
|
||||||
|
[@typescript-eslint/eslint-plugin@7.1.0](https://github.com/typescript-eslint/typescript-eslint) - MIT
|
||||||
|
[@typescript-eslint/parser@7.1.0](https://github.com/typescript-eslint/typescript-eslint) - BSD-2-Clause
|
||||||
|
[@typescript-eslint/scope-manager@7.1.0](https://github.com/typescript-eslint/typescript-eslint) - MIT
|
||||||
|
[@typescript-eslint/type-utils@7.1.0](https://github.com/typescript-eslint/typescript-eslint) - MIT
|
||||||
|
[@typescript-eslint/types@7.1.0](https://github.com/typescript-eslint/typescript-eslint) - MIT
|
||||||
|
[@typescript-eslint/typescript-estree@7.1.0](https://github.com/typescript-eslint/typescript-eslint) - BSD-2-Clause
|
||||||
|
[@typescript-eslint/utils@7.1.0](https://github.com/typescript-eslint/typescript-eslint) - MIT
|
||||||
|
[@typescript-eslint/visitor-keys@7.1.0](https://github.com/typescript-eslint/typescript-eslint) - MIT
|
||||||
|
[@ungap/structured-clone@1.2.0](https://github.com/ungap/structured-clone) - ISC
|
||||||
|
[abort-controller@3.0.0](https://github.com/mysticatea/abort-controller) - MIT
|
||||||
|
[acorn-jsx@5.3.2](https://github.com/acornjs/acorn-jsx) - MIT
|
||||||
|
[acorn@8.11.3](https://github.com/acornjs/acorn) - MIT
|
||||||
|
[agentkeepalive@4.5.0](https://github.com/node-modules/agentkeepalive) - MIT
|
||||||
|
[ajv@6.12.6](https://github.com/ajv-validator/ajv) - MIT
|
||||||
|
[ansi-escapes@4.3.2](https://github.com/sindresorhus/ansi-escapes) - MIT
|
||||||
|
[ansi-regex@5.0.1](https://github.com/chalk/ansi-regex) - MIT
|
||||||
|
[ansi-regex@6.1.0](https://github.com/chalk/ansi-regex) - MIT
|
||||||
|
[ansi-styles@4.3.0](https://github.com/chalk/ansi-styles) - MIT
|
||||||
|
[ansi-styles@5.2.0](https://github.com/chalk/ansi-styles) - MIT
|
||||||
|
[ansi-styles@6.2.1](https://github.com/chalk/ansi-styles) - MIT
|
||||||
|
[anymatch@3.1.3](https://github.com/micromatch/anymatch) - ISC
|
||||||
|
[apache-arrow@15.0.0](https://github.com/apache/arrow) - Apache-2.0
|
||||||
|
[apache-arrow@16.0.0](https://github.com/apache/arrow) - Apache-2.0
|
||||||
|
[apache-arrow@17.0.0](https://github.com/apache/arrow) - Apache-2.0
|
||||||
|
[apache-arrow@18.0.0](https://github.com/apache/arrow) - Apache-2.0
|
||||||
|
[argparse@1.0.10](https://github.com/nodeca/argparse) - MIT
|
||||||
|
[argparse@2.0.1](https://github.com/nodeca/argparse) - Python-2.0
|
||||||
|
[array-back@3.1.0](https://github.com/75lb/array-back) - MIT
|
||||||
|
[array-back@6.2.2](https://github.com/75lb/array-back) - MIT
|
||||||
|
[array-union@2.1.0](https://github.com/sindresorhus/array-union) - MIT
|
||||||
|
[asynckit@0.4.0](https://github.com/alexindigo/asynckit) - MIT
|
||||||
|
[axios@1.8.4](https://github.com/axios/axios) - MIT
|
||||||
|
[babel-jest@29.7.0](https://github.com/jestjs/jest) - MIT
|
||||||
|
[babel-plugin-istanbul@6.1.1](https://github.com/istanbuljs/babel-plugin-istanbul) - BSD-3-Clause
|
||||||
|
[babel-plugin-jest-hoist@29.6.3](https://github.com/jestjs/jest) - MIT
|
||||||
|
[babel-preset-current-node-syntax@1.0.1](https://github.com/nicolo-ribaudo/babel-preset-current-node-syntax) - MIT
|
||||||
|
[babel-preset-jest@29.6.3](https://github.com/jestjs/jest) - MIT
|
||||||
|
[balanced-match@1.0.2](https://github.com/juliangruber/balanced-match) - MIT
|
||||||
|
[base-64@0.1.0](https://github.com/mathiasbynens/base64) - MIT
|
||||||
|
[bowser@2.11.0](https://github.com/lancedikson/bowser) - MIT
|
||||||
|
[brace-expansion@1.1.11](https://github.com/juliangruber/brace-expansion) - MIT
|
||||||
|
[brace-expansion@2.0.1](https://github.com/juliangruber/brace-expansion) - MIT
|
||||||
|
[braces@3.0.3](https://github.com/micromatch/braces) - MIT
|
||||||
|
[browserslist@4.22.2](https://github.com/browserslist/browserslist) - MIT
|
||||||
|
[bs-logger@0.2.6](https://github.com/huafu/bs-logger) - MIT
|
||||||
|
[bser@2.1.1](https://github.com/facebook/watchman) - Apache-2.0
|
||||||
|
[buffer-from@1.1.2](https://github.com/LinusU/buffer-from) - MIT
|
||||||
|
[callsites@3.1.0](https://github.com/sindresorhus/callsites) - MIT
|
||||||
|
[camelcase@5.3.1](https://github.com/sindresorhus/camelcase) - MIT
|
||||||
|
[camelcase@6.3.0](https://github.com/sindresorhus/camelcase) - MIT
|
||||||
|
[caniuse-lite@1.0.30001579](https://github.com/browserslist/caniuse-lite) - CC-BY-4.0
|
||||||
|
[chalk-template@0.4.0](https://github.com/chalk/chalk-template) - MIT
|
||||||
|
[chalk@4.1.2](https://github.com/chalk/chalk) - MIT
|
||||||
|
[char-regex@1.0.2](https://github.com/Richienb/char-regex) - MIT
|
||||||
|
[charenc@0.0.2](https://github.com/pvorb/node-charenc) - BSD-3-Clause
|
||||||
|
[chownr@3.0.0](https://github.com/isaacs/chownr) - BlueOak-1.0.0
|
||||||
|
[ci-info@3.9.0](https://github.com/watson/ci-info) - MIT
|
||||||
|
[cjs-module-lexer@1.2.3](https://github.com/nodejs/cjs-module-lexer) - MIT
|
||||||
|
[cliui@8.0.1](https://github.com/yargs/cliui) - ISC
|
||||||
|
[co@4.6.0](https://github.com/tj/co) - MIT
|
||||||
|
[collect-v8-coverage@1.0.2](https://github.com/SimenB/collect-v8-coverage) - MIT
|
||||||
|
[color-convert@2.0.1](https://github.com/Qix-/color-convert) - MIT
|
||||||
|
[color-name@1.1.4](https://github.com/colorjs/color-name) - MIT
|
||||||
|
[color-string@1.9.1](https://github.com/Qix-/color-string) - MIT
|
||||||
|
[color@4.2.3](https://github.com/Qix-/color) - MIT
|
||||||
|
[combined-stream@1.0.8](https://github.com/felixge/node-combined-stream) - MIT
|
||||||
|
[command-line-args@5.2.1](https://github.com/75lb/command-line-args) - MIT
|
||||||
|
[command-line-usage@7.0.1](https://github.com/75lb/command-line-usage) - MIT
|
||||||
|
[concat-map@0.0.1](https://github.com/substack/node-concat-map) - MIT
|
||||||
|
[convert-source-map@2.0.0](https://github.com/thlorenz/convert-source-map) - MIT
|
||||||
|
[create-jest@29.7.0](https://github.com/jestjs/jest) - MIT
|
||||||
|
[cross-spawn@7.0.6](https://github.com/moxystudio/node-cross-spawn) - MIT
|
||||||
|
[crypt@0.0.2](https://github.com/pvorb/node-crypt) - BSD-3-Clause
|
||||||
|
[debug@4.3.4](https://github.com/debug-js/debug) - MIT
|
||||||
|
[dedent@1.5.1](https://github.com/dmnd/dedent) - MIT
|
||||||
|
[deep-is@0.1.4](https://github.com/thlorenz/deep-is) - MIT
|
||||||
|
[deepmerge@4.3.1](https://github.com/TehShrike/deepmerge) - MIT
|
||||||
|
[delayed-stream@1.0.0](https://github.com/felixge/node-delayed-stream) - MIT
|
||||||
|
[detect-libc@2.0.3](https://github.com/lovell/detect-libc) - Apache-2.0
|
||||||
|
[detect-newline@3.1.0](https://github.com/sindresorhus/detect-newline) - MIT
|
||||||
|
[diff-sequences@29.6.3](https://github.com/jestjs/jest) - MIT
|
||||||
|
[digest-fetch@1.3.0](https://github.com/devfans/digest-fetch) - ISC
|
||||||
|
[dir-glob@3.0.1](https://github.com/kevva/dir-glob) - MIT
|
||||||
|
[doctrine@3.0.0](https://github.com/eslint/doctrine) - Apache-2.0
|
||||||
|
[eastasianwidth@0.2.0](https://github.com/komagata/eastasianwidth) - MIT
|
||||||
|
[electron-to-chromium@1.4.642](https://github.com/kilian/electron-to-chromium) - ISC
|
||||||
|
[emittery@0.13.1](https://github.com/sindresorhus/emittery) - MIT
|
||||||
|
[emoji-regex@8.0.0](https://github.com/mathiasbynens/emoji-regex) - MIT
|
||||||
|
[emoji-regex@9.2.2](https://github.com/mathiasbynens/emoji-regex) - MIT
|
||||||
|
[entities@4.5.0](https://github.com/fb55/entities) - BSD-2-Clause
|
||||||
|
[error-ex@1.3.2](https://github.com/qix-/node-error-ex) - MIT
|
||||||
|
[escalade@3.1.1](https://github.com/lukeed/escalade) - MIT
|
||||||
|
[escape-string-regexp@2.0.0](https://github.com/sindresorhus/escape-string-regexp) - MIT
|
||||||
|
[escape-string-regexp@4.0.0](https://github.com/sindresorhus/escape-string-regexp) - MIT
|
||||||
|
[eslint-scope@7.2.2](https://github.com/eslint/eslint-scope) - BSD-2-Clause
|
||||||
|
[eslint-visitor-keys@3.4.3](https://github.com/eslint/eslint-visitor-keys) - Apache-2.0
|
||||||
|
[eslint@8.57.0](https://github.com/eslint/eslint) - MIT
|
||||||
|
[espree@9.6.1](https://github.com/eslint/espree) - BSD-2-Clause
|
||||||
|
[esprima@4.0.1](https://github.com/jquery/esprima) - BSD-2-Clause
|
||||||
|
[esquery@1.5.0](https://github.com/estools/esquery) - BSD-3-Clause
|
||||||
|
[esrecurse@4.3.0](https://github.com/estools/esrecurse) - BSD-2-Clause
|
||||||
|
[estraverse@5.3.0](https://github.com/estools/estraverse) - BSD-2-Clause
|
||||||
|
[esutils@2.0.3](https://github.com/estools/esutils) - BSD-2-Clause
|
||||||
|
[event-target-shim@5.0.1](https://github.com/mysticatea/event-target-shim) - MIT
|
||||||
|
[execa@5.1.1](https://github.com/sindresorhus/execa) - MIT
|
||||||
|
[exit@0.1.2](https://github.com/cowboy/node-exit) - MIT
|
||||||
|
[expect@29.7.0](https://github.com/jestjs/jest) - MIT
|
||||||
|
[fast-deep-equal@3.1.3](https://github.com/epoberezkin/fast-deep-equal) - MIT
|
||||||
|
[fast-glob@3.3.2](https://github.com/mrmlnc/fast-glob) - MIT
|
||||||
|
[fast-json-stable-stringify@2.1.0](https://github.com/epoberezkin/fast-json-stable-stringify) - MIT
|
||||||
|
[fast-levenshtein@2.0.6](https://github.com/hiddentao/fast-levenshtein) - MIT
|
||||||
|
[fast-xml-parser@4.2.5](https://github.com/NaturalIntelligence/fast-xml-parser) - MIT
|
||||||
|
[fastq@1.16.0](https://github.com/mcollina/fastq) - ISC
|
||||||
|
[fb-watchman@2.0.2](https://github.com/facebook/watchman) - Apache-2.0
|
||||||
|
[file-entry-cache@6.0.1](https://github.com/royriojas/file-entry-cache) - MIT
|
||||||
|
[fill-range@7.1.1](https://github.com/jonschlinkert/fill-range) - MIT
|
||||||
|
[find-replace@3.0.0](https://github.com/75lb/find-replace) - MIT
|
||||||
|
[find-up@4.1.0](https://github.com/sindresorhus/find-up) - MIT
|
||||||
|
[find-up@5.0.0](https://github.com/sindresorhus/find-up) - MIT
|
||||||
|
[flat-cache@3.2.0](https://github.com/jaredwray/flat-cache) - MIT
|
||||||
|
[flatbuffers@1.12.0](https://github.com/google/flatbuffers) - Apache*
|
||||||
|
[flatbuffers@23.5.26](https://github.com/google/flatbuffers) - Apache*
|
||||||
|
[flatbuffers@24.3.25](https://github.com/google/flatbuffers) - Apache-2.0
|
||||||
|
[flatted@3.2.9](https://github.com/WebReflection/flatted) - ISC
|
||||||
|
[follow-redirects@1.15.6](https://github.com/follow-redirects/follow-redirects) - MIT
|
||||||
|
[foreground-child@3.3.0](https://github.com/tapjs/foreground-child) - ISC
|
||||||
|
[form-data-encoder@1.7.2](https://github.com/octet-stream/form-data-encoder) - MIT
|
||||||
|
[form-data@4.0.0](https://github.com/form-data/form-data) - MIT
|
||||||
|
[formdata-node@4.4.1](https://github.com/octet-stream/form-data) - MIT
|
||||||
|
[fs.realpath@1.0.0](https://github.com/isaacs/fs.realpath) - ISC
|
||||||
|
[fsevents@2.3.3](https://github.com/fsevents/fsevents) - MIT
|
||||||
|
[function-bind@1.1.2](https://github.com/Raynos/function-bind) - MIT
|
||||||
|
[gensync@1.0.0-beta.2](https://github.com/loganfsmyth/gensync) - MIT
|
||||||
|
[get-caller-file@2.0.5](https://github.com/stefanpenner/get-caller-file) - ISC
|
||||||
|
[get-package-type@0.1.0](https://github.com/cfware/get-package-type) - MIT
|
||||||
|
[get-stream@6.0.1](https://github.com/sindresorhus/get-stream) - MIT
|
||||||
|
[glob-parent@5.1.2](https://github.com/gulpjs/glob-parent) - ISC
|
||||||
|
[glob-parent@6.0.2](https://github.com/gulpjs/glob-parent) - ISC
|
||||||
|
[glob@10.4.5](https://github.com/isaacs/node-glob) - ISC
|
||||||
|
[glob@7.2.3](https://github.com/isaacs/node-glob) - ISC
|
||||||
|
[globals@11.12.0](https://github.com/sindresorhus/globals) - MIT
|
||||||
|
[globals@13.24.0](https://github.com/sindresorhus/globals) - MIT
|
||||||
|
[globby@11.1.0](https://github.com/sindresorhus/globby) - MIT
|
||||||
|
[graceful-fs@4.2.11](https://github.com/isaacs/node-graceful-fs) - ISC
|
||||||
|
[graphemer@1.4.0](https://github.com/flmnt/graphemer) - MIT
|
||||||
|
[guid-typescript@1.0.9](https://github.com/NicolasDeveloper/guid-typescript) - ISC
|
||||||
|
[has-flag@4.0.0](https://github.com/sindresorhus/has-flag) - MIT
|
||||||
|
[hasown@2.0.0](https://github.com/inspect-js/hasOwn) - MIT
|
||||||
|
[html-escaper@2.0.2](https://github.com/WebReflection/html-escaper) - MIT
|
||||||
|
[human-signals@2.1.0](https://github.com/ehmicky/human-signals) - Apache-2.0
|
||||||
|
[humanize-ms@1.2.1](https://github.com/node-modules/humanize-ms) - MIT
|
||||||
|
[ignore@5.3.0](https://github.com/kaelzhang/node-ignore) - MIT
|
||||||
|
[import-fresh@3.3.0](https://github.com/sindresorhus/import-fresh) - MIT
|
||||||
|
[import-local@3.1.0](https://github.com/sindresorhus/import-local) - MIT
|
||||||
|
[imurmurhash@0.1.4](https://github.com/jensyt/imurmurhash-js) - MIT
|
||||||
|
[inflight@1.0.6](https://github.com/npm/inflight) - ISC
|
||||||
|
[inherits@2.0.4](https://github.com/isaacs/inherits) - ISC
|
||||||
|
[interpret@1.4.0](https://github.com/gulpjs/interpret) - MIT
|
||||||
|
[is-arrayish@0.2.1](https://github.com/qix-/node-is-arrayish) - MIT
|
||||||
|
[is-arrayish@0.3.2](https://github.com/qix-/node-is-arrayish) - MIT
|
||||||
|
[is-buffer@1.1.6](https://github.com/feross/is-buffer) - MIT
|
||||||
|
[is-core-module@2.13.1](https://github.com/inspect-js/is-core-module) - MIT
|
||||||
|
[is-extglob@2.1.1](https://github.com/jonschlinkert/is-extglob) - MIT
|
||||||
|
[is-fullwidth-code-point@3.0.0](https://github.com/sindresorhus/is-fullwidth-code-point) - MIT
|
||||||
|
[is-generator-fn@2.1.0](https://github.com/sindresorhus/is-generator-fn) - MIT
|
||||||
|
[is-glob@4.0.3](https://github.com/micromatch/is-glob) - MIT
|
||||||
|
[is-number@7.0.0](https://github.com/jonschlinkert/is-number) - MIT
|
||||||
|
[is-path-inside@3.0.3](https://github.com/sindresorhus/is-path-inside) - MIT
|
||||||
|
[is-stream@2.0.1](https://github.com/sindresorhus/is-stream) - MIT
|
||||||
|
[isexe@2.0.0](https://github.com/isaacs/isexe) - ISC
|
||||||
|
[istanbul-lib-coverage@3.2.2](https://github.com/istanbuljs/istanbuljs) - BSD-3-Clause
|
||||||
|
[istanbul-lib-instrument@5.2.1](https://github.com/istanbuljs/istanbuljs) - BSD-3-Clause
|
||||||
|
[istanbul-lib-instrument@6.0.1](https://github.com/istanbuljs/istanbuljs) - BSD-3-Clause
|
||||||
|
[istanbul-lib-report@3.0.1](https://github.com/istanbuljs/istanbuljs) - BSD-3-Clause
|
||||||
|
[istanbul-lib-source-maps@4.0.1](https://github.com/istanbuljs/istanbuljs) - BSD-3-Clause
|
||||||
|
[istanbul-reports@3.1.6](https://github.com/istanbuljs/istanbuljs) - BSD-3-Clause
|
||||||
|
[jackspeak@3.4.3](https://github.com/isaacs/jackspeak) - BlueOak-1.0.0
|
||||||
|
[jest-changed-files@29.7.0](https://github.com/jestjs/jest) - MIT
|
||||||
|
[jest-circus@29.7.0](https://github.com/jestjs/jest) - MIT
|
||||||
|
[jest-cli@29.7.0](https://github.com/jestjs/jest) - MIT
|
||||||
|
[jest-config@29.7.0](https://github.com/jestjs/jest) - MIT
|
||||||
|
[jest-diff@29.7.0](https://github.com/jestjs/jest) - MIT
|
||||||
|
[jest-docblock@29.7.0](https://github.com/jestjs/jest) - MIT
|
||||||
|
[jest-each@29.7.0](https://github.com/jestjs/jest) - MIT
|
||||||
|
[jest-environment-node@29.7.0](https://github.com/jestjs/jest) - MIT
|
||||||
|
[jest-get-type@29.6.3](https://github.com/jestjs/jest) - MIT
|
||||||
|
[jest-haste-map@29.7.0](https://github.com/jestjs/jest) - MIT
|
||||||
|
[jest-leak-detector@29.7.0](https://github.com/jestjs/jest) - MIT
|
||||||
|
[jest-matcher-utils@29.7.0](https://github.com/jestjs/jest) - MIT
|
||||||
|
[jest-message-util@29.7.0](https://github.com/jestjs/jest) - MIT
|
||||||
|
[jest-mock@29.7.0](https://github.com/jestjs/jest) - MIT
|
||||||
|
[jest-pnp-resolver@1.2.3](https://github.com/arcanis/jest-pnp-resolver) - MIT
|
||||||
|
[jest-regex-util@29.6.3](https://github.com/jestjs/jest) - MIT
|
||||||
|
[jest-resolve-dependencies@29.7.0](https://github.com/jestjs/jest) - MIT
|
||||||
|
[jest-resolve@29.7.0](https://github.com/jestjs/jest) - MIT
|
||||||
|
[jest-runner@29.7.0](https://github.com/jestjs/jest) - MIT
|
||||||
|
[jest-runtime@29.7.0](https://github.com/jestjs/jest) - MIT
|
||||||
|
[jest-snapshot@29.7.0](https://github.com/jestjs/jest) - MIT
|
||||||
|
[jest-util@29.7.0](https://github.com/jestjs/jest) - MIT
|
||||||
|
[jest-validate@29.7.0](https://github.com/jestjs/jest) - MIT
|
||||||
|
[jest-watcher@29.7.0](https://github.com/jestjs/jest) - MIT
|
||||||
|
[jest-worker@29.7.0](https://github.com/jestjs/jest) - MIT
|
||||||
|
[jest@29.7.0](https://github.com/jestjs/jest) - MIT
|
||||||
|
[js-tokens@4.0.0](https://github.com/lydell/js-tokens) - MIT
|
||||||
|
[js-yaml@3.14.1](https://github.com/nodeca/js-yaml) - MIT
|
||||||
|
[js-yaml@4.1.0](https://github.com/nodeca/js-yaml) - MIT
|
||||||
|
[jsesc@2.5.2](https://github.com/mathiasbynens/jsesc) - MIT
|
||||||
|
[json-bignum@0.0.3](https://github.com/datalanche/json-bignum) - MIT
|
||||||
|
[json-buffer@3.0.1](https://github.com/dominictarr/json-buffer) - MIT
|
||||||
|
[json-parse-even-better-errors@2.3.1](https://github.com/npm/json-parse-even-better-errors) - MIT
|
||||||
|
[json-schema-traverse@0.4.1](https://github.com/epoberezkin/json-schema-traverse) - MIT
|
||||||
|
[json-stable-stringify-without-jsonify@1.0.1](https://github.com/samn/json-stable-stringify) - MIT
|
||||||
|
[json5@2.2.3](https://github.com/json5/json5) - MIT
|
||||||
|
[keyv@4.5.4](https://github.com/jaredwray/keyv) - MIT
|
||||||
|
[kleur@3.0.3](https://github.com/lukeed/kleur) - MIT
|
||||||
|
[leven@3.1.0](https://github.com/sindresorhus/leven) - MIT
|
||||||
|
[levn@0.4.1](https://github.com/gkz/levn) - MIT
|
||||||
|
[lines-and-columns@1.2.4](https://github.com/eventualbuddha/lines-and-columns) - MIT
|
||||||
|
[linkify-it@5.0.0](https://github.com/markdown-it/linkify-it) - MIT
|
||||||
|
[locate-path@5.0.0](https://github.com/sindresorhus/locate-path) - MIT
|
||||||
|
[locate-path@6.0.0](https://github.com/sindresorhus/locate-path) - MIT
|
||||||
|
[lodash.camelcase@4.3.0](https://github.com/lodash/lodash) - MIT
|
||||||
|
[lodash.memoize@4.1.2](https://github.com/lodash/lodash) - MIT
|
||||||
|
[lodash.merge@4.6.2](https://github.com/lodash/lodash) - MIT
|
||||||
|
[lodash@4.17.21](https://github.com/lodash/lodash) - MIT
|
||||||
|
[long@5.2.3](https://github.com/dcodeIO/long.js) - Apache-2.0
|
||||||
|
[lru-cache@10.4.3](https://github.com/isaacs/node-lru-cache) - ISC
|
||||||
|
[lru-cache@5.1.1](https://github.com/isaacs/node-lru-cache) - ISC
|
||||||
|
[lunr@2.3.9](https://github.com/olivernn/lunr.js) - MIT
|
||||||
|
[make-dir@4.0.0](https://github.com/sindresorhus/make-dir) - MIT
|
||||||
|
[make-error@1.3.6](https://github.com/JsCommunity/make-error) - ISC
|
||||||
|
[makeerror@1.0.12](https://github.com/daaku/nodejs-makeerror) - BSD-3-Clause
|
||||||
|
[markdown-it@14.1.0](https://github.com/markdown-it/markdown-it) - MIT
|
||||||
|
[md5@2.3.0](https://github.com/pvorb/node-md5) - BSD-3-Clause
|
||||||
|
[mdurl@2.0.0](https://github.com/markdown-it/mdurl) - MIT
|
||||||
|
[merge-stream@2.0.0](https://github.com/grncdr/merge-stream) - MIT
|
||||||
|
[merge2@1.4.1](https://github.com/teambition/merge2) - MIT
|
||||||
|
[micromatch@4.0.8](https://github.com/micromatch/micromatch) - MIT
|
||||||
|
[mime-db@1.52.0](https://github.com/jshttp/mime-db) - MIT
|
||||||
|
[mime-types@2.1.35](https://github.com/jshttp/mime-types) - MIT
|
||||||
|
[mimic-fn@2.1.0](https://github.com/sindresorhus/mimic-fn) - MIT
|
||||||
|
[minimatch@3.1.2](https://github.com/isaacs/minimatch) - ISC
|
||||||
|
[minimatch@9.0.3](https://github.com/isaacs/minimatch) - ISC
|
||||||
|
[minimatch@9.0.5](https://github.com/isaacs/minimatch) - ISC
|
||||||
|
[minimist@1.2.8](https://github.com/minimistjs/minimist) - MIT
|
||||||
|
[minipass@7.1.2](https://github.com/isaacs/minipass) - ISC
|
||||||
|
[minizlib@3.0.1](https://github.com/isaacs/minizlib) - MIT
|
||||||
|
[mkdirp@3.0.1](https://github.com/isaacs/node-mkdirp) - MIT
|
||||||
|
[mnemonist@0.38.3](https://github.com/yomguithereal/mnemonist) - MIT
|
||||||
|
[ms@2.1.2](https://github.com/zeit/ms) - MIT
|
||||||
|
[ms@2.1.3](https://github.com/vercel/ms) - MIT
|
||||||
|
[natural-compare@1.4.0](https://github.com/litejs/natural-compare-lite) - MIT
|
||||||
|
[node-domexception@1.0.0](https://github.com/jimmywarting/node-domexception) - MIT
|
||||||
|
[node-fetch@2.7.0](https://github.com/bitinn/node-fetch) - MIT
|
||||||
|
[node-int64@0.4.0](https://github.com/broofa/node-int64) - MIT
|
||||||
|
[node-releases@2.0.14](https://github.com/chicoxyzzy/node-releases) - MIT
|
||||||
|
[normalize-path@3.0.0](https://github.com/jonschlinkert/normalize-path) - MIT
|
||||||
|
[npm-run-path@4.0.1](https://github.com/sindresorhus/npm-run-path) - MIT
|
||||||
|
[obliterator@1.6.1](https://github.com/yomguithereal/obliterator) - MIT
|
||||||
|
[once@1.4.0](https://github.com/isaacs/once) - ISC
|
||||||
|
[onetime@5.1.2](https://github.com/sindresorhus/onetime) - MIT
|
||||||
|
[onnxruntime-common@1.19.2](https://github.com/Microsoft/onnxruntime) - MIT
|
||||||
|
[onnxruntime-common@1.20.0-dev.20241016-2b8fc5529b](https://github.com/Microsoft/onnxruntime) - MIT
|
||||||
|
[onnxruntime-node@1.19.2](https://github.com/Microsoft/onnxruntime) - MIT
|
||||||
|
[onnxruntime-web@1.21.0-dev.20241024-d9ca84ef96](https://github.com/Microsoft/onnxruntime) - MIT
|
||||||
|
[openai@4.29.2](https://github.com/openai/openai-node) - Apache-2.0
|
||||||
|
[optionator@0.9.3](https://github.com/gkz/optionator) - MIT
|
||||||
|
[p-limit@2.3.0](https://github.com/sindresorhus/p-limit) - MIT
|
||||||
|
[p-limit@3.1.0](https://github.com/sindresorhus/p-limit) - MIT
|
||||||
|
[p-locate@4.1.0](https://github.com/sindresorhus/p-locate) - MIT
|
||||||
|
[p-locate@5.0.0](https://github.com/sindresorhus/p-locate) - MIT
|
||||||
|
[p-try@2.2.0](https://github.com/sindresorhus/p-try) - MIT
|
||||||
|
[package-json-from-dist@1.0.1](https://github.com/isaacs/package-json-from-dist) - BlueOak-1.0.0
|
||||||
|
[parent-module@1.0.1](https://github.com/sindresorhus/parent-module) - MIT
|
||||||
|
[parse-json@5.2.0](https://github.com/sindresorhus/parse-json) - MIT
|
||||||
|
[path-exists@4.0.0](https://github.com/sindresorhus/path-exists) - MIT
|
||||||
|
[path-is-absolute@1.0.1](https://github.com/sindresorhus/path-is-absolute) - MIT
|
||||||
|
[path-key@3.1.1](https://github.com/sindresorhus/path-key) - MIT
|
||||||
|
[path-parse@1.0.7](https://github.com/jbgutierrez/path-parse) - MIT
|
||||||
|
[path-scurry@1.11.1](https://github.com/isaacs/path-scurry) - BlueOak-1.0.0
|
||||||
|
[path-type@4.0.0](https://github.com/sindresorhus/path-type) - MIT
|
||||||
|
[picocolors@1.0.0](https://github.com/alexeyraspopov/picocolors) - ISC
|
||||||
|
[picomatch@2.3.1](https://github.com/micromatch/picomatch) - MIT
|
||||||
|
[pirates@4.0.6](https://github.com/danez/pirates) - MIT
|
||||||
|
[pkg-dir@4.2.0](https://github.com/sindresorhus/pkg-dir) - MIT
|
||||||
|
[platform@1.3.6](https://github.com/bestiejs/platform.js) - MIT
|
||||||
|
[prelude-ls@1.2.1](https://github.com/gkz/prelude-ls) - MIT
|
||||||
|
[pretty-format@29.7.0](https://github.com/jestjs/jest) - MIT
|
||||||
|
[prompts@2.4.2](https://github.com/terkelg/prompts) - MIT
|
||||||
|
[protobufjs@7.4.0](https://github.com/protobufjs/protobuf.js) - BSD-3-Clause
|
||||||
|
[proxy-from-env@1.1.0](https://github.com/Rob--W/proxy-from-env) - MIT
|
||||||
|
[punycode.js@2.3.1](https://github.com/mathiasbynens/punycode.js) - MIT
|
||||||
|
[punycode@2.3.1](https://github.com/mathiasbynens/punycode.js) - MIT
|
||||||
|
[pure-rand@6.0.4](https://github.com/dubzzz/pure-rand) - MIT
|
||||||
|
[queue-microtask@1.2.3](https://github.com/feross/queue-microtask) - MIT
|
||||||
|
[react-is@18.2.0](https://github.com/facebook/react) - MIT
|
||||||
|
[rechoir@0.6.2](https://github.com/tkellen/node-rechoir) - MIT
|
||||||
|
[reflect-metadata@0.2.2](https://github.com/rbuckton/reflect-metadata) - Apache-2.0
|
||||||
|
[require-directory@2.1.1](https://github.com/troygoode/node-require-directory) - MIT
|
||||||
|
[resolve-cwd@3.0.0](https://github.com/sindresorhus/resolve-cwd) - MIT
|
||||||
|
[resolve-from@4.0.0](https://github.com/sindresorhus/resolve-from) - MIT
|
||||||
|
[resolve-from@5.0.0](https://github.com/sindresorhus/resolve-from) - MIT
|
||||||
|
[resolve.exports@2.0.2](https://github.com/lukeed/resolve.exports) - MIT
|
||||||
|
[resolve@1.22.8](https://github.com/browserify/resolve) - MIT
|
||||||
|
[reusify@1.0.4](https://github.com/mcollina/reusify) - MIT
|
||||||
|
[rimraf@3.0.2](https://github.com/isaacs/rimraf) - ISC
|
||||||
|
[rimraf@5.0.10](https://github.com/isaacs/rimraf) - ISC
|
||||||
|
[run-parallel@1.2.0](https://github.com/feross/run-parallel) - MIT
|
||||||
|
[semver@6.3.1](https://github.com/npm/node-semver) - ISC
|
||||||
|
[semver@7.6.3](https://github.com/npm/node-semver) - ISC
|
||||||
|
[sharp@0.33.5](https://github.com/lovell/sharp) - Apache-2.0
|
||||||
|
[shebang-command@2.0.0](https://github.com/kevva/shebang-command) - MIT
|
||||||
|
[shebang-regex@3.0.0](https://github.com/sindresorhus/shebang-regex) - MIT
|
||||||
|
[shelljs@0.8.5](https://github.com/shelljs/shelljs) - BSD-3-Clause
|
||||||
|
[shiki@1.10.3](https://github.com/shikijs/shiki) - MIT
|
||||||
|
[shx@0.3.4](https://github.com/shelljs/shx) - MIT
|
||||||
|
[signal-exit@3.0.7](https://github.com/tapjs/signal-exit) - ISC
|
||||||
|
[signal-exit@4.1.0](https://github.com/tapjs/signal-exit) - ISC
|
||||||
|
[simple-swizzle@0.2.2](https://github.com/qix-/node-simple-swizzle) - MIT
|
||||||
|
[sisteransi@1.0.5](https://github.com/terkelg/sisteransi) - MIT
|
||||||
|
[slash@3.0.0](https://github.com/sindresorhus/slash) - MIT
|
||||||
|
[source-map-support@0.5.13](https://github.com/evanw/node-source-map-support) - MIT
|
||||||
|
[source-map@0.6.1](https://github.com/mozilla/source-map) - BSD-3-Clause
|
||||||
|
[sprintf-js@1.0.3](https://github.com/alexei/sprintf.js) - BSD-3-Clause
|
||||||
|
[stack-utils@2.0.6](https://github.com/tapjs/stack-utils) - MIT
|
||||||
|
[stream-read-all@3.0.1](https://github.com/75lb/stream-read-all) - MIT
|
||||||
|
[string-length@4.0.2](https://github.com/sindresorhus/string-length) - MIT
|
||||||
|
[string-width@4.2.3](https://github.com/sindresorhus/string-width) - MIT
|
||||||
|
[string-width@5.1.2](https://github.com/sindresorhus/string-width) - MIT
|
||||||
|
[strip-ansi@6.0.1](https://github.com/chalk/strip-ansi) - MIT
|
||||||
|
[strip-ansi@7.1.0](https://github.com/chalk/strip-ansi) - MIT
|
||||||
|
[strip-bom@4.0.0](https://github.com/sindresorhus/strip-bom) - MIT
|
||||||
|
[strip-final-newline@2.0.0](https://github.com/sindresorhus/strip-final-newline) - MIT
|
||||||
|
[strip-json-comments@3.1.1](https://github.com/sindresorhus/strip-json-comments) - MIT
|
||||||
|
[strnum@1.0.5](https://github.com/NaturalIntelligence/strnum) - MIT
|
||||||
|
[supports-color@7.2.0](https://github.com/chalk/supports-color) - MIT
|
||||||
|
[supports-color@8.1.1](https://github.com/chalk/supports-color) - MIT
|
||||||
|
[supports-preserve-symlinks-flag@1.0.0](https://github.com/inspect-js/node-supports-preserve-symlinks-flag) - MIT
|
||||||
|
[table-layout@3.0.2](https://github.com/75lb/table-layout) - MIT
|
||||||
|
[tar@7.4.3](https://github.com/isaacs/node-tar) - ISC
|
||||||
|
[test-exclude@6.0.0](https://github.com/istanbuljs/test-exclude) - ISC
|
||||||
|
[text-table@0.2.0](https://github.com/substack/text-table) - MIT
|
||||||
|
[tmp@0.2.3](https://github.com/raszi/node-tmp) - MIT
|
||||||
|
[tmpl@1.0.5](https://github.com/daaku/nodejs-tmpl) - BSD-3-Clause
|
||||||
|
[to-regex-range@5.0.1](https://github.com/micromatch/to-regex-range) - MIT
|
||||||
|
[tr46@0.0.3](https://github.com/Sebmaster/tr46.js) - MIT
|
||||||
|
[ts-api-utils@1.0.3](https://github.com/JoshuaKGoldberg/ts-api-utils) - MIT
|
||||||
|
[ts-jest@29.1.2](https://github.com/kulshekhar/ts-jest) - MIT
|
||||||
|
[tslib@1.14.1](https://github.com/Microsoft/tslib) - 0BSD
|
||||||
|
[tslib@2.6.2](https://github.com/Microsoft/tslib) - 0BSD
|
||||||
|
[type-check@0.4.0](https://github.com/gkz/type-check) - MIT
|
||||||
|
[type-detect@4.0.8](https://github.com/chaijs/type-detect) - MIT
|
||||||
|
[type-fest@0.20.2](https://github.com/sindresorhus/type-fest) - (MIT OR CC0-1.0)
|
||||||
|
[type-fest@0.21.3](https://github.com/sindresorhus/type-fest) - (MIT OR CC0-1.0)
|
||||||
|
[typedoc-plugin-markdown@4.2.1](https://github.com/typedoc2md/typedoc-plugin-markdown) - MIT
|
||||||
|
[typedoc@0.26.4](https://github.com/TypeStrong/TypeDoc) - Apache-2.0
|
||||||
|
[typescript-eslint@7.1.0](https://github.com/typescript-eslint/typescript-eslint) - MIT
|
||||||
|
[typescript@5.5.4](https://github.com/Microsoft/TypeScript) - Apache-2.0
|
||||||
|
[typical@4.0.0](https://github.com/75lb/typical) - MIT
|
||||||
|
[typical@7.1.1](https://github.com/75lb/typical) - MIT
|
||||||
|
[uc.micro@2.1.0](https://github.com/markdown-it/uc.micro) - MIT
|
||||||
|
[undici-types@5.26.5](https://github.com/nodejs/undici) - MIT
|
||||||
|
[undici-types@6.19.8](https://github.com/nodejs/undici) - MIT
|
||||||
|
[update-browserslist-db@1.0.13](https://github.com/browserslist/update-db) - MIT
|
||||||
|
[uri-js@4.4.1](https://github.com/garycourt/uri-js) - BSD-2-Clause
|
||||||
|
[uuid@9.0.1](https://github.com/uuidjs/uuid) - MIT
|
||||||
|
[v8-to-istanbul@9.2.0](https://github.com/istanbuljs/v8-to-istanbul) - ISC
|
||||||
|
[walker@1.0.8](https://github.com/daaku/nodejs-walker) - Apache-2.0
|
||||||
|
[web-streams-polyfill@3.3.3](https://github.com/MattiasBuelens/web-streams-polyfill) - MIT
|
||||||
|
[web-streams-polyfill@4.0.0-beta.3](https://github.com/MattiasBuelens/web-streams-polyfill) - MIT
|
||||||
|
[webidl-conversions@3.0.1](https://github.com/jsdom/webidl-conversions) - BSD-2-Clause
|
||||||
|
[whatwg-url@5.0.0](https://github.com/jsdom/whatwg-url) - MIT
|
||||||
|
[which@2.0.2](https://github.com/isaacs/node-which) - ISC
|
||||||
|
[wordwrapjs@5.1.0](https://github.com/75lb/wordwrapjs) - MIT
|
||||||
|
[wrap-ansi@7.0.0](https://github.com/chalk/wrap-ansi) - MIT
|
||||||
|
[wrap-ansi@8.1.0](https://github.com/chalk/wrap-ansi) - MIT
|
||||||
|
[wrappy@1.0.2](https://github.com/npm/wrappy) - ISC
|
||||||
|
[write-file-atomic@4.0.2](https://github.com/npm/write-file-atomic) - ISC
|
||||||
|
[y18n@5.0.8](https://github.com/yargs/y18n) - ISC
|
||||||
|
[yallist@3.1.1](https://github.com/isaacs/yallist) - ISC
|
||||||
|
[yallist@5.0.0](https://github.com/isaacs/yallist) - BlueOak-1.0.0
|
||||||
|
[yaml@2.4.5](https://github.com/eemeli/yaml) - ISC
|
||||||
|
[yargs-parser@21.1.1](https://github.com/yargs/yargs-parser) - ISC
|
||||||
|
[yargs@17.7.2](https://github.com/yargs/yargs) - MIT
|
||||||
|
[yocto-queue@0.1.0](https://github.com/sindresorhus/yocto-queue) - MIT
|
||||||
+1
-1
@@ -30,7 +30,7 @@ const results = await table.vectorSearch([0.1, 0.3]).limit(20).toArray();
|
|||||||
console.log(results);
|
console.log(results);
|
||||||
```
|
```
|
||||||
|
|
||||||
The [quickstart](https://lancedb.com/docs/quickstart/basic-usage/) contains more complete examples.
|
The [quickstart](https://docs.lancedb.com/quickstart/) contains more complete examples.
|
||||||
|
|
||||||
## Development
|
## Development
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -63,6 +63,7 @@ describe.each([arrow15, arrow16, arrow17, arrow18])(
|
|||||||
tableFromIPC,
|
tableFromIPC,
|
||||||
DataType,
|
DataType,
|
||||||
Dictionary,
|
Dictionary,
|
||||||
|
Uint8: ArrowUint8,
|
||||||
// biome-ignore lint/suspicious/noExplicitAny: <explanation>
|
// biome-ignore lint/suspicious/noExplicitAny: <explanation>
|
||||||
} = <any>arrow;
|
} = <any>arrow;
|
||||||
type Schema = ApacheArrow["Schema"];
|
type Schema = ApacheArrow["Schema"];
|
||||||
@@ -362,6 +363,38 @@ describe.each([arrow15, arrow16, arrow17, arrow18])(
|
|||||||
).toEqual(new Float64().toString());
|
).toEqual(new Float64().toString());
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("will infer FixedSizeList<Float32> from Float32Array values", async function () {
|
||||||
|
const table = makeArrowTable([
|
||||||
|
{ id: "a", vector: new Float32Array([0.1, 0.2, 0.3]) },
|
||||||
|
{ id: "b", vector: new Float32Array([0.4, 0.5, 0.6]) },
|
||||||
|
]);
|
||||||
|
|
||||||
|
expect(DataType.isFixedSizeList(table.getChild("vector")?.type)).toBe(
|
||||||
|
true,
|
||||||
|
);
|
||||||
|
const vectorType = table.getChild("vector")?.type;
|
||||||
|
expect(vectorType.listSize).toBe(3);
|
||||||
|
expect(vectorType.children[0].type.toString()).toEqual(
|
||||||
|
new Float32().toString(),
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("will infer FixedSizeList<Uint8> from Uint8Array values", async function () {
|
||||||
|
const table = makeArrowTable([
|
||||||
|
{ id: "a", vector: new Uint8Array([1, 2, 3]) },
|
||||||
|
{ id: "b", vector: new Uint8Array([4, 5, 6]) },
|
||||||
|
]);
|
||||||
|
|
||||||
|
expect(DataType.isFixedSizeList(table.getChild("vector")?.type)).toBe(
|
||||||
|
true,
|
||||||
|
);
|
||||||
|
const vectorType = table.getChild("vector")?.type;
|
||||||
|
expect(vectorType.listSize).toBe(3);
|
||||||
|
expect(vectorType.children[0].type.toString()).toEqual(
|
||||||
|
new ArrowUint8().toString(),
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
it("will use dictionary encoded strings if asked", async function () {
|
it("will use dictionary encoded strings if asked", async function () {
|
||||||
const table = makeArrowTable([{ str: "hello" }]);
|
const table = makeArrowTable([{ str: "hello" }]);
|
||||||
expect(DataType.isUtf8(table.getChild("str")?.type)).toBe(true);
|
expect(DataType.isUtf8(table.getChild("str")?.type)).toBe(true);
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
import { readdirSync } from "fs";
|
import { readdirSync } from "fs";
|
||||||
import { Field, Float64, Schema } from "apache-arrow";
|
import { Field, Float64, Schema } from "apache-arrow";
|
||||||
import * as tmp from "tmp";
|
import * as tmp from "tmp";
|
||||||
import { Connection, Table, connect } from "../lancedb";
|
import { Connection, Table, connect, connectNamespace } from "../lancedb";
|
||||||
import { LocalTable } from "../lancedb/table";
|
import { LocalTable } from "../lancedb/table";
|
||||||
|
|
||||||
describe("when connecting", () => {
|
describe("when connecting", () => {
|
||||||
@@ -47,6 +47,14 @@ describe("given a connection", () => {
|
|||||||
await db.close();
|
await db.close();
|
||||||
expect(db.isOpen()).toBe(false);
|
expect(db.isOpen()).toBe(false);
|
||||||
await expect(db.tableNames()).rejects.toThrow("Connection is closed");
|
await expect(db.tableNames()).rejects.toThrow("Connection is closed");
|
||||||
|
await expect(db.renameTable("a", "b")).rejects.toThrow(
|
||||||
|
"Connection is closed",
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("should report renameTable as unsupported on an OSS connection", async () => {
|
||||||
|
await db.createTable("a", [{ id: 1 }]);
|
||||||
|
await expect(db.renameTable("a", "b")).rejects.toThrow(/not supported/);
|
||||||
});
|
});
|
||||||
it("should be able to create a table from an object arg `createTable(options)`, or args `createTable(name, data, options)`", async () => {
|
it("should be able to create a table from an object arg `createTable(options)`, or args `createTable(name, data, options)`", async () => {
|
||||||
let tbl = await db.createTable("test", [{ id: 1 }, { id: 2 }]);
|
let tbl = await db.createTable("test", [{ id: 1 }, { id: 2 }]);
|
||||||
@@ -163,18 +171,22 @@ describe("given a connection", () => {
|
|||||||
|
|
||||||
let manifestDir =
|
let manifestDir =
|
||||||
tmpDir.name + "/test_manifest_paths_v2_empty.lance/_versions";
|
tmpDir.name + "/test_manifest_paths_v2_empty.lance/_versions";
|
||||||
readdirSync(manifestDir).forEach((file) => {
|
readdirSync(manifestDir)
|
||||||
expect(file).toMatch(/^\d{20}\.manifest$/);
|
.filter((f) => f.endsWith(".manifest"))
|
||||||
});
|
.forEach((file) => {
|
||||||
|
expect(file).toMatch(/^\d{20}\.manifest$/);
|
||||||
|
});
|
||||||
|
|
||||||
table = (await db.createTable("test_manifest_paths_v2", [{ id: 1 }], {
|
table = (await db.createTable("test_manifest_paths_v2", [{ id: 1 }], {
|
||||||
enableV2ManifestPaths: true,
|
enableV2ManifestPaths: true,
|
||||||
})) as LocalTable;
|
})) as LocalTable;
|
||||||
expect(await table.usesV2ManifestPaths()).toBe(true);
|
expect(await table.usesV2ManifestPaths()).toBe(true);
|
||||||
manifestDir = tmpDir.name + "/test_manifest_paths_v2.lance/_versions";
|
manifestDir = tmpDir.name + "/test_manifest_paths_v2.lance/_versions";
|
||||||
readdirSync(manifestDir).forEach((file) => {
|
readdirSync(manifestDir)
|
||||||
expect(file).toMatch(/^\d{20}\.manifest$/);
|
.filter((f) => f.endsWith(".manifest"))
|
||||||
});
|
.forEach((file) => {
|
||||||
|
expect(file).toMatch(/^\d{20}\.manifest$/);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should be able to migrate tables to the V2 manifest paths", async () => {
|
it("should be able to migrate tables to the V2 manifest paths", async () => {
|
||||||
@@ -191,16 +203,20 @@ describe("given a connection", () => {
|
|||||||
|
|
||||||
const manifestDir =
|
const manifestDir =
|
||||||
tmpDir.name + "/test_manifest_path_migration.lance/_versions";
|
tmpDir.name + "/test_manifest_path_migration.lance/_versions";
|
||||||
readdirSync(manifestDir).forEach((file) => {
|
readdirSync(manifestDir)
|
||||||
expect(file).toMatch(/^\d\.manifest$/);
|
.filter((f) => f.endsWith(".manifest"))
|
||||||
});
|
.forEach((file) => {
|
||||||
|
expect(file).toMatch(/^\d\.manifest$/);
|
||||||
|
});
|
||||||
|
|
||||||
await table.migrateManifestPathsV2();
|
await table.migrateManifestPathsV2();
|
||||||
expect(await table.usesV2ManifestPaths()).toBe(true);
|
expect(await table.usesV2ManifestPaths()).toBe(true);
|
||||||
|
|
||||||
readdirSync(manifestDir).forEach((file) => {
|
readdirSync(manifestDir)
|
||||||
expect(file).toMatch(/^\d{20}\.manifest$/);
|
.filter((f) => f.endsWith(".manifest"))
|
||||||
});
|
.forEach((file) => {
|
||||||
|
expect(file).toMatch(/^\d{20}\.manifest$/);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -306,3 +322,186 @@ describe("clone table functionality", () => {
|
|||||||
).rejects.toThrow("Deep clone is not yet implemented");
|
).rejects.toThrow("Deep clone is not yet implemented");
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
describe("namespaces", () => {
|
||||||
|
let tmpDir: tmp.DirResult;
|
||||||
|
let db: Connection;
|
||||||
|
|
||||||
|
beforeEach(async () => {
|
||||||
|
tmpDir = tmp.dirSync({ unsafeCleanup: true });
|
||||||
|
// The local DirectoryNamespace backend only supports child namespaces
|
||||||
|
// when manifest mode is enabled (see lance-namespace-impls/src/dir.rs).
|
||||||
|
db = await connect(tmpDir.name, {
|
||||||
|
// biome-ignore lint/style/useNamingConvention: opaque backend property key, must match Rust
|
||||||
|
namespaceClientProperties: { manifest_enabled: "true" },
|
||||||
|
});
|
||||||
|
});
|
||||||
|
afterEach(() => tmpDir.removeCallback());
|
||||||
|
|
||||||
|
it("should create and describe a namespace", async () => {
|
||||||
|
await db.createNamespace(["myns"]);
|
||||||
|
const desc = await db.describeNamespace(["myns"]);
|
||||||
|
expect(desc).toBeDefined();
|
||||||
|
});
|
||||||
|
|
||||||
|
it("should list namespaces created at the root", async () => {
|
||||||
|
await db.createNamespace(["alpha"]);
|
||||||
|
await db.createNamespace(["beta"]);
|
||||||
|
const list = await db.listNamespaces();
|
||||||
|
expect(list.namespaces).toEqual(expect.arrayContaining(["alpha", "beta"]));
|
||||||
|
});
|
||||||
|
|
||||||
|
it("should list child namespaces under a parent", async () => {
|
||||||
|
await db.createNamespace(["parent"]);
|
||||||
|
await db.createNamespace(["parent", "child"]);
|
||||||
|
const list = await db.listNamespaces(["parent"]);
|
||||||
|
expect(list.namespaces).toContain("child");
|
||||||
|
});
|
||||||
|
|
||||||
|
it("should drop a namespace", async () => {
|
||||||
|
await db.createNamespace(["ephemeral"]);
|
||||||
|
await db.dropNamespace(["ephemeral"]);
|
||||||
|
const list = await db.listNamespaces();
|
||||||
|
expect(list.namespaces).not.toContain("ephemeral");
|
||||||
|
});
|
||||||
|
|
||||||
|
it("should raise an error on any namespace op after close", async () => {
|
||||||
|
await db.close();
|
||||||
|
await expect(db.describeNamespace(["foo"])).rejects.toThrow(
|
||||||
|
"Connection is closed",
|
||||||
|
);
|
||||||
|
await expect(db.listNamespaces()).rejects.toThrow("Connection is closed");
|
||||||
|
await expect(db.createNamespace(["foo"])).rejects.toThrow(
|
||||||
|
"Connection is closed",
|
||||||
|
);
|
||||||
|
await expect(db.dropNamespace(["foo"])).rejects.toThrow(
|
||||||
|
"Connection is closed",
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("should raise an understandable error when describing a non-existent namespace", async () => {
|
||||||
|
await expect(db.describeNamespace(["does-not-exist"])).rejects.toThrow(
|
||||||
|
/not found/i,
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("should raise an error when creating a namespace that already exists", async () => {
|
||||||
|
await db.createNamespace(["dup"]);
|
||||||
|
await expect(db.createNamespace(["dup"])).rejects.toThrow();
|
||||||
|
});
|
||||||
|
|
||||||
|
it("should reject an unrecognized createNamespace mode with a clear error", async () => {
|
||||||
|
await expect(
|
||||||
|
// biome-ignore lint/suspicious/noExplicitAny: deliberately bypass TS to test runtime validation
|
||||||
|
db.createNamespace(["x"], { mode: "frobnicate" as any }),
|
||||||
|
).rejects.toThrow(/Invalid mode 'frobnicate'/);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("should reject an unrecognized dropNamespace mode with a clear error", async () => {
|
||||||
|
await db.createNamespace(["x"]);
|
||||||
|
await expect(
|
||||||
|
// biome-ignore lint/suspicious/noExplicitAny: deliberately bypass TS to test runtime validation
|
||||||
|
db.dropNamespace(["x"], { mode: "frobnicate" as any }),
|
||||||
|
).rejects.toThrow(/Invalid mode 'frobnicate'/);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("should reject an unrecognized dropNamespace behavior with a clear error", async () => {
|
||||||
|
await db.createNamespace(["x"]);
|
||||||
|
await expect(
|
||||||
|
// biome-ignore lint/suspicious/noExplicitAny: deliberately bypass TS to test runtime validation
|
||||||
|
db.dropNamespace(["x"], { behavior: "frobnicate" as any }),
|
||||||
|
).rejects.toThrow(/Invalid behavior 'frobnicate'/);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe("connectNamespace", () => {
|
||||||
|
let tmpDir: tmp.DirResult;
|
||||||
|
beforeEach(() => {
|
||||||
|
tmpDir = tmp.dirSync({ unsafeCleanup: true });
|
||||||
|
});
|
||||||
|
afterEach(() => tmpDir.removeCallback());
|
||||||
|
|
||||||
|
it("connects via the dir implementation and supports table ops", async () => {
|
||||||
|
const db = await connectNamespace("dir", { root: tmpDir.name });
|
||||||
|
await db.createTable("users", [{ id: 1 }, { id: 2 }]);
|
||||||
|
await expect(db.tableNames()).resolves.toContain("users");
|
||||||
|
});
|
||||||
|
|
||||||
|
it("throws a clear error when implName is empty", async () => {
|
||||||
|
await expect(connectNamespace("", {})).rejects.toThrow(
|
||||||
|
"implName must be a non-empty string",
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("throws when the namespace implementation is unknown", async () => {
|
||||||
|
await expect(connectNamespace("not-a-real-impl", {})).rejects.toThrow();
|
||||||
|
});
|
||||||
|
|
||||||
|
it("passes storage options through to the namespace", async () => {
|
||||||
|
const db = await connectNamespace(
|
||||||
|
"dir",
|
||||||
|
{ root: tmpDir.name },
|
||||||
|
{ storageOptions: { newTableDataStorageVersion: "stable" } },
|
||||||
|
);
|
||||||
|
await db.createTable("plumbing", [{ id: 1 }]);
|
||||||
|
await expect(db.tableNames()).resolves.toContain("plumbing");
|
||||||
|
});
|
||||||
|
|
||||||
|
it("supports child namespaces when manifestEnabled is true on the dir config", async () => {
|
||||||
|
const writer = await connectNamespace("dir", {
|
||||||
|
root: tmpDir.name,
|
||||||
|
manifestEnabled: true,
|
||||||
|
});
|
||||||
|
await writer.createNamespace(["analytics"]);
|
||||||
|
await writer.createTable("orders", [{ id: 1 }, { id: 2 }], ["analytics"]);
|
||||||
|
await writer.close();
|
||||||
|
|
||||||
|
const reader = await connectNamespace("dir", {
|
||||||
|
root: tmpDir.name,
|
||||||
|
manifestEnabled: true,
|
||||||
|
});
|
||||||
|
await expect(reader.tableNames(["analytics"])).resolves.toContain("orders");
|
||||||
|
const orders = await reader.openTable("orders", ["analytics"]);
|
||||||
|
await expect(orders.countRows()).resolves.toBe(2);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("merges extraProperties into the dir config and is overridden by typed fields", async () => {
|
||||||
|
// Two observable assertions:
|
||||||
|
// - Typed `root` overrides extraProperties.root: createTable would fail
|
||||||
|
// under the bogus path if the override didn't happen.
|
||||||
|
// - extraProperties.manifest_enabled="false" is honored end-to-end. Child
|
||||||
|
// namespaces require manifest mode (default true), so explicitly
|
||||||
|
// disabling it via extraProperties must make createNamespace reject. If
|
||||||
|
// extraProperties pass-through were silently broken, the default would
|
||||||
|
// let createNamespace succeed.
|
||||||
|
const db = await connectNamespace("dir", {
|
||||||
|
root: tmpDir.name,
|
||||||
|
extraProperties: {
|
||||||
|
root: "/should/be/overridden",
|
||||||
|
// biome-ignore lint/style/useNamingConvention: backend property key
|
||||||
|
manifest_enabled: "false",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
await db.createTable("base", [{ id: 1 }]);
|
||||||
|
await expect(db.tableNames()).resolves.toContain("base");
|
||||||
|
await expect(db.createNamespace(["analytics"])).rejects.toThrow();
|
||||||
|
});
|
||||||
|
|
||||||
|
it("flows unknown top-level keys through when implName is dynamic (no silent drop)", async () => {
|
||||||
|
// Routes via the third overload because `impl` is `string`, not the
|
||||||
|
// literal `"dir"`. The dispatcher still notices the runtime value is
|
||||||
|
// "dir", but unknown keys like `manifest_enabled` must not be silently
|
||||||
|
// dropped during the conversion.
|
||||||
|
//
|
||||||
|
// Asserting a *negative* outcome (manifest disabled -> createNamespace
|
||||||
|
// rejects) is required for observability, since the backend default for
|
||||||
|
// `manifest_enabled` is true.
|
||||||
|
const impl: string = "dir";
|
||||||
|
const db = await connectNamespace(impl, {
|
||||||
|
root: tmpDir.name,
|
||||||
|
// biome-ignore lint/style/useNamingConvention: backend property key
|
||||||
|
manifest_enabled: "false",
|
||||||
|
});
|
||||||
|
await expect(db.createNamespace(["mixed"])).rejects.toThrow();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|||||||
@@ -109,3 +109,209 @@ describe("Query outputSchema", () => {
|
|||||||
expect(schema.fields.length).toBe(3);
|
expect(schema.fields.length).toBe(3);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
describe("Query orderBy", () => {
|
||||||
|
let tmpDir: tmp.DirResult;
|
||||||
|
let table: Table;
|
||||||
|
|
||||||
|
beforeEach(async () => {
|
||||||
|
tmpDir = tmp.dirSync({ unsafeCleanup: true });
|
||||||
|
const db = await connect(tmpDir.name);
|
||||||
|
|
||||||
|
// Create table with numeric data for sorting
|
||||||
|
const schema = new Schema([
|
||||||
|
new Field("id", new Int64(), true),
|
||||||
|
new Field("score", new Float32(), true),
|
||||||
|
new Field("name", new Utf8(), true),
|
||||||
|
]);
|
||||||
|
|
||||||
|
const data = makeArrowTable(
|
||||||
|
[
|
||||||
|
{ id: 1n, score: 3.5, name: "charlie" },
|
||||||
|
{ id: 2n, score: 1.2, name: "alice" },
|
||||||
|
{ id: 3n, score: 2.8, name: "bob" },
|
||||||
|
{ id: 4n, score: 0.5, name: "david" },
|
||||||
|
{ id: 5n, score: 4.1, name: "eve" },
|
||||||
|
],
|
||||||
|
{ schema },
|
||||||
|
);
|
||||||
|
table = await db.createTable("test", data);
|
||||||
|
});
|
||||||
|
|
||||||
|
afterEach(() => {
|
||||||
|
tmpDir.removeCallback();
|
||||||
|
});
|
||||||
|
|
||||||
|
it("should sort by single column ascending", async () => {
|
||||||
|
const results = await table
|
||||||
|
.query()
|
||||||
|
.orderBy({ columnName: "score", ascending: true, nullsFirst: false })
|
||||||
|
.toArray();
|
||||||
|
|
||||||
|
expect(results.length).toBe(5);
|
||||||
|
// Verify ascending order
|
||||||
|
expect(results[0].score).toBeCloseTo(0.5, 0.001);
|
||||||
|
expect(results[1].score).toBeCloseTo(1.2, 0.001);
|
||||||
|
expect(results[2].score).toBeCloseTo(2.8, 0.001);
|
||||||
|
expect(results[3].score).toBeCloseTo(3.5, 0.001);
|
||||||
|
expect(results[4].score).toBeCloseTo(4.1, 0.001);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("should sort by single column descending", async () => {
|
||||||
|
const results = await table
|
||||||
|
.query()
|
||||||
|
.orderBy({ columnName: "score", ascending: false, nullsFirst: false })
|
||||||
|
.toArray();
|
||||||
|
|
||||||
|
expect(results.length).toBe(5);
|
||||||
|
// Verify descending order
|
||||||
|
expect(results[0].score).toBeCloseTo(4.1, 0.001);
|
||||||
|
expect(results[1].score).toBeCloseTo(3.5, 0.001);
|
||||||
|
expect(results[2].score).toBeCloseTo(2.8, 0.001);
|
||||||
|
expect(results[3].score).toBeCloseTo(1.2, 0.001);
|
||||||
|
expect(results[4].score).toBeCloseTo(0.5, 0.001);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("should use ascending as default direction", async () => {
|
||||||
|
const results = await table
|
||||||
|
.query()
|
||||||
|
.orderBy({ columnName: "score" })
|
||||||
|
.toArray();
|
||||||
|
|
||||||
|
expect(results.length).toBe(5);
|
||||||
|
// Verify ascending order (default)
|
||||||
|
expect(results[0].score).toBeCloseTo(0.5, 0.001);
|
||||||
|
expect(results[1].score).toBeCloseTo(1.2, 0.001);
|
||||||
|
expect(results[2].score).toBeCloseTo(2.8, 0.001);
|
||||||
|
expect(results[3].score).toBeCloseTo(3.5, 0.001);
|
||||||
|
expect(results[4].score).toBeCloseTo(4.1, 0.001);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("should sort by string column", async () => {
|
||||||
|
const results = await table
|
||||||
|
.query()
|
||||||
|
.orderBy({ columnName: "name" })
|
||||||
|
.toArray();
|
||||||
|
|
||||||
|
expect(results.length).toBe(5);
|
||||||
|
// Verify alphabetical order
|
||||||
|
expect(results[0].name).toBe("alice");
|
||||||
|
expect(results[1].name).toBe("bob");
|
||||||
|
expect(results[2].name).toBe("charlie");
|
||||||
|
expect(results[3].name).toBe("david");
|
||||||
|
expect(results[4].name).toBe("eve");
|
||||||
|
});
|
||||||
|
|
||||||
|
it("should support method chaining with where", async () => {
|
||||||
|
const results = await table
|
||||||
|
.query()
|
||||||
|
.where("score > 2.0")
|
||||||
|
.orderBy({ columnName: "score" })
|
||||||
|
.toArray();
|
||||||
|
expect(results.length).toBe(3);
|
||||||
|
// Verify filtered and sorted
|
||||||
|
expect(results[0].score).toBeCloseTo(2.8, 0.001);
|
||||||
|
expect(results[1].score).toBeCloseTo(3.5, 0.001);
|
||||||
|
expect(results[2].score).toBeCloseTo(4.1, 0.001);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("should support method chaining with limit", async () => {
|
||||||
|
const results = await table
|
||||||
|
.query()
|
||||||
|
.orderBy({ columnName: "score", ascending: false })
|
||||||
|
.limit(3)
|
||||||
|
.toArray();
|
||||||
|
|
||||||
|
expect(results.length).toBe(3);
|
||||||
|
// Verify top 3 in descending order
|
||||||
|
expect(results[0].score).toBeCloseTo(4.1, 0.001);
|
||||||
|
expect(results[1].score).toBeCloseTo(3.5, 0.001);
|
||||||
|
expect(results[2].score).toBeCloseTo(2.8, 0.001);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("should support method chaining with offset", async () => {
|
||||||
|
const results = await table
|
||||||
|
.query()
|
||||||
|
.orderBy({ columnName: "score" })
|
||||||
|
.offset(2)
|
||||||
|
.limit(2)
|
||||||
|
.toArray();
|
||||||
|
|
||||||
|
expect(results.length).toBe(2);
|
||||||
|
// Verify results skip first 2 and take next 2
|
||||||
|
expect(results[0].score).toBeCloseTo(2.8, 0.001);
|
||||||
|
expect(results[1].score).toBeCloseTo(3.5, 0.001);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("should support method chaining with select", async () => {
|
||||||
|
const results = await table
|
||||||
|
.query()
|
||||||
|
.orderBy({ columnName: "name" })
|
||||||
|
.select(["name", "score"])
|
||||||
|
.toArray();
|
||||||
|
|
||||||
|
expect(results.length).toBe(5);
|
||||||
|
// Verify only selected columns are present
|
||||||
|
expect(Object.keys(results[0])).toEqual(["name", "score"]);
|
||||||
|
expect(Object.keys(results[4])).toEqual(["name", "score"]);
|
||||||
|
// Verify sorted by name
|
||||||
|
expect(results[0].name).toBe("alice");
|
||||||
|
expect(results[4].name).toBe("eve");
|
||||||
|
});
|
||||||
|
|
||||||
|
it("should support complex method chaining", async () => {
|
||||||
|
const results = await table
|
||||||
|
.query()
|
||||||
|
.where("score > 1.0")
|
||||||
|
.orderBy({ columnName: "score", ascending: false })
|
||||||
|
.limit(3)
|
||||||
|
.select(["id", "score", "name"])
|
||||||
|
.toArray();
|
||||||
|
|
||||||
|
expect(results.length).toBe(3);
|
||||||
|
// Verify filtered, sorted, limited, and projected
|
||||||
|
expect(results[0].score).toBeCloseTo(4.1, 0.001);
|
||||||
|
expect(results[1].score).toBeCloseTo(3.5, 0.001);
|
||||||
|
expect(results[2].score).toBeCloseTo(2.8, 0.001);
|
||||||
|
expect(Object.keys(results[0])).toEqual(["id", "score", "name"]);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("should support multi-column ordering and null placement", async () => {
|
||||||
|
const schema = new Schema([
|
||||||
|
new Field("group", new Int64(), true),
|
||||||
|
new Field("score", new Float32(), true),
|
||||||
|
new Field("name", new Utf8(), true),
|
||||||
|
]);
|
||||||
|
|
||||||
|
const data = makeArrowTable(
|
||||||
|
[
|
||||||
|
{ group: 1n, score: null, name: "z" },
|
||||||
|
{ group: 1n, score: 1.0, name: "b" },
|
||||||
|
{ group: 1n, score: 1.0, name: "a" },
|
||||||
|
{ group: 2n, score: 0.5, name: "c" },
|
||||||
|
],
|
||||||
|
{ schema },
|
||||||
|
);
|
||||||
|
const nullTable = await (await connect(tmpDir.name)).createTable(
|
||||||
|
"test_multi_order",
|
||||||
|
data,
|
||||||
|
{ mode: "overwrite" },
|
||||||
|
);
|
||||||
|
|
||||||
|
const results = await nullTable
|
||||||
|
.query()
|
||||||
|
.orderBy([
|
||||||
|
{ columnName: "group", ascending: true, nullsFirst: false },
|
||||||
|
{ columnName: "score", ascending: true, nullsFirst: true },
|
||||||
|
{ columnName: "name", ascending: true, nullsFirst: false },
|
||||||
|
])
|
||||||
|
.toArray();
|
||||||
|
|
||||||
|
expect(results.map((r) => [r.group, r.score, r.name])).toEqual([
|
||||||
|
[1n, null, "z"],
|
||||||
|
[1n, 1.0, "a"],
|
||||||
|
[1n, 1.0, "b"],
|
||||||
|
[2n, 0.5, "c"],
|
||||||
|
]);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|||||||
@@ -617,4 +617,68 @@ describe("remote connection", () => {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
describe("renameTable", () => {
|
||||||
|
async function captureRenameRequest(
|
||||||
|
call: (db: Connection) => Promise<void>,
|
||||||
|
): Promise<{ url: string; body: Record<string, unknown> }> {
|
||||||
|
let captured: { url: string; body: Record<string, unknown> } | undefined;
|
||||||
|
await withMockDatabase((req, res) => {
|
||||||
|
let raw = "";
|
||||||
|
req.on("data", (chunk) => {
|
||||||
|
raw += chunk;
|
||||||
|
});
|
||||||
|
req.on("end", () => {
|
||||||
|
captured = {
|
||||||
|
url: req.url ?? "",
|
||||||
|
body: raw ? JSON.parse(raw) : {},
|
||||||
|
};
|
||||||
|
res.writeHead(200, { "Content-Type": "application/json" }).end("");
|
||||||
|
});
|
||||||
|
}, call);
|
||||||
|
if (!captured) {
|
||||||
|
throw new Error("mock server never saw a request");
|
||||||
|
}
|
||||||
|
return captured;
|
||||||
|
}
|
||||||
|
|
||||||
|
it("sends rename request for a table in the root namespace", async () => {
|
||||||
|
const { url, body } = await captureRenameRequest(async (db) => {
|
||||||
|
await db.renameTable("table1", "table2");
|
||||||
|
});
|
||||||
|
expect(url).toBe("/v1/table/table1/rename/");
|
||||||
|
// biome-ignore lint/style/useNamingConvention: snake_case mandated by the server wire format
|
||||||
|
expect(body).toEqual({ new_table_name: "table2" });
|
||||||
|
});
|
||||||
|
|
||||||
|
it("omits new_namespace when only the current namespace is supplied", async () => {
|
||||||
|
// Safe-default check: passing namespacePath alone must not send
|
||||||
|
// `new_namespace`, so the server keeps the table in its current
|
||||||
|
// namespace instead of silently moving it to root.
|
||||||
|
const { url, body } = await captureRenameRequest(async (db) => {
|
||||||
|
await db.renameTable("table1", "table2", {
|
||||||
|
namespacePath: ["ns1"],
|
||||||
|
});
|
||||||
|
});
|
||||||
|
expect(url).toBe("/v1/table/ns1$table1/rename/");
|
||||||
|
// biome-ignore lint/style/useNamingConvention: snake_case mandated by the server wire format
|
||||||
|
expect(body).toEqual({ new_table_name: "table2" });
|
||||||
|
});
|
||||||
|
|
||||||
|
it("includes new_namespace in the body for a cross-namespace rename", async () => {
|
||||||
|
const { url, body } = await captureRenameRequest(async (db) => {
|
||||||
|
await db.renameTable("table1", "table2", {
|
||||||
|
namespacePath: ["ns1"],
|
||||||
|
newNamespacePath: ["ns2"],
|
||||||
|
});
|
||||||
|
});
|
||||||
|
expect(url).toBe("/v1/table/ns1$table1/rename/");
|
||||||
|
expect(body).toEqual({
|
||||||
|
// biome-ignore lint/style/useNamingConvention: snake_case mandated by the server wire format
|
||||||
|
new_table_name: "table2",
|
||||||
|
// biome-ignore lint/style/useNamingConvention: snake_case mandated by the server wire format
|
||||||
|
new_namespace: ["ns2"],
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
// SPDX-FileCopyrightText: Copyright The LanceDB Authors
|
// SPDX-FileCopyrightText: Copyright The LanceDB Authors
|
||||||
|
|
||||||
|
import { spawn } from "node:child_process";
|
||||||
|
import * as path from "node:path";
|
||||||
import { RecordBatch } from "apache-arrow";
|
import { RecordBatch } from "apache-arrow";
|
||||||
import * as tmp from "tmp";
|
import * as tmp from "tmp";
|
||||||
import { Connection, Index, Table, connect, makeArrowTable } from "../lancedb";
|
import { Connection, Index, Table, connect, makeArrowTable } from "../lancedb";
|
||||||
@@ -76,4 +78,91 @@ describe("rerankers", function () {
|
|||||||
|
|
||||||
expect(result).toHaveLength(2);
|
expect(result).toHaveLength(2);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("does not keep process alive after rerank query", async function () {
|
||||||
|
const script = `
|
||||||
|
import * as lancedb from "./dist/index.js";
|
||||||
|
import * as os from "node:os";
|
||||||
|
import * as path from "node:path";
|
||||||
|
import * as fs from "node:fs/promises";
|
||||||
|
|
||||||
|
const dir = await fs.mkdtemp(path.join(os.tmpdir(), "lancedb-rerank-exit-"));
|
||||||
|
const db = await lancedb.connect(dir);
|
||||||
|
const table = await db.createTable("test", [{ text: "hello", vector: [1, 2, 3] }], {
|
||||||
|
mode: "overwrite",
|
||||||
|
});
|
||||||
|
await table.createIndex("text", { config: lancedb.Index.fts() });
|
||||||
|
await table.waitForIndex(["text_idx"], 30);
|
||||||
|
|
||||||
|
const reranker = await lancedb.rerankers.RRFReranker.create();
|
||||||
|
await table
|
||||||
|
.query()
|
||||||
|
.nearestTo([1, 2, 3])
|
||||||
|
.fullTextSearch("hello")
|
||||||
|
.rerank(reranker)
|
||||||
|
.toArray();
|
||||||
|
|
||||||
|
table.close();
|
||||||
|
db.close();
|
||||||
|
`;
|
||||||
|
|
||||||
|
await new Promise<void>((resolve, reject) => {
|
||||||
|
const child = spawn(
|
||||||
|
process.execPath,
|
||||||
|
["--input-type=module", "-e", script],
|
||||||
|
{
|
||||||
|
cwd: path.resolve(__dirname, ".."),
|
||||||
|
stdio: ["ignore", "pipe", "pipe"],
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
|
let stdout = "";
|
||||||
|
let stderr = "";
|
||||||
|
|
||||||
|
child.stdout.on("data", (chunk) => {
|
||||||
|
stdout += chunk.toString();
|
||||||
|
});
|
||||||
|
|
||||||
|
child.stderr.on("data", (chunk) => {
|
||||||
|
stderr += chunk.toString();
|
||||||
|
});
|
||||||
|
|
||||||
|
const timeout = setTimeout(() => {
|
||||||
|
child.kill();
|
||||||
|
reject(
|
||||||
|
new Error(
|
||||||
|
`child process did not exit in time\nstdout:\n${stdout}\nstderr:\n${stderr}`,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}, 20_000);
|
||||||
|
|
||||||
|
child.on("error", (err) => {
|
||||||
|
clearTimeout(timeout);
|
||||||
|
reject(err);
|
||||||
|
});
|
||||||
|
|
||||||
|
child.on("exit", (code, signal) => {
|
||||||
|
clearTimeout(timeout);
|
||||||
|
if (signal !== null) {
|
||||||
|
reject(
|
||||||
|
new Error(
|
||||||
|
`child process exited with signal ${signal}\nstdout:\n${stdout}\nstderr:\n${stderr}`,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (code !== 0) {
|
||||||
|
reject(
|
||||||
|
new Error(
|
||||||
|
`child process exited with code ${code}\nstdout:\n${stdout}\nstderr:\n${stderr}`,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
resolve();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -0,0 +1,438 @@
|
|||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
// SPDX-FileCopyrightText: Copyright The LanceDB Authors
|
||||||
|
|
||||||
|
import {
|
||||||
|
Field,
|
||||||
|
Float16,
|
||||||
|
Int32,
|
||||||
|
type RecordBatch,
|
||||||
|
RecordBatchReader,
|
||||||
|
Schema,
|
||||||
|
tableToIPC,
|
||||||
|
} from "apache-arrow";
|
||||||
|
import { makeArrowTable, makeEmptyTable } from "../lancedb/arrow";
|
||||||
|
import { Scannable } from "../lancedb/scannable";
|
||||||
|
|
||||||
|
function makeTable() {
|
||||||
|
return makeArrowTable(
|
||||||
|
[
|
||||||
|
{ id: 1, name: "a" },
|
||||||
|
{ id: 2, name: "b" },
|
||||||
|
{ id: 3, name: "c" },
|
||||||
|
],
|
||||||
|
{ vectorColumns: {} },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
async function makeReader(): Promise<RecordBatchReader> {
|
||||||
|
// `RecordBatchReader.from()` returns an unopened reader; `.schema` is only
|
||||||
|
// populated after `.open()`. Opening sync readers is synchronous.
|
||||||
|
const reader = RecordBatchReader.from(tableToIPC(makeTable()));
|
||||||
|
return reader.open() as RecordBatchReader;
|
||||||
|
}
|
||||||
|
|
||||||
|
describe("Scannable", () => {
|
||||||
|
describe("fromTable", () => {
|
||||||
|
test("reflects schema, numRows, and defaults rescannable=true", async () => {
|
||||||
|
const table = makeTable();
|
||||||
|
const scannable = await Scannable.fromTable(table);
|
||||||
|
|
||||||
|
expect(scannable.schema).toBe(table.schema);
|
||||||
|
expect(scannable.numRows).toBe(table.numRows);
|
||||||
|
expect(scannable.rescannable).toBe(true);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("throws when opts.numRows does not match table.numRows", async () => {
|
||||||
|
await expect(
|
||||||
|
Scannable.fromTable(makeTable(), { numRows: 42 }),
|
||||||
|
).rejects.toThrow(/does not match table\.numRows/);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("throws when opts.rescannable is false", async () => {
|
||||||
|
await expect(
|
||||||
|
Scannable.fromTable(makeTable(), { rescannable: false }),
|
||||||
|
).rejects.toThrow(/always rescannable/);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe("fromRecordBatchReader", () => {
|
||||||
|
test("reflects schema and defaults numRows=null, rescannable=false", async () => {
|
||||||
|
const reader = await makeReader();
|
||||||
|
const scannable = await Scannable.fromRecordBatchReader(reader);
|
||||||
|
|
||||||
|
expect(scannable.schema).toBe(reader.schema);
|
||||||
|
expect(scannable.numRows).toBeNull();
|
||||||
|
expect(scannable.rescannable).toBe(false);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("honors numRows override", async () => {
|
||||||
|
const scannable = await Scannable.fromRecordBatchReader(
|
||||||
|
await makeReader(),
|
||||||
|
{ numRows: 3 },
|
||||||
|
);
|
||||||
|
|
||||||
|
expect(scannable.numRows).toBe(3);
|
||||||
|
expect(scannable.rescannable).toBe(false);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("rescannable: false explicit does not throw", async () => {
|
||||||
|
const reader = await makeReader();
|
||||||
|
const scannable = await Scannable.fromRecordBatchReader(reader, {
|
||||||
|
rescannable: false,
|
||||||
|
});
|
||||||
|
expect(scannable.rescannable).toBe(false);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("throws when opts.rescannable is true", async () => {
|
||||||
|
const reader = await makeReader();
|
||||||
|
await expect(
|
||||||
|
Scannable.fromRecordBatchReader(reader, { rescannable: true }),
|
||||||
|
).rejects.toThrow(/does not accept rescannable/);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("throws when opts.rescannable is true even alongside numRows", async () => {
|
||||||
|
const reader = await makeReader();
|
||||||
|
await expect(
|
||||||
|
Scannable.fromRecordBatchReader(reader, {
|
||||||
|
numRows: 3,
|
||||||
|
rescannable: true,
|
||||||
|
}),
|
||||||
|
).rejects.toThrow(/does not accept rescannable/);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe("fromIterable", () => {
|
||||||
|
test("accepts a sync iterable of batches", async () => {
|
||||||
|
const table = makeTable();
|
||||||
|
const scannable = await Scannable.fromIterable(
|
||||||
|
table.schema,
|
||||||
|
table.batches,
|
||||||
|
);
|
||||||
|
|
||||||
|
expect(scannable.schema).toBe(table.schema);
|
||||||
|
expect(scannable.numRows).toBeNull();
|
||||||
|
expect(scannable.rescannable).toBe(false);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("accepts an async iterable of batches", async () => {
|
||||||
|
const table = makeTable();
|
||||||
|
async function* generator(): AsyncGenerator<RecordBatch> {
|
||||||
|
for (const batch of table.batches) {
|
||||||
|
yield batch;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const scannable = await Scannable.fromIterable(table.schema, generator());
|
||||||
|
expect(scannable.schema).toBe(table.schema);
|
||||||
|
expect(scannable.rescannable).toBe(false);
|
||||||
|
});
|
||||||
|
|
||||||
|
describe("rescannable: true detection", () => {
|
||||||
|
// Replayable inputs: [Symbol.iterator]() / [Symbol.asyncIterator]()
|
||||||
|
// returns a fresh iterator each call. Must NOT throw.
|
||||||
|
|
||||||
|
test("Array passes (fresh ArrayIterator each call)", async () => {
|
||||||
|
const table = makeTable();
|
||||||
|
const scannable = await Scannable.fromIterable(
|
||||||
|
table.schema,
|
||||||
|
table.batches,
|
||||||
|
{ rescannable: true },
|
||||||
|
);
|
||||||
|
expect(scannable.rescannable).toBe(true);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("Set passes (fresh SetIterator each call)", async () => {
|
||||||
|
const table = makeTable();
|
||||||
|
const set = new Set<RecordBatch>(table.batches);
|
||||||
|
const scannable = await Scannable.fromIterable(table.schema, set, {
|
||||||
|
rescannable: true,
|
||||||
|
});
|
||||||
|
expect(scannable.rescannable).toBe(true);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("custom Iterable returning a fresh iterator passes", async () => {
|
||||||
|
const table = makeTable();
|
||||||
|
const replayable: Iterable<RecordBatch> = {
|
||||||
|
[Symbol.iterator]() {
|
||||||
|
return table.batches[Symbol.iterator]();
|
||||||
|
},
|
||||||
|
};
|
||||||
|
const scannable = await Scannable.fromIterable(
|
||||||
|
table.schema,
|
||||||
|
replayable,
|
||||||
|
{ rescannable: true },
|
||||||
|
);
|
||||||
|
expect(scannable.rescannable).toBe(true);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("object with generator method passes (fresh generator each call)", async () => {
|
||||||
|
const table = makeTable();
|
||||||
|
const replayable: Iterable<RecordBatch> = {
|
||||||
|
*[Symbol.iterator]() {
|
||||||
|
for (const batch of table.batches) yield batch;
|
||||||
|
},
|
||||||
|
};
|
||||||
|
const scannable = await Scannable.fromIterable(
|
||||||
|
table.schema,
|
||||||
|
replayable,
|
||||||
|
{ rescannable: true },
|
||||||
|
);
|
||||||
|
expect(scannable.rescannable).toBe(true);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("empty Array passes (replayable degenerate case)", async () => {
|
||||||
|
const schema = makeTable().schema;
|
||||||
|
const scannable = await Scannable.fromIterable(
|
||||||
|
schema,
|
||||||
|
[] as RecordBatch[],
|
||||||
|
{ rescannable: true },
|
||||||
|
);
|
||||||
|
expect(scannable.rescannable).toBe(true);
|
||||||
|
});
|
||||||
|
|
||||||
|
// One-shot inputs: [Symbol.iterator]() / [Symbol.asyncIterator]()
|
||||||
|
// returns the same object, or the input is already-an-iterator.
|
||||||
|
// Must throw with a /one-shot/ message.
|
||||||
|
|
||||||
|
test("sync generator throws", async () => {
|
||||||
|
const table = makeTable();
|
||||||
|
function* generator(): Generator<RecordBatch> {
|
||||||
|
for (const batch of table.batches) yield batch;
|
||||||
|
}
|
||||||
|
await expect(
|
||||||
|
Scannable.fromIterable(table.schema, generator(), {
|
||||||
|
rescannable: true,
|
||||||
|
}),
|
||||||
|
).rejects.toThrow(/one-shot/);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("async generator throws", async () => {
|
||||||
|
const table = makeTable();
|
||||||
|
async function* generator(): AsyncGenerator<RecordBatch> {
|
||||||
|
for (const batch of table.batches) yield batch;
|
||||||
|
}
|
||||||
|
await expect(
|
||||||
|
Scannable.fromIterable(table.schema, generator(), {
|
||||||
|
rescannable: true,
|
||||||
|
}),
|
||||||
|
).rejects.toThrow(/one-shot/);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("empty generator throws (one-shot degenerate case)", async () => {
|
||||||
|
const schema = makeTable().schema;
|
||||||
|
function* generator(): Generator<RecordBatch> {
|
||||||
|
// intentionally empty; yields nothing.
|
||||||
|
}
|
||||||
|
await expect(
|
||||||
|
Scannable.fromIterable(schema, generator(), { rescannable: true }),
|
||||||
|
).rejects.toThrow(/one-shot/);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("custom self-iterator throws", async () => {
|
||||||
|
const table = makeTable();
|
||||||
|
const batches = table.batches;
|
||||||
|
let i = 0;
|
||||||
|
const oneShot: Iterable<RecordBatch> & Iterator<RecordBatch> = {
|
||||||
|
[Symbol.iterator]() {
|
||||||
|
return this;
|
||||||
|
},
|
||||||
|
next() {
|
||||||
|
if (i >= batches.length) {
|
||||||
|
return { done: true, value: undefined };
|
||||||
|
}
|
||||||
|
return { done: false, value: batches[i++] };
|
||||||
|
},
|
||||||
|
};
|
||||||
|
await expect(
|
||||||
|
Scannable.fromIterable(table.schema, oneShot, { rescannable: true }),
|
||||||
|
).rejects.toThrow(/one-shot/);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("Array.values() (IterableIterator) throws", async () => {
|
||||||
|
const table = makeTable();
|
||||||
|
const iter = table.batches.values();
|
||||||
|
await expect(
|
||||||
|
Scannable.fromIterable(table.schema, iter, { rescannable: true }),
|
||||||
|
).rejects.toThrow(/one-shot/);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("raw iterator (only `.next`) throws", async () => {
|
||||||
|
const table = makeTable();
|
||||||
|
const batches = table.batches;
|
||||||
|
let i = 0;
|
||||||
|
const rawIter = {
|
||||||
|
next(): IteratorResult<RecordBatch> {
|
||||||
|
if (i >= batches.length) {
|
||||||
|
return { done: true, value: undefined };
|
||||||
|
}
|
||||||
|
return { done: false, value: batches[i++] };
|
||||||
|
},
|
||||||
|
};
|
||||||
|
await expect(
|
||||||
|
Scannable.fromIterable(
|
||||||
|
table.schema,
|
||||||
|
rawIter as unknown as Iterable<RecordBatch>,
|
||||||
|
{ rescannable: true },
|
||||||
|
),
|
||||||
|
).rejects.toThrow(/one-shot/);
|
||||||
|
});
|
||||||
|
|
||||||
|
// Edge: null/undefined must not crash the detection helper. The
|
||||||
|
// null check belongs to `normalizeIterator` and only fires when a
|
||||||
|
// scan starts.
|
||||||
|
|
||||||
|
test("null input does not crash detection at construction", async () => {
|
||||||
|
const schema = makeTable().schema;
|
||||||
|
await expect(
|
||||||
|
Scannable.fromIterable(
|
||||||
|
schema,
|
||||||
|
null as unknown as Iterable<RecordBatch>,
|
||||||
|
{
|
||||||
|
rescannable: true,
|
||||||
|
},
|
||||||
|
),
|
||||||
|
).resolves.toBeDefined();
|
||||||
|
});
|
||||||
|
|
||||||
|
test("undefined input does not crash detection at construction", async () => {
|
||||||
|
const schema = makeTable().schema;
|
||||||
|
await expect(
|
||||||
|
Scannable.fromIterable(
|
||||||
|
schema,
|
||||||
|
undefined as unknown as Iterable<RecordBatch>,
|
||||||
|
{ rescannable: true },
|
||||||
|
),
|
||||||
|
).resolves.toBeDefined();
|
||||||
|
});
|
||||||
|
|
||||||
|
// Default (rescannable omitted) skips the check entirely, so even
|
||||||
|
// pathological inputs construct without throwing here.
|
||||||
|
|
||||||
|
test("rescannable omitted skips detection entirely (generator passes)", async () => {
|
||||||
|
const table = makeTable();
|
||||||
|
function* generator(): Generator<RecordBatch> {
|
||||||
|
for (const batch of table.batches) yield batch;
|
||||||
|
}
|
||||||
|
const scannable = await Scannable.fromIterable(
|
||||||
|
table.schema,
|
||||||
|
generator(),
|
||||||
|
);
|
||||||
|
expect(scannable.rescannable).toBe(false);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("rescannable: false explicit skips detection entirely (generator passes)", async () => {
|
||||||
|
const table = makeTable();
|
||||||
|
function* generator(): Generator<RecordBatch> {
|
||||||
|
for (const batch of table.batches) yield batch;
|
||||||
|
}
|
||||||
|
const scannable = await Scannable.fromIterable(
|
||||||
|
table.schema,
|
||||||
|
generator(),
|
||||||
|
{ rescannable: false },
|
||||||
|
);
|
||||||
|
expect(scannable.rescannable).toBe(false);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe("fromFactory", () => {
|
||||||
|
test("defaults rescannable=true and does not invoke the factory eagerly", async () => {
|
||||||
|
const table = makeTable();
|
||||||
|
const factory = jest.fn(() => table.batches);
|
||||||
|
|
||||||
|
const scannable = await Scannable.fromFactory(table.schema, factory);
|
||||||
|
|
||||||
|
expect(scannable.schema).toBe(table.schema);
|
||||||
|
expect(scannable.rescannable).toBe(true);
|
||||||
|
expect(factory).not.toHaveBeenCalled();
|
||||||
|
});
|
||||||
|
|
||||||
|
test("honors rescannable and numRows overrides", async () => {
|
||||||
|
const table = makeTable();
|
||||||
|
const scannable = await Scannable.fromFactory(
|
||||||
|
table.schema,
|
||||||
|
() => table.batches,
|
||||||
|
{ numRows: 7, rescannable: false },
|
||||||
|
);
|
||||||
|
|
||||||
|
expect(scannable.numRows).toBe(7);
|
||||||
|
expect(scannable.rescannable).toBe(false);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe("validation", () => {
|
||||||
|
test("throws when numRows is negative", async () => {
|
||||||
|
await expect(
|
||||||
|
Scannable.fromFactory(makeTable().schema, () => [], { numRows: -1 }),
|
||||||
|
).rejects.toThrow(/non-negative/);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("throws when numRows is not an integer", async () => {
|
||||||
|
await expect(
|
||||||
|
Scannable.fromFactory(makeTable().schema, () => [], { numRows: 3.5 }),
|
||||||
|
).rejects.toThrow(/integer/);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe("native handle", () => {
|
||||||
|
test("exposes a native handle via inner", async () => {
|
||||||
|
const scannable = await Scannable.fromTable(makeTable());
|
||||||
|
expect(scannable.inner).toBeDefined();
|
||||||
|
expect(typeof scannable.inner).toBe("object");
|
||||||
|
expect(scannable.inner).not.toBeNull();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// Schema-variety construction tests. Each asserts that construction
|
||||||
|
// succeeds against a richer Arrow schema, which transitively exercises
|
||||||
|
// schema serialization and the Rust-side `ipc_file_to_schema` for types
|
||||||
|
// beyond flat primitives.
|
||||||
|
describe("schema variety", () => {
|
||||||
|
test("accepts an empty table", async () => {
|
||||||
|
const schema = new Schema([new Field("id", new Int32(), true)]);
|
||||||
|
const table = makeEmptyTable(schema);
|
||||||
|
const scannable = await Scannable.fromTable(table);
|
||||||
|
|
||||||
|
expect(scannable.numRows).toBe(0);
|
||||||
|
expect(scannable.schema).toBe(table.schema);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("accepts nested struct and list columns", async () => {
|
||||||
|
const table = makeArrowTable(
|
||||||
|
[
|
||||||
|
{ id: 1, point: { x: 0, y: 0 }, tags: ["a", "b"] },
|
||||||
|
{ id: 2, point: { x: 1, y: 2 }, tags: ["c"] },
|
||||||
|
],
|
||||||
|
{ vectorColumns: {} },
|
||||||
|
);
|
||||||
|
const scannable = await Scannable.fromTable(table);
|
||||||
|
|
||||||
|
expect(scannable.schema).toBe(table.schema);
|
||||||
|
expect(scannable.numRows).toBe(2);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("accepts a FixedSizeList (vector) column", async () => {
|
||||||
|
const table = makeArrowTable(
|
||||||
|
[
|
||||||
|
{ id: 1, vec: [1, 2, 3] },
|
||||||
|
{ id: 2, vec: [4, 5, 6] },
|
||||||
|
],
|
||||||
|
{ vectorColumns: { vec: { type: new Float16() } } },
|
||||||
|
);
|
||||||
|
const scannable = await Scannable.fromTable(table);
|
||||||
|
|
||||||
|
expect(scannable.schema).toBe(table.schema);
|
||||||
|
expect(scannable.numRows).toBe(2);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("accepts a table with many columns", async () => {
|
||||||
|
const row: Record<string, number> = {};
|
||||||
|
for (let i = 0; i < 50; i++) row[`c${i}`] = i;
|
||||||
|
const table = makeArrowTable([row, row], { vectorColumns: {} });
|
||||||
|
const scannable = await Scannable.fromTable(table);
|
||||||
|
|
||||||
|
expect(scannable.schema.fields.length).toBe(50);
|
||||||
|
expect(scannable.numRows).toBe(2);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -28,6 +28,7 @@ import {
|
|||||||
List,
|
List,
|
||||||
Schema,
|
Schema,
|
||||||
SchemaLike,
|
SchemaLike,
|
||||||
|
Struct,
|
||||||
Type,
|
Type,
|
||||||
Uint8,
|
Uint8,
|
||||||
Utf8,
|
Utf8,
|
||||||
@@ -103,7 +104,7 @@ describe.each([arrow15, arrow16, arrow17, arrow18])(
|
|||||||
},
|
},
|
||||||
numIndices: 0,
|
numIndices: 0,
|
||||||
numRows: 3,
|
numRows: 3,
|
||||||
totalBytes: 24,
|
totalBytes: 44,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -115,6 +116,48 @@ describe.each([arrow15, arrow16, arrow17, arrow18])(
|
|||||||
await expect(table.countRows()).resolves.toBe(1);
|
await expect(table.countRows()).resolves.toBe(1);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("should invoke the progress callback", async () => {
|
||||||
|
const events: import("../lancedb").WriteProgress[] = [];
|
||||||
|
await table.add([{ id: 1 }, { id: 2 }, { id: 3 }], {
|
||||||
|
progress: (p) => events.push(p),
|
||||||
|
});
|
||||||
|
|
||||||
|
expect(events.length).toBeGreaterThan(0);
|
||||||
|
const last = events[events.length - 1];
|
||||||
|
expect(last.done).toBe(true);
|
||||||
|
// Earlier callbacks must have done=false.
|
||||||
|
for (const ev of events.slice(0, -1)) {
|
||||||
|
expect(ev.done).toBe(false);
|
||||||
|
}
|
||||||
|
// outputRows reflects the rows added in this call, not table size.
|
||||||
|
expect(last.outputRows).toBe(3);
|
||||||
|
// The input source (an array) reports a row count, so totalRows is set.
|
||||||
|
expect(last.totalRows).toBe(3);
|
||||||
|
// outputRows is monotonic.
|
||||||
|
for (let i = 1; i < events.length; i++) {
|
||||||
|
expect(events[i].outputRows).toBeGreaterThanOrEqual(
|
||||||
|
events[i - 1].outputRows,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
it("should swallow errors thrown from the progress callback", async () => {
|
||||||
|
const warn = jest
|
||||||
|
.spyOn(console, "warn")
|
||||||
|
.mockImplementation(() => undefined);
|
||||||
|
try {
|
||||||
|
const res = await table.add([{ id: 1 }, { id: 2 }], {
|
||||||
|
progress: () => {
|
||||||
|
throw new Error("callback bomb");
|
||||||
|
},
|
||||||
|
});
|
||||||
|
expect(res.version).toBeGreaterThan(0);
|
||||||
|
expect(warn).toHaveBeenCalled();
|
||||||
|
} finally {
|
||||||
|
warn.mockRestore();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
it("should let me close the table", async () => {
|
it("should let me close the table", async () => {
|
||||||
expect(table.isOpen()).toBe(true);
|
expect(table.isOpen()).toBe(true);
|
||||||
table.close();
|
table.close();
|
||||||
@@ -312,6 +355,66 @@ describe.each([arrow15, arrow16, arrow17, arrow18])(
|
|||||||
expect(res.getChild("id")?.toJSON()).toEqual([2, 3]);
|
expect(res.getChild("id")?.toJSON()).toEqual([2, 3]);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("should support takeRowIds with bigint array", async () => {
|
||||||
|
await table.add([{ id: 1 }, { id: 2 }, { id: 3 }]);
|
||||||
|
// Get actual row IDs using withRowId()
|
||||||
|
const allRows = await table.query().withRowId().toArray();
|
||||||
|
const rowIds = allRows.map((row) => row._rowid) as bigint[];
|
||||||
|
|
||||||
|
// Verify row IDs are bigint
|
||||||
|
expect(typeof rowIds[0]).toBe("bigint");
|
||||||
|
|
||||||
|
// Use takeRowIds with bigint array (the main use case from issue #2722)
|
||||||
|
const res = await table.takeRowIds([rowIds[0], rowIds[2]]).toArray();
|
||||||
|
expect(res.map((r) => r.id)).toEqual([1, 3]);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("should support takeRowIds with number array for backwards compatibility", async () => {
|
||||||
|
await table.add([{ id: 1 }, { id: 2 }, { id: 3 }]);
|
||||||
|
// Small row IDs can be passed as numbers
|
||||||
|
const res = await table.takeRowIds([0, 2]).toArray();
|
||||||
|
expect(res.map((r) => r.id)).toEqual([1, 3]);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("should support takeRowIds with mixed bigint and number array", async () => {
|
||||||
|
await table.add([{ id: 1 }, { id: 2 }, { id: 3 }]);
|
||||||
|
// Mixed array of bigint and number
|
||||||
|
const res = await table.takeRowIds([0n, 1, 2n]).toArray();
|
||||||
|
expect(res.map((r) => r.id)).toEqual([1, 2, 3]);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("should throw for non-integer number in takeRowIds", () => {
|
||||||
|
expect(() => table.takeRowIds([1.5])).toThrow(
|
||||||
|
"Row id must be an integer (or bigint)",
|
||||||
|
);
|
||||||
|
expect(() => table.takeRowIds([0, 1.1, 2])).toThrow(
|
||||||
|
"Row id must be an integer (or bigint)",
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("should throw for negative number in takeRowIds", () => {
|
||||||
|
expect(() => table.takeRowIds([-1])).toThrow("Row id cannot be negative");
|
||||||
|
expect(() => table.takeRowIds([0, -5, 2])).toThrow(
|
||||||
|
"Row id cannot be negative",
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("should throw for unsafe large number in takeRowIds", () => {
|
||||||
|
// Number.MAX_SAFE_INTEGER + 1 is not safe
|
||||||
|
const unsafeNumber = Number.MAX_SAFE_INTEGER + 1;
|
||||||
|
expect(() => table.takeRowIds([unsafeNumber])).toThrow(
|
||||||
|
"Row id is too large for number; use bigint instead",
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("should reject negative bigint in takeRowIds", async () => {
|
||||||
|
await table.add([{ id: 1 }]);
|
||||||
|
// Negative bigint should be rejected by the Rust layer
|
||||||
|
expect(() => {
|
||||||
|
table.takeRowIds([-1n]);
|
||||||
|
}).toThrow("Row id cannot be negative");
|
||||||
|
});
|
||||||
|
|
||||||
it("should return the table as an instance of an arrow table", async () => {
|
it("should return the table as an instance of an arrow table", async () => {
|
||||||
const arrowTbl = await table.toArrow();
|
const arrowTbl = await table.toArrow();
|
||||||
expect(arrowTbl).toBeInstanceOf(ArrowTable);
|
expect(arrowTbl).toBeInstanceOf(ArrowTable);
|
||||||
@@ -678,6 +781,113 @@ describe("When creating an index", () => {
|
|||||||
expect(indices2.length).toBe(0);
|
expect(indices2.length).toBe(0);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("should create and search a nested vector index", async () => {
|
||||||
|
const db = await connect(tmpDir.name);
|
||||||
|
const nestedSchema = new Schema([
|
||||||
|
new Field("id", new Int32(), true),
|
||||||
|
new Field(
|
||||||
|
"image",
|
||||||
|
new Struct([
|
||||||
|
new Field(
|
||||||
|
"embedding",
|
||||||
|
new FixedSizeList(2, new Field("item", new Float32(), true)),
|
||||||
|
true,
|
||||||
|
),
|
||||||
|
]),
|
||||||
|
true,
|
||||||
|
),
|
||||||
|
]);
|
||||||
|
const nestedTable = await db.createTable(
|
||||||
|
"nested_vector",
|
||||||
|
makeArrowTable(
|
||||||
|
Array.from({ length: 300 }, (_, id) => ({
|
||||||
|
id,
|
||||||
|
image: { embedding: [id, id + 1] },
|
||||||
|
})),
|
||||||
|
{ schema: nestedSchema },
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
await nestedTable.createIndex("image.embedding", {
|
||||||
|
name: "image_embedding_idx",
|
||||||
|
});
|
||||||
|
const indices = await nestedTable.listIndices();
|
||||||
|
expect(indices).toContainEqual({
|
||||||
|
name: "image_embedding_idx",
|
||||||
|
indexType: "IvfPq",
|
||||||
|
columns: ["image.embedding"],
|
||||||
|
});
|
||||||
|
|
||||||
|
const explicit = await nestedTable
|
||||||
|
.query()
|
||||||
|
.nearestTo([0.0, 1.0])
|
||||||
|
.column("image.embedding")
|
||||||
|
.limit(1)
|
||||||
|
.toArray();
|
||||||
|
const inferred = await nestedTable
|
||||||
|
.query()
|
||||||
|
.nearestTo([0.0, 1.0])
|
||||||
|
.limit(1)
|
||||||
|
.toArray();
|
||||||
|
expect(inferred[0].id).toEqual(explicit[0].id);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("should report multiple nested vector candidates", async () => {
|
||||||
|
const db = await connect(tmpDir.name);
|
||||||
|
const nestedSchema = new Schema([
|
||||||
|
new Field(
|
||||||
|
"image",
|
||||||
|
new Struct([
|
||||||
|
new Field(
|
||||||
|
"embedding",
|
||||||
|
new FixedSizeList(2, new Field("item", new Float32(), true)),
|
||||||
|
true,
|
||||||
|
),
|
||||||
|
]),
|
||||||
|
true,
|
||||||
|
),
|
||||||
|
new Field(
|
||||||
|
"text",
|
||||||
|
new Struct([
|
||||||
|
new Field(
|
||||||
|
"embedding",
|
||||||
|
new FixedSizeList(2, new Field("item", new Float32(), true)),
|
||||||
|
true,
|
||||||
|
),
|
||||||
|
]),
|
||||||
|
true,
|
||||||
|
),
|
||||||
|
]);
|
||||||
|
const nestedTable = await db.createTable(
|
||||||
|
"multiple_nested_vectors",
|
||||||
|
makeArrowTable(
|
||||||
|
[
|
||||||
|
{
|
||||||
|
image: { embedding: [0.0, 1.0] },
|
||||||
|
text: { embedding: [2.0, 3.0] },
|
||||||
|
},
|
||||||
|
],
|
||||||
|
{ schema: nestedSchema },
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
await expect(
|
||||||
|
nestedTable.query().nearestTo([0.0, 1.0]).limit(1).toArray(),
|
||||||
|
).rejects.toThrow(/image\.embedding.*text\.embedding/);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("should report when no default vector column exists", async () => {
|
||||||
|
const db = await connect(tmpDir.name);
|
||||||
|
const noVectorTable = await db.createTable(
|
||||||
|
"no_vector",
|
||||||
|
makeArrowTable([{ id: 0, label: "cat" }]),
|
||||||
|
);
|
||||||
|
|
||||||
|
await expect(
|
||||||
|
noVectorTable.query().nearestTo([0.0, 1.0]).limit(1).toArray(),
|
||||||
|
).rejects.toThrow(/No vector column/);
|
||||||
|
});
|
||||||
|
|
||||||
it("should wait for index readiness", async () => {
|
it("should wait for index readiness", async () => {
|
||||||
// Create an index and then wait for it to be ready
|
// Create an index and then wait for it to be ready
|
||||||
await tbl.createIndex("vec");
|
await tbl.createIndex("vec");
|
||||||
@@ -1199,6 +1409,98 @@ describe("schema evolution", function () {
|
|||||||
expect(await table.schema()).toEqual(expectedSchema);
|
expect(await table.schema()).toEqual(expectedSchema);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("can add columns with schema for explicit data types", async function () {
|
||||||
|
const con = await connect(tmpDir.name);
|
||||||
|
const table = await con.createTable("vectors", [
|
||||||
|
{ id: 1n, vector: [0.1, 0.2] },
|
||||||
|
]);
|
||||||
|
|
||||||
|
// Define schema for new columns with explicit data types
|
||||||
|
// Note: All columns must be nullable when using addColumns with Schema
|
||||||
|
// because they are initially populated with null values
|
||||||
|
const newColumnsSchema = new Schema([
|
||||||
|
new Field("price", new Float64(), true),
|
||||||
|
new Field("category", new Utf8(), true),
|
||||||
|
new Field("rating", new Int32(), true),
|
||||||
|
]);
|
||||||
|
|
||||||
|
const result = await table.addColumns(newColumnsSchema);
|
||||||
|
expect(result).toHaveProperty("version");
|
||||||
|
expect(result.version).toBe(2);
|
||||||
|
|
||||||
|
const expectedSchema = new Schema([
|
||||||
|
new Field("id", new Int64(), true),
|
||||||
|
new Field(
|
||||||
|
"vector",
|
||||||
|
new FixedSizeList(2, new Field("item", new Float32(), true)),
|
||||||
|
true,
|
||||||
|
),
|
||||||
|
new Field("price", new Float64(), true),
|
||||||
|
new Field("category", new Utf8(), true),
|
||||||
|
new Field("rating", new Int32(), true),
|
||||||
|
]);
|
||||||
|
expect(await table.schema()).toEqual(expectedSchema);
|
||||||
|
|
||||||
|
// Verify that new columns are populated with null values
|
||||||
|
const results = await table.query().toArray();
|
||||||
|
expect(results).toHaveLength(1);
|
||||||
|
expect(results[0].price).toBeNull();
|
||||||
|
expect(results[0].category).toBeNull();
|
||||||
|
expect(results[0].rating).toBeNull();
|
||||||
|
});
|
||||||
|
|
||||||
|
it("can add a single column using Field", async function () {
|
||||||
|
const con = await connect(tmpDir.name);
|
||||||
|
const table = await con.createTable("vectors", [
|
||||||
|
{ id: 1n, vector: [0.1, 0.2] },
|
||||||
|
]);
|
||||||
|
|
||||||
|
// Add a single field
|
||||||
|
const priceField = new Field("price", new Float64(), true);
|
||||||
|
const result = await table.addColumns(priceField);
|
||||||
|
expect(result).toHaveProperty("version");
|
||||||
|
expect(result.version).toBe(2);
|
||||||
|
|
||||||
|
const expectedSchema = new Schema([
|
||||||
|
new Field("id", new Int64(), true),
|
||||||
|
new Field(
|
||||||
|
"vector",
|
||||||
|
new FixedSizeList(2, new Field("item", new Float32(), true)),
|
||||||
|
true,
|
||||||
|
),
|
||||||
|
new Field("price", new Float64(), true),
|
||||||
|
]);
|
||||||
|
expect(await table.schema()).toEqual(expectedSchema);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("can add multiple columns using array of Fields", async function () {
|
||||||
|
const con = await connect(tmpDir.name);
|
||||||
|
const table = await con.createTable("vectors", [
|
||||||
|
{ id: 1n, vector: [0.1, 0.2] },
|
||||||
|
]);
|
||||||
|
|
||||||
|
// Add multiple fields as array
|
||||||
|
const fields = [
|
||||||
|
new Field("price", new Float64(), true),
|
||||||
|
new Field("category", new Utf8(), true),
|
||||||
|
];
|
||||||
|
const result = await table.addColumns(fields);
|
||||||
|
expect(result).toHaveProperty("version");
|
||||||
|
expect(result.version).toBe(2);
|
||||||
|
|
||||||
|
const expectedSchema = new Schema([
|
||||||
|
new Field("id", new Int64(), true),
|
||||||
|
new Field(
|
||||||
|
"vector",
|
||||||
|
new FixedSizeList(2, new Field("item", new Float32(), true)),
|
||||||
|
true,
|
||||||
|
),
|
||||||
|
new Field("price", new Float64(), true),
|
||||||
|
new Field("category", new Utf8(), true),
|
||||||
|
]);
|
||||||
|
expect(await table.schema()).toEqual(expectedSchema);
|
||||||
|
});
|
||||||
|
|
||||||
it("can alter the columns in the schema", async function () {
|
it("can alter the columns in the schema", async function () {
|
||||||
const con = await connect(tmpDir.name);
|
const con = await connect(tmpDir.name);
|
||||||
const schema = new Schema([
|
const schema = new Schema([
|
||||||
@@ -1520,9 +1822,9 @@ describe("when optimizing a dataset", () => {
|
|||||||
|
|
||||||
it("delete unverified", async () => {
|
it("delete unverified", async () => {
|
||||||
const version = await table.version();
|
const version = await table.version();
|
||||||
const versionFile = `${tmpDir.name}/${table.name}.lance/_versions/${
|
const versionFile = `${tmpDir.name}/${table.name}.lance/_versions/${String(
|
||||||
version - 1
|
18446744073709551615n - (BigInt(version) - 1n),
|
||||||
}.manifest`;
|
).padStart(20, "0")}.manifest`;
|
||||||
fs.rmSync(versionFile);
|
fs.rmSync(versionFile);
|
||||||
|
|
||||||
let stats = await table.optimize({ deleteUnverified: false });
|
let stats = await table.optimize({ deleteUnverified: false });
|
||||||
@@ -1637,6 +1939,65 @@ describe.each([arrow15, arrow16, arrow17, arrow18])(
|
|||||||
expect(results2[0].text).toBe(data[1].text);
|
expect(results2[0].text).toBe(data[1].text);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test("full text search fast search", async () => {
|
||||||
|
const db = await connect(tmpDir.name);
|
||||||
|
const data = [{ text: "hello world", vector: [0.1, 0.2, 0.3], id: 1 }];
|
||||||
|
const table = await db.createTable("test", data);
|
||||||
|
await table.createIndex("text", {
|
||||||
|
config: Index.fts(),
|
||||||
|
});
|
||||||
|
|
||||||
|
// Insert unindexed data after creating the index.
|
||||||
|
await table.add([{ text: "xyz", vector: [0.4, 0.5, 0.6], id: 2 }]);
|
||||||
|
|
||||||
|
const withFlatSearch = await table
|
||||||
|
.search("xyz", "fts")
|
||||||
|
.limit(10)
|
||||||
|
.toArray();
|
||||||
|
expect(withFlatSearch.length).toBeGreaterThan(0);
|
||||||
|
|
||||||
|
const fastSearchResults = await table
|
||||||
|
.search("xyz", "fts")
|
||||||
|
.fastSearch()
|
||||||
|
.limit(10)
|
||||||
|
.toArray();
|
||||||
|
expect(fastSearchResults.length).toBe(0);
|
||||||
|
|
||||||
|
const nearestToTextFastSearch = await table
|
||||||
|
.query()
|
||||||
|
.nearestToText("xyz")
|
||||||
|
.fastSearch()
|
||||||
|
.limit(10)
|
||||||
|
.toArray();
|
||||||
|
expect(nearestToTextFastSearch.length).toBe(0);
|
||||||
|
|
||||||
|
// fastSearch should be chainable with other methods.
|
||||||
|
const chainedFastSearch = await table
|
||||||
|
.search("xyz", "fts")
|
||||||
|
.fastSearch()
|
||||||
|
.select(["text"])
|
||||||
|
.limit(5)
|
||||||
|
.toArray();
|
||||||
|
expect(chainedFastSearch.length).toBe(0);
|
||||||
|
|
||||||
|
await table.optimize();
|
||||||
|
|
||||||
|
const indexedFastSearch = await table
|
||||||
|
.search("xyz", "fts")
|
||||||
|
.fastSearch()
|
||||||
|
.limit(10)
|
||||||
|
.toArray();
|
||||||
|
expect(indexedFastSearch.length).toBeGreaterThan(0);
|
||||||
|
|
||||||
|
const indexedNearestToTextFastSearch = await table
|
||||||
|
.query()
|
||||||
|
.nearestToText("xyz")
|
||||||
|
.fastSearch()
|
||||||
|
.limit(10)
|
||||||
|
.toArray();
|
||||||
|
expect(indexedNearestToTextFastSearch.length).toBeGreaterThan(0);
|
||||||
|
});
|
||||||
|
|
||||||
test("prewarm full text search index", async () => {
|
test("prewarm full text search index", async () => {
|
||||||
const db = await connect(tmpDir.name);
|
const db = await connect(tmpDir.name);
|
||||||
const data = [
|
const data = [
|
||||||
@@ -1659,6 +2020,25 @@ describe.each([arrow15, arrow16, arrow17, arrow18])(
|
|||||||
expect(results.length).toBe(3);
|
expect(results.length).toBe(3);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test("prewarmData errors on local tables", async () => {
|
||||||
|
const db = await connect(tmpDir.name);
|
||||||
|
const data = [
|
||||||
|
{ text: "alpha", vector: [0.1, 0.2, 0.3] },
|
||||||
|
{ text: "beta", vector: [0.4, 0.5, 0.6] },
|
||||||
|
];
|
||||||
|
const table = await db.createTable("prewarm_data_test", data);
|
||||||
|
|
||||||
|
// prewarmData is only supported on remote tables. We verify the call
|
||||||
|
// is wired through napi and surfaces the expected error for both
|
||||||
|
// arg shapes (undefined and string[]).
|
||||||
|
await expect(table.prewarmData()).rejects.toThrow(
|
||||||
|
"prewarm_data is currently only supported on remote tables",
|
||||||
|
);
|
||||||
|
await expect(table.prewarmData(["text"])).rejects.toThrow(
|
||||||
|
"prewarm_data is currently only supported on remote tables",
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
test("full text index on list", async () => {
|
test("full text index on list", async () => {
|
||||||
const db = await connect(tmpDir.name);
|
const db = await connect(tmpDir.name);
|
||||||
const data = [
|
const data = [
|
||||||
@@ -2085,3 +2465,163 @@ describe("when creating an empty table", () => {
|
|||||||
expect((actualSchema.fields[1].type as Float64).precision).toBe(2);
|
expect((actualSchema.fields[1].type as Float64).precision).toBe(2);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Ensure we can create float32 arrays without using Arrow
|
||||||
|
// by utilizing native JS TypedArray support
|
||||||
|
//
|
||||||
|
// https://github.com/lancedb/lancedb/issues/3115
|
||||||
|
describe("when creating a table with Float32Array vectors", () => {
|
||||||
|
let tmpDir: tmp.DirResult;
|
||||||
|
beforeEach(() => {
|
||||||
|
tmpDir = tmp.dirSync({ unsafeCleanup: true });
|
||||||
|
});
|
||||||
|
afterEach(() => {
|
||||||
|
tmpDir.removeCallback();
|
||||||
|
});
|
||||||
|
|
||||||
|
it("should persist Float32Array as FixedSizeList<Float32> in the LanceDB schema", async () => {
|
||||||
|
const db = await connect(tmpDir.name);
|
||||||
|
const table = await db.createTable("test", [
|
||||||
|
{ id: "a", vector: new Float32Array([0.1, 0.2, 0.3]) },
|
||||||
|
{ id: "b", vector: new Float32Array([0.4, 0.5, 0.6]) },
|
||||||
|
]);
|
||||||
|
|
||||||
|
const schema = await table.schema();
|
||||||
|
const vectorField = schema.fields.find((f) => f.name === "vector");
|
||||||
|
expect(vectorField).toBeDefined();
|
||||||
|
expect(vectorField!.type).toBeInstanceOf(FixedSizeList);
|
||||||
|
|
||||||
|
const fsl = vectorField!.type as FixedSizeList;
|
||||||
|
expect(fsl.listSize).toBe(3);
|
||||||
|
expect(fsl.children[0].type.typeId).toBe(Type.Float);
|
||||||
|
// precision: HALF=0, SINGLE=1, DOUBLE=2
|
||||||
|
expect((fsl.children[0].type as Float32).precision).toBe(1);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe("setUnenforcedPrimaryKey", () => {
|
||||||
|
let tmpDir: tmp.DirResult;
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
tmpDir = tmp.dirSync({ unsafeCleanup: true });
|
||||||
|
});
|
||||||
|
afterEach(() => tmpDir.removeCallback());
|
||||||
|
|
||||||
|
it("sets a single-column primary key (string or one-element array)", async () => {
|
||||||
|
const conn = await connect(tmpDir.name);
|
||||||
|
const schema = new arrow.Schema([
|
||||||
|
new arrow.Field("id", new arrow.Int64(), false),
|
||||||
|
]);
|
||||||
|
const t1 = await conn.createEmptyTable("t1", schema);
|
||||||
|
await t1.setUnenforcedPrimaryKey("id");
|
||||||
|
|
||||||
|
const t2 = await conn.createEmptyTable("t2", schema);
|
||||||
|
await t2.setUnenforcedPrimaryKey(["id"]);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("rejects a compound primary key", async () => {
|
||||||
|
const conn = await connect(tmpDir.name);
|
||||||
|
const table = await conn.createEmptyTable(
|
||||||
|
"t",
|
||||||
|
new arrow.Schema([
|
||||||
|
new arrow.Field("id", new arrow.Int64(), false),
|
||||||
|
new arrow.Field("name", new arrow.Utf8(), false),
|
||||||
|
]),
|
||||||
|
);
|
||||||
|
await expect(
|
||||||
|
table.setUnenforcedPrimaryKey(["id", "name"]),
|
||||||
|
).rejects.toThrow();
|
||||||
|
});
|
||||||
|
|
||||||
|
it("rejects changing the primary key once set", async () => {
|
||||||
|
const conn = await connect(tmpDir.name);
|
||||||
|
const table = await conn.createEmptyTable(
|
||||||
|
"t",
|
||||||
|
new arrow.Schema([
|
||||||
|
new arrow.Field("id", new arrow.Int64(), false),
|
||||||
|
new arrow.Field("name", new arrow.Utf8(), false),
|
||||||
|
]),
|
||||||
|
);
|
||||||
|
await table.setUnenforcedPrimaryKey("id");
|
||||||
|
await expect(table.setUnenforcedPrimaryKey("name")).rejects.toThrow();
|
||||||
|
await expect(table.setUnenforcedPrimaryKey("id")).rejects.toThrow();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe("setLsmWriteSpec / unsetLsmWriteSpec", () => {
|
||||||
|
let tmpDir: tmp.DirResult;
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
tmpDir = tmp.dirSync({ unsafeCleanup: true });
|
||||||
|
});
|
||||||
|
afterEach(() => tmpDir.removeCallback());
|
||||||
|
|
||||||
|
async function makeTable(conn: Connection): Promise<Table> {
|
||||||
|
return await conn.createEmptyTable(
|
||||||
|
"t",
|
||||||
|
new arrow.Schema([new arrow.Field("id", new arrow.Int64(), false)]),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
it("installs and removes a bucket spec", async () => {
|
||||||
|
const conn = await connect(tmpDir.name);
|
||||||
|
const table = await makeTable(conn);
|
||||||
|
|
||||||
|
await table.setUnenforcedPrimaryKey("id");
|
||||||
|
await table.setLsmWriteSpec({
|
||||||
|
specType: "bucket",
|
||||||
|
column: "id",
|
||||||
|
numBuckets: 4,
|
||||||
|
});
|
||||||
|
await table.unsetLsmWriteSpec();
|
||||||
|
// A second unset errors — there is no spec left to remove.
|
||||||
|
await expect(table.unsetLsmWriteSpec()).rejects.toThrow();
|
||||||
|
// A fresh spec can be installed after unset.
|
||||||
|
await table.setLsmWriteSpec({
|
||||||
|
specType: "bucket",
|
||||||
|
column: "id",
|
||||||
|
numBuckets: 8,
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
it("installs an unsharded spec", async () => {
|
||||||
|
const conn = await connect(tmpDir.name);
|
||||||
|
const table = await makeTable(conn);
|
||||||
|
|
||||||
|
await table.setUnenforcedPrimaryKey("id");
|
||||||
|
await table.setLsmWriteSpec({ specType: "unsharded" });
|
||||||
|
await table.unsetLsmWriteSpec();
|
||||||
|
});
|
||||||
|
|
||||||
|
it("installs an identity spec", async () => {
|
||||||
|
const conn = await connect(tmpDir.name);
|
||||||
|
const table = await makeTable(conn);
|
||||||
|
|
||||||
|
await table.setUnenforcedPrimaryKey("id");
|
||||||
|
await table.setLsmWriteSpec({ specType: "identity", column: "id" });
|
||||||
|
await table.unsetLsmWriteSpec();
|
||||||
|
});
|
||||||
|
|
||||||
|
it("rejects an invalid spec", async () => {
|
||||||
|
const conn = await connect(tmpDir.name);
|
||||||
|
const table = await makeTable(conn);
|
||||||
|
|
||||||
|
await table.setUnenforcedPrimaryKey("id");
|
||||||
|
// num_buckets out of range.
|
||||||
|
await expect(
|
||||||
|
table.setLsmWriteSpec({
|
||||||
|
specType: "bucket",
|
||||||
|
column: "id",
|
||||||
|
numBuckets: 0,
|
||||||
|
}),
|
||||||
|
).rejects.toThrow();
|
||||||
|
// Column mismatch.
|
||||||
|
await expect(
|
||||||
|
table.setLsmWriteSpec({
|
||||||
|
specType: "bucket",
|
||||||
|
column: "missing",
|
||||||
|
numBuckets: 4,
|
||||||
|
}),
|
||||||
|
).rejects.toThrow();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|||||||
@@ -0,0 +1,110 @@
|
|||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
// SPDX-FileCopyrightText: Copyright The LanceDB Authors
|
||||||
|
|
||||||
|
import * as tmp from "tmp";
|
||||||
|
|
||||||
|
import { type Table, connect } from "../lancedb";
|
||||||
|
import {
|
||||||
|
Field,
|
||||||
|
FixedSizeList,
|
||||||
|
Float32,
|
||||||
|
Int64,
|
||||||
|
Schema,
|
||||||
|
makeArrowTable,
|
||||||
|
} from "../lancedb/arrow";
|
||||||
|
|
||||||
|
describe("Vector query with different typed arrays", () => {
|
||||||
|
let tmpDir: tmp.DirResult;
|
||||||
|
|
||||||
|
afterEach(() => {
|
||||||
|
tmpDir?.removeCallback();
|
||||||
|
});
|
||||||
|
|
||||||
|
async function createFloat32Table(): Promise<Table> {
|
||||||
|
tmpDir = tmp.dirSync({ unsafeCleanup: true });
|
||||||
|
const db = await connect(tmpDir.name);
|
||||||
|
const schema = new Schema([
|
||||||
|
new Field("id", new Int64(), true),
|
||||||
|
new Field(
|
||||||
|
"vec",
|
||||||
|
new FixedSizeList(2, new Field("item", new Float32())),
|
||||||
|
true,
|
||||||
|
),
|
||||||
|
]);
|
||||||
|
const data = makeArrowTable(
|
||||||
|
[
|
||||||
|
{ id: 1n, vec: [1.0, 0.0] },
|
||||||
|
{ id: 2n, vec: [0.0, 1.0] },
|
||||||
|
{ id: 3n, vec: [1.0, 1.0] },
|
||||||
|
],
|
||||||
|
{ schema },
|
||||||
|
);
|
||||||
|
return db.createTable("test_f32", data);
|
||||||
|
}
|
||||||
|
|
||||||
|
it("should search with Float32Array (baseline)", async () => {
|
||||||
|
const table = await createFloat32Table();
|
||||||
|
const results = await table
|
||||||
|
.query()
|
||||||
|
.nearestTo(new Float32Array([1.0, 0.0]))
|
||||||
|
.limit(1)
|
||||||
|
.toArray();
|
||||||
|
|
||||||
|
expect(results.length).toBe(1);
|
||||||
|
expect(Number(results[0].id)).toBe(1);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("should search with number[] (backward compat)", async () => {
|
||||||
|
const table = await createFloat32Table();
|
||||||
|
const results = await table
|
||||||
|
.query()
|
||||||
|
.nearestTo([1.0, 0.0])
|
||||||
|
.limit(1)
|
||||||
|
.toArray();
|
||||||
|
|
||||||
|
expect(results.length).toBe(1);
|
||||||
|
expect(Number(results[0].id)).toBe(1);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("should search with Float64Array via raw path", async () => {
|
||||||
|
const table = await createFloat32Table();
|
||||||
|
const results = await table
|
||||||
|
.query()
|
||||||
|
.nearestTo(new Float64Array([1.0, 0.0]))
|
||||||
|
.limit(1)
|
||||||
|
.toArray();
|
||||||
|
|
||||||
|
expect(results.length).toBe(1);
|
||||||
|
expect(Number(results[0].id)).toBe(1);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("should add multiple query vectors with Float64Array", async () => {
|
||||||
|
const table = await createFloat32Table();
|
||||||
|
const results = await table
|
||||||
|
.query()
|
||||||
|
.nearestTo(new Float64Array([1.0, 0.0]))
|
||||||
|
.addQueryVector(new Float64Array([0.0, 1.0]))
|
||||||
|
.limit(2)
|
||||||
|
.toArray();
|
||||||
|
|
||||||
|
expect(results.length).toBeGreaterThanOrEqual(2);
|
||||||
|
});
|
||||||
|
|
||||||
|
// Float16Array is only available in Node 22+; not in TypeScript's standard lib yet
|
||||||
|
const float16ArrayCtor = (globalThis as unknown as Record<string, unknown>)
|
||||||
|
.Float16Array as (new (values: number[]) => unknown) | undefined;
|
||||||
|
const hasFloat16 = float16ArrayCtor !== undefined;
|
||||||
|
const f16it = hasFloat16 ? it : it.skip;
|
||||||
|
|
||||||
|
f16it("should search with Float16Array via raw path", async () => {
|
||||||
|
const table = await createFloat32Table();
|
||||||
|
const results = await table
|
||||||
|
.query()
|
||||||
|
.nearestTo(new float16ArrayCtor!([1.0, 0.0]) as Float32Array)
|
||||||
|
.limit(1)
|
||||||
|
.toArray();
|
||||||
|
|
||||||
|
expect(results.length).toBe(1);
|
||||||
|
expect(Number(results[0].id)).toBe(1);
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -38,5 +38,14 @@ test("filtering examples", async () => {
|
|||||||
// --8<-- [start:sql_search]
|
// --8<-- [start:sql_search]
|
||||||
await tbl.query().where("id = 10").limit(10).toArray();
|
await tbl.query().where("id = 10").limit(10).toArray();
|
||||||
// --8<-- [end:sql_search]
|
// --8<-- [end:sql_search]
|
||||||
|
|
||||||
|
// --8<-- [start:orderby_search]
|
||||||
|
await tbl
|
||||||
|
.query()
|
||||||
|
.where("id > 10")
|
||||||
|
.orderBy({ columnName: "id", ascending: false })
|
||||||
|
.limit(5)
|
||||||
|
.toArray();
|
||||||
|
// --8<-- [end:orderby_search]
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Generated
-4903
File diff suppressed because it is too large
Load Diff
@@ -11,16 +11,17 @@
|
|||||||
"test": "node --experimental-vm-modules node_modules/.bin/jest --testEnvironment jest-environment-node-single-context --verbose",
|
"test": "node --experimental-vm-modules node_modules/.bin/jest --testEnvironment jest-environment-node-single-context --verbose",
|
||||||
"lint": "biome check *.ts && biome format *.ts",
|
"lint": "biome check *.ts && biome format *.ts",
|
||||||
"lint-ci": "biome ci .",
|
"lint-ci": "biome ci .",
|
||||||
"lint-fix": "biome check --write *.ts && npm run format",
|
"lint-fix": "biome check --write *.ts && pnpm format",
|
||||||
"format": "biome format --write *.ts"
|
"format": "biome format --write *.ts"
|
||||||
},
|
},
|
||||||
"author": "Lance Devs",
|
"author": "Lance Devs",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
|
"packageManager": "pnpm@11.1.1",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@huggingface/transformers": "^3.0.2",
|
"@huggingface/transformers": "3.0.2",
|
||||||
"@lancedb/lancedb": "file:../dist",
|
"@lancedb/lancedb": "file:../dist",
|
||||||
"openai": "^4.29.2",
|
"openai": "4.29.2",
|
||||||
"sharp": "^0.33.5"
|
"sharp": "0.33.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@biomejs/biome": "^1.7.3",
|
"@biomejs/biome": "^1.7.3",
|
||||||
|
|||||||
Generated
+3466
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,13 @@
|
|||||||
|
# Block resolution of versions less than 24h old (Shai-Hulud window).
|
||||||
|
# This is the pnpm 11 default but pinned here so it's visible to
|
||||||
|
# reviewers and survives a future pnpm major flipping the default.
|
||||||
|
minimumReleaseAge: 1440
|
||||||
|
|
||||||
|
# Fail install if a transitive dep tries to run an unapproved script.
|
||||||
|
strictDepBuilds: true
|
||||||
|
|
||||||
|
allowBuilds:
|
||||||
|
'@biomejs/biome': true
|
||||||
|
onnxruntime-node: true
|
||||||
|
protobufjs: true
|
||||||
|
sharp: true
|
||||||
+97
-2
@@ -20,6 +20,8 @@ import {
|
|||||||
Float32,
|
Float32,
|
||||||
Float64,
|
Float64,
|
||||||
Int,
|
Int,
|
||||||
|
Int8,
|
||||||
|
Int16,
|
||||||
Int32,
|
Int32,
|
||||||
Int64,
|
Int64,
|
||||||
LargeBinary,
|
LargeBinary,
|
||||||
@@ -35,6 +37,8 @@ import {
|
|||||||
Timestamp,
|
Timestamp,
|
||||||
Type,
|
Type,
|
||||||
Uint8,
|
Uint8,
|
||||||
|
Uint16,
|
||||||
|
Uint32,
|
||||||
Utf8,
|
Utf8,
|
||||||
Vector,
|
Vector,
|
||||||
makeVector as arrowMakeVector,
|
makeVector as arrowMakeVector,
|
||||||
@@ -113,8 +117,9 @@ export type TableLike =
|
|||||||
export type IntoVector =
|
export type IntoVector =
|
||||||
| Float32Array
|
| Float32Array
|
||||||
| Float64Array
|
| Float64Array
|
||||||
|
| Uint8Array
|
||||||
| number[]
|
| number[]
|
||||||
| Promise<Float32Array | Float64Array | number[]>;
|
| Promise<Float32Array | Float64Array | Uint8Array | number[]>;
|
||||||
|
|
||||||
export type MultiVector = IntoVector[];
|
export type MultiVector = IntoVector[];
|
||||||
|
|
||||||
@@ -122,14 +127,48 @@ export function isMultiVector(value: unknown): value is MultiVector {
|
|||||||
return Array.isArray(value) && isIntoVector(value[0]);
|
return Array.isArray(value) && isIntoVector(value[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Float16Array is not in TypeScript's standard lib yet; access dynamically
|
||||||
|
type Float16ArrayCtor = new (
|
||||||
|
...args: unknown[]
|
||||||
|
) => { buffer: ArrayBuffer; byteOffset: number; byteLength: number };
|
||||||
|
const float16ArrayCtor = (globalThis as unknown as Record<string, unknown>)
|
||||||
|
.Float16Array as Float16ArrayCtor | undefined;
|
||||||
|
|
||||||
export function isIntoVector(value: unknown): value is IntoVector {
|
export function isIntoVector(value: unknown): value is IntoVector {
|
||||||
return (
|
return (
|
||||||
value instanceof Float32Array ||
|
value instanceof Float32Array ||
|
||||||
value instanceof Float64Array ||
|
value instanceof Float64Array ||
|
||||||
|
value instanceof Uint8Array ||
|
||||||
|
(float16ArrayCtor !== undefined && value instanceof float16ArrayCtor) ||
|
||||||
(Array.isArray(value) && !Array.isArray(value[0]))
|
(Array.isArray(value) && !Array.isArray(value[0]))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Extract the underlying byte buffer and data type from a typed array
|
||||||
|
* for passing to the Rust NAPI layer without precision loss.
|
||||||
|
*/
|
||||||
|
export function extractVectorBuffer(
|
||||||
|
vector: Float32Array | Float64Array | Uint8Array,
|
||||||
|
): { data: Uint8Array; dtype: string } | null {
|
||||||
|
if (float16ArrayCtor !== undefined && vector instanceof float16ArrayCtor) {
|
||||||
|
return {
|
||||||
|
data: new Uint8Array(vector.buffer, vector.byteOffset, vector.byteLength),
|
||||||
|
dtype: "float16",
|
||||||
|
};
|
||||||
|
}
|
||||||
|
if (vector instanceof Float64Array) {
|
||||||
|
return {
|
||||||
|
data: new Uint8Array(vector.buffer, vector.byteOffset, vector.byteLength),
|
||||||
|
dtype: "float64",
|
||||||
|
};
|
||||||
|
}
|
||||||
|
if (vector instanceof Uint8Array && !(vector instanceof Float32Array)) {
|
||||||
|
return { data: vector, dtype: "uint8" };
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
export function isArrowTable(value: object): value is TableLike {
|
export function isArrowTable(value: object): value is TableLike {
|
||||||
if (value instanceof ArrowTable) return true;
|
if (value instanceof ArrowTable) return true;
|
||||||
return "schema" in value && "batches" in value;
|
return "schema" in value && "batches" in value;
|
||||||
@@ -529,7 +568,8 @@ function isObject(value: unknown): value is Record<string, unknown> {
|
|||||||
!(value instanceof Date) &&
|
!(value instanceof Date) &&
|
||||||
!(value instanceof Set) &&
|
!(value instanceof Set) &&
|
||||||
!(value instanceof Map) &&
|
!(value instanceof Map) &&
|
||||||
!(value instanceof Buffer)
|
!(value instanceof Buffer) &&
|
||||||
|
!ArrayBuffer.isView(value)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -588,6 +628,13 @@ function inferType(
|
|||||||
return new Bool();
|
return new Bool();
|
||||||
} else if (value instanceof Buffer) {
|
} else if (value instanceof Buffer) {
|
||||||
return new Binary();
|
return new Binary();
|
||||||
|
} else if (ArrayBuffer.isView(value) && !(value instanceof DataView)) {
|
||||||
|
const info = typedArrayToArrowType(value);
|
||||||
|
if (info !== undefined) {
|
||||||
|
const child = new Field("item", info.elementType, true);
|
||||||
|
return new FixedSizeList(info.length, child);
|
||||||
|
}
|
||||||
|
return undefined;
|
||||||
} else if (Array.isArray(value)) {
|
} else if (Array.isArray(value)) {
|
||||||
if (value.length === 0) {
|
if (value.length === 0) {
|
||||||
return undefined; // Without any values we can't infer the type
|
return undefined; // Without any values we can't infer the type
|
||||||
@@ -746,6 +793,32 @@ function makeListVector(lists: unknown[][]): Vector<unknown> {
|
|||||||
return listBuilder.finish().toVector();
|
return listBuilder.finish().toVector();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Map a JS TypedArray instance to the corresponding Arrow element DataType
|
||||||
|
* and its length. Returns undefined if the value is not a recognized TypedArray.
|
||||||
|
*/
|
||||||
|
function typedArrayToArrowType(
|
||||||
|
value: ArrayBufferView,
|
||||||
|
): { elementType: DataType; length: number } | undefined {
|
||||||
|
if (value instanceof Float32Array)
|
||||||
|
return { elementType: new Float32(), length: value.length };
|
||||||
|
if (value instanceof Float64Array)
|
||||||
|
return { elementType: new Float64(), length: value.length };
|
||||||
|
if (value instanceof Uint8Array)
|
||||||
|
return { elementType: new Uint8(), length: value.length };
|
||||||
|
if (value instanceof Uint16Array)
|
||||||
|
return { elementType: new Uint16(), length: value.length };
|
||||||
|
if (value instanceof Uint32Array)
|
||||||
|
return { elementType: new Uint32(), length: value.length };
|
||||||
|
if (value instanceof Int8Array)
|
||||||
|
return { elementType: new Int8(), length: value.length };
|
||||||
|
if (value instanceof Int16Array)
|
||||||
|
return { elementType: new Int16(), length: value.length };
|
||||||
|
if (value instanceof Int32Array)
|
||||||
|
return { elementType: new Int32(), length: value.length };
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
|
||||||
/** Helper function to convert an Array of JS values to an Arrow Vector */
|
/** Helper function to convert an Array of JS values to an Arrow Vector */
|
||||||
function makeVector(
|
function makeVector(
|
||||||
values: unknown[],
|
values: unknown[],
|
||||||
@@ -814,6 +887,16 @@ function makeVector(
|
|||||||
"makeVector cannot infer the type if all values are null or undefined",
|
"makeVector cannot infer the type if all values are null or undefined",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
if (ArrayBuffer.isView(sampleValue) && !(sampleValue instanceof DataView)) {
|
||||||
|
const info = typedArrayToArrowType(sampleValue);
|
||||||
|
if (info !== undefined) {
|
||||||
|
const fslType = new FixedSizeList(
|
||||||
|
info.length,
|
||||||
|
new Field("item", info.elementType, true),
|
||||||
|
);
|
||||||
|
return vectorFromArray(values, fslType);
|
||||||
|
}
|
||||||
|
}
|
||||||
if (Array.isArray(sampleValue)) {
|
if (Array.isArray(sampleValue)) {
|
||||||
// Default Arrow inference doesn't handle list types
|
// Default Arrow inference doesn't handle list types
|
||||||
return makeListVector(values as unknown[][]);
|
return makeListVector(values as unknown[][]);
|
||||||
@@ -1208,6 +1291,18 @@ export async function fromRecordBatchToBuffer(
|
|||||||
return Buffer.from(await writer.toUint8Array());
|
return Buffer.from(await writer.toUint8Array());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a buffer containing a single record batch using the Arrow IPC Stream
|
||||||
|
* serialization. Each call produces a self-contained Stream message (schema +
|
||||||
|
* batch + EOS) suitable for incremental decode by `arrow_ipc::reader::StreamReader`.
|
||||||
|
*/
|
||||||
|
export async function fromRecordBatchToStreamBuffer(
|
||||||
|
batch: RecordBatch,
|
||||||
|
): Promise<Buffer> {
|
||||||
|
const writer = RecordBatchStreamWriter.writeAll([batch]);
|
||||||
|
return Buffer.from(await writer.toUint8Array());
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Serialize an Arrow Table into a buffer using the Arrow IPC Stream serialization
|
* Serialize an Arrow Table into a buffer using the Arrow IPC Stream serialization
|
||||||
*
|
*
|
||||||
|
|||||||
+241
-61
@@ -16,6 +16,18 @@ import {
|
|||||||
} from "./arrow";
|
} from "./arrow";
|
||||||
import { EmbeddingFunctionConfig, getRegistry } from "./embedding/registry";
|
import { EmbeddingFunctionConfig, getRegistry } from "./embedding/registry";
|
||||||
import { Connection as LanceDbConnection } from "./native";
|
import { Connection as LanceDbConnection } from "./native";
|
||||||
|
import type {
|
||||||
|
CreateNamespaceResponse,
|
||||||
|
DescribeNamespaceResponse,
|
||||||
|
DropNamespaceResponse,
|
||||||
|
ListNamespacesResponse,
|
||||||
|
} from "./native";
|
||||||
|
export type {
|
||||||
|
CreateNamespaceResponse,
|
||||||
|
DescribeNamespaceResponse,
|
||||||
|
DropNamespaceResponse,
|
||||||
|
ListNamespacesResponse,
|
||||||
|
};
|
||||||
import { sanitizeTable } from "./sanitize";
|
import { sanitizeTable } from "./sanitize";
|
||||||
import { LocalTable, Table } from "./table";
|
import { LocalTable, Table } from "./table";
|
||||||
|
|
||||||
@@ -42,7 +54,7 @@ export interface CreateTableOptions {
|
|||||||
* Options already set on the connection will be inherited by the table,
|
* Options already set on the connection will be inherited by the table,
|
||||||
* but can be overridden here.
|
* but can be overridden here.
|
||||||
*
|
*
|
||||||
* The available options are described at https://lancedb.com/docs/storage/
|
* The available options are described at https://docs.lancedb.com/storage/
|
||||||
*/
|
*/
|
||||||
storageOptions?: Record<string, string>;
|
storageOptions?: Record<string, string>;
|
||||||
|
|
||||||
@@ -78,7 +90,7 @@ export interface OpenTableOptions {
|
|||||||
* Options already set on the connection will be inherited by the table,
|
* Options already set on the connection will be inherited by the table,
|
||||||
* but can be overridden here.
|
* but can be overridden here.
|
||||||
*
|
*
|
||||||
* The available options are described at https://lancedb.com/docs/storage/
|
* The available options are described at https://docs.lancedb.com/storage/
|
||||||
*/
|
*/
|
||||||
storageOptions?: Record<string, string>;
|
storageOptions?: Record<string, string>;
|
||||||
/**
|
/**
|
||||||
@@ -110,6 +122,41 @@ export interface TableNamesOptions {
|
|||||||
/** An optional limit to the number of results to return. */
|
/** An optional limit to the number of results to return. */
|
||||||
limit?: number;
|
limit?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface ListNamespacesOptions {
|
||||||
|
/** Token from a previous response for pagination. */
|
||||||
|
pageToken?: string;
|
||||||
|
/** An optional limit to the number of results to return. */
|
||||||
|
limit?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface CreateNamespaceOptions {
|
||||||
|
/** Creation mode. */
|
||||||
|
mode?: "create" | "exist_ok" | "overwrite";
|
||||||
|
/** Properties to set on the new namespace. */
|
||||||
|
properties?: Record<string, string>;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface DropNamespaceOptions {
|
||||||
|
/** Whether to skip if the namespace doesn't exist, or fail. */
|
||||||
|
mode?: "skip" | "fail";
|
||||||
|
/** Refuse to drop if non-empty (restrict) or drop recursively (cascade). */
|
||||||
|
behavior?: "restrict" | "cascade";
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface RenameTableOptions {
|
||||||
|
/**
|
||||||
|
* The namespace path of the table being renamed. Defaults to the root
|
||||||
|
* namespace (`[]`) when omitted.
|
||||||
|
*/
|
||||||
|
namespacePath?: string[];
|
||||||
|
/**
|
||||||
|
* The namespace path to move the table to as part of the rename. When
|
||||||
|
* omitted the table stays in `namespacePath`.
|
||||||
|
*/
|
||||||
|
newNamespacePath?: string[];
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A LanceDB Connection that allows you to open tables and create new ones.
|
* A LanceDB Connection that allows you to open tables and create new ones.
|
||||||
*
|
*
|
||||||
@@ -166,25 +213,25 @@ export abstract class Connection {
|
|||||||
* List all the table names in this database.
|
* List all the table names in this database.
|
||||||
*
|
*
|
||||||
* Tables will be returned in lexicographical order.
|
* Tables will be returned in lexicographical order.
|
||||||
* @param {string[]} namespace - The namespace to list tables from (defaults to root namespace)
|
* @param {string[]} namespacePath - The namespace path to list tables from (defaults to root namespace)
|
||||||
* @param {Partial<TableNamesOptions>} options - options to control the
|
* @param {Partial<TableNamesOptions>} options - options to control the
|
||||||
* paging / start point
|
* paging / start point
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
abstract tableNames(
|
abstract tableNames(
|
||||||
namespace?: string[],
|
namespacePath?: string[],
|
||||||
options?: Partial<TableNamesOptions>,
|
options?: Partial<TableNamesOptions>,
|
||||||
): Promise<string[]>;
|
): Promise<string[]>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Open a table in the database.
|
* Open a table in the database.
|
||||||
* @param {string} name - The name of the table
|
* @param {string} name - The name of the table
|
||||||
* @param {string[]} namespace - The namespace of the table (defaults to root namespace)
|
* @param {string[]} namespacePath - The namespace path of the table (defaults to root namespace)
|
||||||
* @param {Partial<OpenTableOptions>} options - Additional options
|
* @param {Partial<OpenTableOptions>} options - Additional options
|
||||||
*/
|
*/
|
||||||
abstract openTable(
|
abstract openTable(
|
||||||
name: string,
|
name: string,
|
||||||
namespace?: string[],
|
namespacePath?: string[],
|
||||||
options?: Partial<OpenTableOptions>,
|
options?: Partial<OpenTableOptions>,
|
||||||
): Promise<Table>;
|
): Promise<Table>;
|
||||||
|
|
||||||
@@ -193,7 +240,7 @@ export abstract class Connection {
|
|||||||
* @param {object} options - The options object.
|
* @param {object} options - The options object.
|
||||||
* @param {string} options.name - The name of the table.
|
* @param {string} options.name - The name of the table.
|
||||||
* @param {Data} options.data - Non-empty Array of Records to be inserted into the table
|
* @param {Data} options.data - Non-empty Array of Records to be inserted into the table
|
||||||
* @param {string[]} namespace - The namespace to create the table in (defaults to root namespace)
|
* @param {string[]} namespacePath - The namespace path to create the table in (defaults to root namespace)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
abstract createTable(
|
abstract createTable(
|
||||||
@@ -201,7 +248,7 @@ export abstract class Connection {
|
|||||||
name: string;
|
name: string;
|
||||||
data: Data;
|
data: Data;
|
||||||
} & Partial<CreateTableOptions>,
|
} & Partial<CreateTableOptions>,
|
||||||
namespace?: string[],
|
namespacePath?: string[],
|
||||||
): Promise<Table>;
|
): Promise<Table>;
|
||||||
/**
|
/**
|
||||||
* Creates a new Table and initialize it with new data.
|
* Creates a new Table and initialize it with new data.
|
||||||
@@ -220,13 +267,13 @@ export abstract class Connection {
|
|||||||
* @param {string} name - The name of the table.
|
* @param {string} name - The name of the table.
|
||||||
* @param {Record<string, unknown>[] | TableLike} data - Non-empty Array of Records
|
* @param {Record<string, unknown>[] | TableLike} data - Non-empty Array of Records
|
||||||
* to be inserted into the table
|
* to be inserted into the table
|
||||||
* @param {string[]} namespace - The namespace to create the table in (defaults to root namespace)
|
* @param {string[]} namespacePath - The namespace path to create the table in (defaults to root namespace)
|
||||||
* @param {Partial<CreateTableOptions>} options - Additional options
|
* @param {Partial<CreateTableOptions>} options - Additional options
|
||||||
*/
|
*/
|
||||||
abstract createTable(
|
abstract createTable(
|
||||||
name: string,
|
name: string,
|
||||||
data: Record<string, unknown>[] | TableLike,
|
data: Record<string, unknown>[] | TableLike,
|
||||||
namespace?: string[],
|
namespacePath?: string[],
|
||||||
options?: Partial<CreateTableOptions>,
|
options?: Partial<CreateTableOptions>,
|
||||||
): Promise<Table>;
|
): Promise<Table>;
|
||||||
|
|
||||||
@@ -245,28 +292,91 @@ export abstract class Connection {
|
|||||||
* Creates a new empty Table
|
* Creates a new empty Table
|
||||||
* @param {string} name - The name of the table.
|
* @param {string} name - The name of the table.
|
||||||
* @param {Schema} schema - The schema of the table
|
* @param {Schema} schema - The schema of the table
|
||||||
* @param {string[]} namespace - The namespace to create the table in (defaults to root namespace)
|
* @param {string[]} namespacePath - The namespace path to create the table in (defaults to root namespace)
|
||||||
* @param {Partial<CreateTableOptions>} options - Additional options
|
* @param {Partial<CreateTableOptions>} options - Additional options
|
||||||
*/
|
*/
|
||||||
abstract createEmptyTable(
|
abstract createEmptyTable(
|
||||||
name: string,
|
name: string,
|
||||||
schema: import("./arrow").SchemaLike,
|
schema: import("./arrow").SchemaLike,
|
||||||
namespace?: string[],
|
namespacePath?: string[],
|
||||||
options?: Partial<CreateTableOptions>,
|
options?: Partial<CreateTableOptions>,
|
||||||
): Promise<Table>;
|
): Promise<Table>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Drop an existing table.
|
* Drop an existing table.
|
||||||
* @param {string} name The name of the table to drop.
|
* @param {string} name The name of the table to drop.
|
||||||
* @param {string[]} namespace The namespace of the table (defaults to root namespace).
|
* @param {string[]} namespacePath The namespace path of the table (defaults to root namespace).
|
||||||
*/
|
*/
|
||||||
abstract dropTable(name: string, namespace?: string[]): Promise<void>;
|
abstract dropTable(name: string, namespacePath?: string[]): Promise<void>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Drop all tables in the database.
|
* Drop all tables in the database.
|
||||||
* @param {string[]} namespace The namespace to drop tables from (defaults to root namespace).
|
* @param {string[]} namespacePath The namespace path to drop tables from (defaults to root namespace).
|
||||||
*/
|
*/
|
||||||
abstract dropAllTables(namespace?: string[]): Promise<void>;
|
abstract dropAllTables(namespacePath?: string[]): Promise<void>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Describe a namespace, returning its properties.
|
||||||
|
*
|
||||||
|
* @param {string[]} namespacePath - The namespace path to describe, in
|
||||||
|
* parent → child order, e.g. `["analytics", "sales"]`.
|
||||||
|
* @returns {Promise<DescribeNamespaceResponse>} The namespace's properties
|
||||||
|
* (may be undefined if the namespace has none).
|
||||||
|
*/
|
||||||
|
abstract describeNamespace(
|
||||||
|
namespacePath: string[],
|
||||||
|
): Promise<DescribeNamespaceResponse>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* List the immediate child namespaces under the given parent.
|
||||||
|
*
|
||||||
|
* Results may be paginated. To retrieve subsequent pages, pass the
|
||||||
|
* `pageToken` returned by a previous call.
|
||||||
|
*
|
||||||
|
* @param {string[]} namespacePath - The parent namespace path. Defaults
|
||||||
|
* to the root namespace if omitted.
|
||||||
|
* @param {Partial<ListNamespacesOptions>} options - Pagination options
|
||||||
|
* (`pageToken`, `limit`).
|
||||||
|
* @returns {Promise<ListNamespacesResponse>} Child namespace names and
|
||||||
|
* an optional token for fetching the next page.
|
||||||
|
*/
|
||||||
|
abstract listNamespaces(
|
||||||
|
namespacePath?: string[],
|
||||||
|
options?: Partial<ListNamespacesOptions>,
|
||||||
|
): Promise<ListNamespacesResponse>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new namespace at the given path.
|
||||||
|
*
|
||||||
|
* @param {string[]} namespacePath - The namespace path to create.
|
||||||
|
* @param {Partial<CreateNamespaceOptions>} options - Creation `mode`
|
||||||
|
* ("create" | "exist_ok" | "overwrite") and optional `properties`
|
||||||
|
* to attach to the namespace.
|
||||||
|
* @returns {Promise<CreateNamespaceResponse>} The properties of the
|
||||||
|
* created namespace and an optional transaction id.
|
||||||
|
*/
|
||||||
|
abstract createNamespace(
|
||||||
|
namespacePath: string[],
|
||||||
|
options?: Partial<CreateNamespaceOptions>,
|
||||||
|
): Promise<CreateNamespaceResponse>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Drop a namespace.
|
||||||
|
*
|
||||||
|
* Use `behavior: "cascade"` to also drop everything contained in the
|
||||||
|
* namespace (sub-namespaces and tables). The default `"restrict"`
|
||||||
|
* behavior refuses to drop a non-empty namespace.
|
||||||
|
*
|
||||||
|
* @param {string[]} namespacePath - The namespace path to drop.
|
||||||
|
* @param {Partial<DropNamespaceOptions>} options - `mode` ("skip" | "fail"
|
||||||
|
* for missing-namespace handling) and `behavior` ("restrict" | "cascade").
|
||||||
|
* @returns {Promise<DropNamespaceResponse>} Any properties returned by
|
||||||
|
* the server and an optional transaction id.
|
||||||
|
*/
|
||||||
|
abstract dropNamespace(
|
||||||
|
namespacePath: string[],
|
||||||
|
options?: Partial<DropNamespaceOptions>,
|
||||||
|
): Promise<DropNamespaceResponse>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clone a table from a source table.
|
* Clone a table from a source table.
|
||||||
@@ -279,7 +389,7 @@ export abstract class Connection {
|
|||||||
* @param {string} targetTableName - The name of the target table to create.
|
* @param {string} targetTableName - The name of the target table to create.
|
||||||
* @param {string} sourceUri - The URI of the source table to clone from.
|
* @param {string} sourceUri - The URI of the source table to clone from.
|
||||||
* @param {object} options - Clone options.
|
* @param {object} options - Clone options.
|
||||||
* @param {string[]} options.targetNamespace - The namespace for the target table (defaults to root namespace).
|
* @param {string[]} options.targetNamespacePath - The namespace path for the target table (defaults to root namespace).
|
||||||
* @param {number} options.sourceVersion - The version of the source table to clone.
|
* @param {number} options.sourceVersion - The version of the source table to clone.
|
||||||
* @param {string} options.sourceTag - The tag of the source table to clone.
|
* @param {string} options.sourceTag - The tag of the source table to clone.
|
||||||
* @param {boolean} options.isShallow - Whether to perform a shallow clone (defaults to true).
|
* @param {boolean} options.isShallow - Whether to perform a shallow clone (defaults to true).
|
||||||
@@ -288,12 +398,30 @@ export abstract class Connection {
|
|||||||
targetTableName: string,
|
targetTableName: string,
|
||||||
sourceUri: string,
|
sourceUri: string,
|
||||||
options?: {
|
options?: {
|
||||||
targetNamespace?: string[];
|
targetNamespacePath?: string[];
|
||||||
sourceVersion?: number;
|
sourceVersion?: number;
|
||||||
sourceTag?: string;
|
sourceTag?: string;
|
||||||
isShallow?: boolean;
|
isShallow?: boolean;
|
||||||
},
|
},
|
||||||
): Promise<Table>;
|
): Promise<Table>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename a table.
|
||||||
|
*
|
||||||
|
* Currently only supported by LanceDB Cloud. Local OSS connections and
|
||||||
|
* namespace-backed connections (via {@link connectNamespace}) reject with
|
||||||
|
* a "not supported" error.
|
||||||
|
*
|
||||||
|
* @param {string} currentName - The current name of the table.
|
||||||
|
* @param {string} newName - The new name for the table.
|
||||||
|
* @param {RenameTableOptions} options - Optional namespace paths. When
|
||||||
|
* `newNamespacePath` is omitted the table stays in `namespacePath`.
|
||||||
|
*/
|
||||||
|
abstract renameTable(
|
||||||
|
currentName: string,
|
||||||
|
newName: string,
|
||||||
|
options?: RenameTableOptions,
|
||||||
|
): Promise<void>;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @hideconstructor */
|
/** @hideconstructor */
|
||||||
@@ -319,25 +447,25 @@ export class LocalConnection extends Connection {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async tableNames(
|
async tableNames(
|
||||||
namespaceOrOptions?: string[] | Partial<TableNamesOptions>,
|
namespacePathOrOptions?: string[] | Partial<TableNamesOptions>,
|
||||||
options?: Partial<TableNamesOptions>,
|
options?: Partial<TableNamesOptions>,
|
||||||
): Promise<string[]> {
|
): Promise<string[]> {
|
||||||
// Detect if first argument is namespace array or options object
|
// Detect if first argument is namespacePath array or options object
|
||||||
let namespace: string[] | undefined;
|
let namespacePath: string[] | undefined;
|
||||||
let tableNamesOptions: Partial<TableNamesOptions> | undefined;
|
let tableNamesOptions: Partial<TableNamesOptions> | undefined;
|
||||||
|
|
||||||
if (Array.isArray(namespaceOrOptions)) {
|
if (Array.isArray(namespacePathOrOptions)) {
|
||||||
// First argument is namespace array
|
// First argument is namespacePath array
|
||||||
namespace = namespaceOrOptions;
|
namespacePath = namespacePathOrOptions;
|
||||||
tableNamesOptions = options;
|
tableNamesOptions = options;
|
||||||
} else {
|
} else {
|
||||||
// First argument is options object (backwards compatibility)
|
// First argument is options object (backwards compatibility)
|
||||||
namespace = undefined;
|
namespacePath = undefined;
|
||||||
tableNamesOptions = namespaceOrOptions;
|
tableNamesOptions = namespacePathOrOptions;
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.inner.tableNames(
|
return this.inner.tableNames(
|
||||||
namespace ?? [],
|
namespacePath ?? [],
|
||||||
tableNamesOptions?.startAfter,
|
tableNamesOptions?.startAfter,
|
||||||
tableNamesOptions?.limit,
|
tableNamesOptions?.limit,
|
||||||
);
|
);
|
||||||
@@ -345,12 +473,12 @@ export class LocalConnection extends Connection {
|
|||||||
|
|
||||||
async openTable(
|
async openTable(
|
||||||
name: string,
|
name: string,
|
||||||
namespace?: string[],
|
namespacePath?: string[],
|
||||||
options?: Partial<OpenTableOptions>,
|
options?: Partial<OpenTableOptions>,
|
||||||
): Promise<Table> {
|
): Promise<Table> {
|
||||||
const innerTable = await this.inner.openTable(
|
const innerTable = await this.inner.openTable(
|
||||||
name,
|
name,
|
||||||
namespace ?? [],
|
namespacePath ?? [],
|
||||||
cleanseStorageOptions(options?.storageOptions),
|
cleanseStorageOptions(options?.storageOptions),
|
||||||
options?.indexCacheSize,
|
options?.indexCacheSize,
|
||||||
);
|
);
|
||||||
@@ -362,7 +490,7 @@ export class LocalConnection extends Connection {
|
|||||||
targetTableName: string,
|
targetTableName: string,
|
||||||
sourceUri: string,
|
sourceUri: string,
|
||||||
options?: {
|
options?: {
|
||||||
targetNamespace?: string[];
|
targetNamespacePath?: string[];
|
||||||
sourceVersion?: number;
|
sourceVersion?: number;
|
||||||
sourceTag?: string;
|
sourceTag?: string;
|
||||||
isShallow?: boolean;
|
isShallow?: boolean;
|
||||||
@@ -371,7 +499,7 @@ export class LocalConnection extends Connection {
|
|||||||
const innerTable = await this.inner.cloneTable(
|
const innerTable = await this.inner.cloneTable(
|
||||||
targetTableName,
|
targetTableName,
|
||||||
sourceUri,
|
sourceUri,
|
||||||
options?.targetNamespace ?? [],
|
options?.targetNamespacePath ?? [],
|
||||||
options?.sourceVersion ?? null,
|
options?.sourceVersion ?? null,
|
||||||
options?.sourceTag ?? null,
|
options?.sourceTag ?? null,
|
||||||
options?.isShallow ?? true,
|
options?.isShallow ?? true,
|
||||||
@@ -406,42 +534,42 @@ export class LocalConnection extends Connection {
|
|||||||
nameOrOptions:
|
nameOrOptions:
|
||||||
| string
|
| string
|
||||||
| ({ name: string; data: Data } & Partial<CreateTableOptions>),
|
| ({ name: string; data: Data } & Partial<CreateTableOptions>),
|
||||||
dataOrNamespace?: Record<string, unknown>[] | TableLike | string[],
|
dataOrNamespacePath?: Record<string, unknown>[] | TableLike | string[],
|
||||||
namespaceOrOptions?: string[] | Partial<CreateTableOptions>,
|
namespacePathOrOptions?: string[] | Partial<CreateTableOptions>,
|
||||||
options?: Partial<CreateTableOptions>,
|
options?: Partial<CreateTableOptions>,
|
||||||
): Promise<Table> {
|
): Promise<Table> {
|
||||||
if (typeof nameOrOptions !== "string" && "name" in nameOrOptions) {
|
if (typeof nameOrOptions !== "string" && "name" in nameOrOptions) {
|
||||||
// First overload: createTable(options, namespace?)
|
// First overload: createTable(options, namespacePath?)
|
||||||
const { name, data, ...createOptions } = nameOrOptions;
|
const { name, data, ...createOptions } = nameOrOptions;
|
||||||
const namespace = dataOrNamespace as string[] | undefined;
|
const namespacePath = dataOrNamespacePath as string[] | undefined;
|
||||||
return this._createTableImpl(name, data, namespace, createOptions);
|
return this._createTableImpl(name, data, namespacePath, createOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Second overload: createTable(name, data, namespace?, options?)
|
// Second overload: createTable(name, data, namespacePath?, options?)
|
||||||
const name = nameOrOptions;
|
const name = nameOrOptions;
|
||||||
const data = dataOrNamespace as Record<string, unknown>[] | TableLike;
|
const data = dataOrNamespacePath as Record<string, unknown>[] | TableLike;
|
||||||
|
|
||||||
// Detect if third argument is namespace array or options object
|
// Detect if third argument is namespacePath array or options object
|
||||||
let namespace: string[] | undefined;
|
let namespacePath: string[] | undefined;
|
||||||
let createOptions: Partial<CreateTableOptions> | undefined;
|
let createOptions: Partial<CreateTableOptions> | undefined;
|
||||||
|
|
||||||
if (Array.isArray(namespaceOrOptions)) {
|
if (Array.isArray(namespacePathOrOptions)) {
|
||||||
// Third argument is namespace array
|
// Third argument is namespacePath array
|
||||||
namespace = namespaceOrOptions;
|
namespacePath = namespacePathOrOptions;
|
||||||
createOptions = options;
|
createOptions = options;
|
||||||
} else {
|
} else {
|
||||||
// Third argument is options object (backwards compatibility)
|
// Third argument is options object (backwards compatibility)
|
||||||
namespace = undefined;
|
namespacePath = undefined;
|
||||||
createOptions = namespaceOrOptions;
|
createOptions = namespacePathOrOptions;
|
||||||
}
|
}
|
||||||
|
|
||||||
return this._createTableImpl(name, data, namespace, createOptions);
|
return this._createTableImpl(name, data, namespacePath, createOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async _createTableImpl(
|
private async _createTableImpl(
|
||||||
name: string,
|
name: string,
|
||||||
data: Data,
|
data: Data,
|
||||||
namespace?: string[],
|
namespacePath?: string[],
|
||||||
options?: Partial<CreateTableOptions>,
|
options?: Partial<CreateTableOptions>,
|
||||||
): Promise<Table> {
|
): Promise<Table> {
|
||||||
if (data === undefined) {
|
if (data === undefined) {
|
||||||
@@ -455,7 +583,7 @@ export class LocalConnection extends Connection {
|
|||||||
name,
|
name,
|
||||||
buf,
|
buf,
|
||||||
mode,
|
mode,
|
||||||
namespace ?? [],
|
namespacePath ?? [],
|
||||||
storageOptions,
|
storageOptions,
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -465,21 +593,21 @@ export class LocalConnection extends Connection {
|
|||||||
async createEmptyTable(
|
async createEmptyTable(
|
||||||
name: string,
|
name: string,
|
||||||
schema: import("./arrow").SchemaLike,
|
schema: import("./arrow").SchemaLike,
|
||||||
namespaceOrOptions?: string[] | Partial<CreateTableOptions>,
|
namespacePathOrOptions?: string[] | Partial<CreateTableOptions>,
|
||||||
options?: Partial<CreateTableOptions>,
|
options?: Partial<CreateTableOptions>,
|
||||||
): Promise<Table> {
|
): Promise<Table> {
|
||||||
// Detect if third argument is namespace array or options object
|
// Detect if third argument is namespacePath array or options object
|
||||||
let namespace: string[] | undefined;
|
let namespacePath: string[] | undefined;
|
||||||
let createOptions: Partial<CreateTableOptions> | undefined;
|
let createOptions: Partial<CreateTableOptions> | undefined;
|
||||||
|
|
||||||
if (Array.isArray(namespaceOrOptions)) {
|
if (Array.isArray(namespacePathOrOptions)) {
|
||||||
// Third argument is namespace array
|
// Third argument is namespacePath array
|
||||||
namespace = namespaceOrOptions;
|
namespacePath = namespacePathOrOptions;
|
||||||
createOptions = options;
|
createOptions = options;
|
||||||
} else {
|
} else {
|
||||||
// Third argument is options object (backwards compatibility)
|
// Third argument is options object (backwards compatibility)
|
||||||
namespace = undefined;
|
namespacePath = undefined;
|
||||||
createOptions = namespaceOrOptions;
|
createOptions = namespacePathOrOptions;
|
||||||
}
|
}
|
||||||
|
|
||||||
let mode: string = createOptions?.mode ?? "create";
|
let mode: string = createOptions?.mode ?? "create";
|
||||||
@@ -502,18 +630,70 @@ export class LocalConnection extends Connection {
|
|||||||
name,
|
name,
|
||||||
buf,
|
buf,
|
||||||
mode,
|
mode,
|
||||||
namespace ?? [],
|
namespacePath ?? [],
|
||||||
storageOptions,
|
storageOptions,
|
||||||
);
|
);
|
||||||
return new LocalTable(innerTable);
|
return new LocalTable(innerTable);
|
||||||
}
|
}
|
||||||
|
|
||||||
async dropTable(name: string, namespace?: string[]): Promise<void> {
|
async dropTable(name: string, namespacePath?: string[]): Promise<void> {
|
||||||
return this.inner.dropTable(name, namespace ?? []);
|
return this.inner.dropTable(name, namespacePath ?? []);
|
||||||
}
|
}
|
||||||
|
|
||||||
async dropAllTables(namespace?: string[]): Promise<void> {
|
async dropAllTables(namespacePath?: string[]): Promise<void> {
|
||||||
return this.inner.dropAllTables(namespace ?? []);
|
return this.inner.dropAllTables(namespacePath ?? []);
|
||||||
|
}
|
||||||
|
|
||||||
|
describeNamespace(
|
||||||
|
namespacePath: string[],
|
||||||
|
): Promise<DescribeNamespaceResponse> {
|
||||||
|
return this.inner.describeNamespace(namespacePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
listNamespaces(
|
||||||
|
namespacePath?: string[],
|
||||||
|
options?: Partial<ListNamespacesOptions>,
|
||||||
|
): Promise<ListNamespacesResponse> {
|
||||||
|
return this.inner.listNamespaces(
|
||||||
|
namespacePath ?? [],
|
||||||
|
options?.pageToken,
|
||||||
|
options?.limit,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
createNamespace(
|
||||||
|
namespacePath: string[],
|
||||||
|
options?: Partial<CreateNamespaceOptions>,
|
||||||
|
): Promise<CreateNamespaceResponse> {
|
||||||
|
return this.inner.createNamespace(
|
||||||
|
namespacePath,
|
||||||
|
options?.mode,
|
||||||
|
options?.properties,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
dropNamespace(
|
||||||
|
namespacePath: string[],
|
||||||
|
options?: Partial<DropNamespaceOptions>,
|
||||||
|
): Promise<DropNamespaceResponse> {
|
||||||
|
return this.inner.dropNamespace(
|
||||||
|
namespacePath,
|
||||||
|
options?.mode,
|
||||||
|
options?.behavior,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
async renameTable(
|
||||||
|
currentName: string,
|
||||||
|
newName: string,
|
||||||
|
options?: RenameTableOptions,
|
||||||
|
): Promise<void> {
|
||||||
|
return this.inner.renameTable(
|
||||||
|
currentName,
|
||||||
|
newName,
|
||||||
|
options?.namespacePath ?? [],
|
||||||
|
options?.newNamespacePath,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user