mirror of
https://github.com/lancedb/lancedb.git
synced 2026-11-26 12:33:59 +00:00
Merge main and align cosine fix with Lance beta.26
This commit is contained in:
+1
-1
@@ -1,5 +1,5 @@
|
||||
[tool.bumpversion]
|
||||
current_version = "0.42.0-beta.18"
|
||||
current_version = "0.42.0-beta.22"
|
||||
parse = """(?x)
|
||||
(?P<major>0|[1-9]\\d*)\\.
|
||||
(?P<minor>0|[1-9]\\d*)\\.
|
||||
|
||||
+120
-45
@@ -1,70 +1,145 @@
|
||||
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.
|
||||
# Every entry uses `versioning-strategy: lockfile-only`: bump the lockfile,
|
||||
# never widen or raise the version requirements in manifests. Those ranges are
|
||||
# our library consumers' constraints, not ours.
|
||||
#
|
||||
# Because of that, version updates are limited to minor and patch bumps.
|
||||
# A semver-breaking bump (including 0.x minor bumps such as 0.12 -> 0.13)
|
||||
# can't be satisfied without editing a manifest, so Dependabot would produce a
|
||||
# lockfile that fails `cargo --locked` and every CI job. We do those by hand.
|
||||
# This is done with `allow` rather than `ignore` because `allow.update-types`
|
||||
# only filters version updates; an `ignore` rule would also suppress security
|
||||
# updates. `dependency-type: all` matters for the same reason: `allow` does
|
||||
# apply to security updates otherwise, and most advisories are in transitive
|
||||
# dependencies.
|
||||
#
|
||||
# Security updates are grouped so advisories that land together become one PR.
|
||||
# They ignore `schedule` and `cooldown` and are opened as soon as an advisory
|
||||
# is published.
|
||||
updates:
|
||||
# Highest priority: the root Cargo workspace is statically linked into the
|
||||
# Node.js and Python native extensions we ship, so users can't patch these
|
||||
# themselves. Weekly updates keep the lockfile close to current, so security
|
||||
# fixes are usually small patch bumps.
|
||||
- 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.
|
||||
day: wednesday
|
||||
cooldown:
|
||||
default-days: 2
|
||||
versioning-strategy: lockfile-only
|
||||
groups:
|
||||
# The arrow-rs and datafusion crates are released in lockstep and have to
|
||||
# move together, so keep them in one PR instead of one per sub-crate.
|
||||
# Listed first: a dependency joins the first group it matches.
|
||||
arrow-datafusion:
|
||||
patterns:
|
||||
- arrow
|
||||
- arrow-*
|
||||
- parquet
|
||||
- parquet-*
|
||||
- datafusion
|
||||
- datafusion-*
|
||||
- object_store
|
||||
rust-minor-patch:
|
||||
allow:
|
||||
- dependency-type: all
|
||||
update-types:
|
||||
- minor
|
||||
- patch
|
||||
- version-update:semver-minor
|
||||
- version-update:semver-patch
|
||||
groups:
|
||||
cargo:
|
||||
applies-to: version-updates
|
||||
patterns:
|
||||
- "*"
|
||||
cargo-security:
|
||||
applies-to: security-updates
|
||||
patterns:
|
||||
- "*"
|
||||
|
||||
- package-ecosystem: pip
|
||||
# Python and Node.js dependencies are resolved in the user's own environment,
|
||||
# so these lockfiles only affect our dev/test setup. Lower priority: monthly.
|
||||
- package-ecosystem: uv
|
||||
directory: /python
|
||||
schedule:
|
||||
interval: weekly
|
||||
# Only update uv.lock, never widen version requirements in pyproject.toml.
|
||||
interval: monthly
|
||||
cooldown:
|
||||
default-days: 2
|
||||
versioning-strategy: lockfile-only
|
||||
allow:
|
||||
- dependency-type: all
|
||||
update-types:
|
||||
- version-update:semver-minor
|
||||
- version-update:semver-patch
|
||||
groups:
|
||||
python-deps:
|
||||
python:
|
||||
applies-to: version-updates
|
||||
patterns:
|
||||
- "*"
|
||||
|
||||
# The npm ecosystem covers pnpm lockfiles. There are two separate installs:
|
||||
# the bindings themselves and the examples, which have their own lockfile.
|
||||
# As with cargo and pip above, only bump the lockfile — the version ranges
|
||||
# in package.json are our consumers' constraints, not ours.
|
||||
- package-ecosystem: npm
|
||||
directory: /nodejs
|
||||
schedule:
|
||||
interval: weekly
|
||||
versioning-strategy: lockfile-only
|
||||
groups:
|
||||
nodejs-deps:
|
||||
python-security:
|
||||
applies-to: security-updates
|
||||
patterns:
|
||||
- "*"
|
||||
|
||||
- package-ecosystem: npm
|
||||
directory: /nodejs/examples
|
||||
directories:
|
||||
- /nodejs
|
||||
- /nodejs/examples
|
||||
schedule:
|
||||
interval: weekly
|
||||
interval: monthly
|
||||
cooldown:
|
||||
default-days: 2
|
||||
versioning-strategy: lockfile-only
|
||||
allow:
|
||||
- dependency-type: all
|
||||
update-types:
|
||||
- version-update:semver-minor
|
||||
- version-update:semver-patch
|
||||
groups:
|
||||
nodejs-examples-deps:
|
||||
nodejs:
|
||||
applies-to: version-updates
|
||||
patterns:
|
||||
- "*"
|
||||
nodejs-security:
|
||||
applies-to: security-updates
|
||||
patterns:
|
||||
- "*"
|
||||
|
||||
# Docs, docs tests, and Java. Security updates scan these lockfiles whether or
|
||||
# not they're listed here; these entries only exist to group those PRs.
|
||||
# `open-pull-requests-limit: 0` turns off version updates.
|
||||
- package-ecosystem: cargo
|
||||
directory: /docs/web-tests/rs
|
||||
schedule:
|
||||
interval: monthly
|
||||
open-pull-requests-limit: 0
|
||||
groups:
|
||||
docs-cargo-security:
|
||||
applies-to: security-updates
|
||||
patterns:
|
||||
- "*"
|
||||
|
||||
- package-ecosystem: npm
|
||||
directories:
|
||||
- /docs/web-tests/ts
|
||||
- /docs/web-tests/blob-v2/ts
|
||||
schedule:
|
||||
interval: monthly
|
||||
open-pull-requests-limit: 0
|
||||
groups:
|
||||
docs-npm-security:
|
||||
applies-to: security-updates
|
||||
patterns:
|
||||
- "*"
|
||||
|
||||
- package-ecosystem: pip
|
||||
directories:
|
||||
- /docs
|
||||
- /docs/web-tests/blob-v2/py
|
||||
schedule:
|
||||
interval: monthly
|
||||
open-pull-requests-limit: 0
|
||||
groups:
|
||||
docs-pip-security:
|
||||
applies-to: security-updates
|
||||
patterns:
|
||||
- "*"
|
||||
|
||||
- package-ecosystem: maven
|
||||
directory: /java
|
||||
schedule:
|
||||
interval: monthly
|
||||
open-pull-requests-limit: 0
|
||||
groups:
|
||||
maven-security:
|
||||
applies-to: security-updates
|
||||
patterns:
|
||||
- "*"
|
||||
|
||||
@@ -10,7 +10,7 @@ come from the `LanceDB.zip` asset of `lancedb/docs` release
|
||||
The product-terminology rules were added here: `EmbeddedName`,
|
||||
`RemoteExecution`, `OSSProduct`, `InternalNames`
|
||||
(warnings) and `LegacyCloud` (suggestion). They enforce the names in the
|
||||
docs repository's `STYLE.md#names`. Run every rule's tests from
|
||||
[style guide](../../docs/STYLE.md#names). Run every rule's tests from
|
||||
`.github/vale` with `vale test --coverage styles`.
|
||||
|
||||
Keeping the rules here lets contributors and CI run Vale without access to the
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
extends: existence
|
||||
message: "Avoid '%s' in prose. Use a comma, a colon, parentheses or two sentences."
|
||||
link: https://github.com/lancedb/docs/blob/main/STYLE.md#punctuation
|
||||
link: https://github.com/lancedb/lancedb/blob/main/docs/STYLE.md#punctuation
|
||||
level: warning
|
||||
nonword: true
|
||||
# An em dash in prose, and a double hyphen or en dash used as one, with a
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
extends: substitution
|
||||
message: "Use '%s' instead of '%s'."
|
||||
link: https://github.com/lancedb/docs/blob/main/STYLE.md#names
|
||||
link: https://github.com/lancedb/lancedb/blob/main/docs/STYLE.md#names
|
||||
level: warning
|
||||
ignorecase: false
|
||||
# The in-process execution model is LanceDB Embedded, whether the data is on
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
extends: substitution
|
||||
message: "Use '%s' instead of the internal name '%s'."
|
||||
link: https://github.com/lancedb/docs/blob/main/STYLE.md#names
|
||||
link: https://github.com/lancedb/lancedb/blob/main/docs/STYLE.md#names
|
||||
level: warning
|
||||
ignorecase: false
|
||||
# Internal component names stay out of public text. Environment variables such
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
extends: existence
|
||||
message: "'%s' is the legacy hosted service. Unless the text is specific to it, write 'LanceDB Enterprise'."
|
||||
link: https://github.com/lancedb/docs/blob/main/STYLE.md#names
|
||||
link: https://github.com/lancedb/lancedb/blob/main/docs/STYLE.md#names
|
||||
level: suggestion
|
||||
ignorecase: false
|
||||
# A suggestion, because `db://` URIs, `api_key` and `region` for the hosted
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
extends: existence
|
||||
message: "Avoid '%s'. OSS is not a product name: write 'LanceDB Embedded', or 'open source' as a property."
|
||||
link: https://github.com/lancedb/docs/blob/main/STYLE.md#names
|
||||
link: https://github.com/lancedb/lancedb/blob/main/docs/STYLE.md#names
|
||||
level: warning
|
||||
ignorecase: false
|
||||
# Bare OSS used as a product, as in "OSS and Enterprise" or "in OSS". "LanceDB
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
extends: substitution
|
||||
message: "Consider '%s' instead of '%s'."
|
||||
link: https://github.com/lancedb/docs/blob/main/STYLE.md#say-it-directly
|
||||
link: https://github.com/lancedb/lancedb/blob/main/docs/STYLE.md#say-it-directly
|
||||
level: suggestion
|
||||
ignorecase: true
|
||||
# Keep this list small. Technical nouns such as GPU utilization stay intact.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
extends: substitution
|
||||
message: "Use '%s' instead of '%s'."
|
||||
link: https://github.com/lancedb/docs/blob/main/STYLE.md#names
|
||||
link: https://github.com/lancedb/lancedb/blob/main/docs/STYLE.md#names
|
||||
level: warning
|
||||
ignorecase: false
|
||||
# Case-sensitive. A lowercase package, repository or domain name, such as
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
extends: existence
|
||||
message: "Avoid '%s'. Write 'LanceDB Enterprise' and describe where the operation runs directly."
|
||||
link: https://github.com/lancedb/docs/blob/main/STYLE.md#names
|
||||
link: https://github.com/lancedb/lancedb/blob/main/docs/STYLE.md#names
|
||||
level: warning
|
||||
ignorecase: false
|
||||
# Remote storage, remote URLs and a git remote are other things and stay. Class
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
extends: existence
|
||||
message: "'%s' doesn't say what the section covers. Name the task or topic instead."
|
||||
link: https://github.com/lancedb/docs/blob/main/STYLE.md#headings
|
||||
link: https://github.com/lancedb/lancedb/blob/main/docs/STYLE.md#headings
|
||||
level: suggestion
|
||||
scope: heading
|
||||
ignorecase: true
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
extends: existence
|
||||
message: "'%s' talks about the writing, not the subject. State the point directly."
|
||||
link: https://github.com/lancedb/docs/blob/main/STYLE.md#say-it-directly
|
||||
link: https://github.com/lancedb/lancedb/blob/main/docs/STYLE.md#say-it-directly
|
||||
level: suggestion
|
||||
ignorecase: false
|
||||
scope: sentence
|
||||
|
||||
@@ -54,7 +54,7 @@ runs:
|
||||
grep '^name = ' python/pyproject.toml
|
||||
- name: Build x86_64 Manylinux wheel
|
||||
if: ${{ inputs.arm-build == 'false' }}
|
||||
uses: PyO3/maturin-action@v1
|
||||
uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0
|
||||
with:
|
||||
maturin-version: "1.12.4"
|
||||
command: build
|
||||
@@ -72,7 +72,7 @@ runs:
|
||||
/usr/local/bin/protoc --version
|
||||
- name: Build Arm Manylinux Wheel
|
||||
if: ${{ inputs.arm-build == 'true' }}
|
||||
uses: PyO3/maturin-action@v1
|
||||
uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0
|
||||
with:
|
||||
maturin-version: "1.12.4"
|
||||
command: build
|
||||
|
||||
@@ -14,7 +14,7 @@ runs:
|
||||
steps:
|
||||
- uses: ./.github/actions/setup-protoc
|
||||
- name: Build wheel
|
||||
uses: PyO3/maturin-action@v1
|
||||
uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0
|
||||
with:
|
||||
command: build
|
||||
maturin-version: "1.12.4"
|
||||
|
||||
@@ -17,7 +17,7 @@ runs:
|
||||
run: git config --global core.longpaths true
|
||||
- uses: ./.github/actions/setup-protoc
|
||||
- name: Build wheel
|
||||
uses: PyO3/maturin-action@v1
|
||||
uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0
|
||||
with:
|
||||
command: build
|
||||
maturin-version: "1.12.4"
|
||||
|
||||
@@ -25,14 +25,14 @@ jobs:
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3
|
||||
with:
|
||||
workspaces: rust
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install -y protobuf-compiler libssl-dev
|
||||
- uses: rust-lang/crates-io-auth-action@v1
|
||||
- uses: rust-lang/crates-io-auth-action@3268eb413133e2960fa4ae0e963ca76380c54cd9 # v1.0.6
|
||||
id: auth
|
||||
- name: Publish the package
|
||||
run: |
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
name: CLI shell installer
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- 'scripts/install.sh'
|
||||
- 'ci/tests/test_cli_installer.sh'
|
||||
- '.github/workflows/cli-installer.yml'
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
install:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-24.04, ubuntu-24.04-arm, macos-15]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
persist-credentials: false
|
||||
- run: sh ci/tests/test_cli_installer.sh
|
||||
- name: Install a pinned public release and run it
|
||||
env:
|
||||
LANCEDB_VERSION: v0.42.0-beta.19
|
||||
run: |
|
||||
export LANCEDB_INSTALL_DIR="$RUNNER_TEMP/cli bin"
|
||||
sh scripts/install.sh
|
||||
test "$("$LANCEDB_INSTALL_DIR/lancedb" --version)" = "lancedb ${LANCEDB_VERSION#v}"
|
||||
"$LANCEDB_INSTALL_DIR/lancedb" profile list
|
||||
@@ -16,14 +16,14 @@ on:
|
||||
default: ""
|
||||
type: string
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
actions: read
|
||||
permissions: {}
|
||||
|
||||
jobs:
|
||||
update:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
# Pushes the branch with the checkout token. PR creation uses ROBOT_TOKEN.
|
||||
contents: write
|
||||
steps:
|
||||
- name: Show inputs
|
||||
run: |
|
||||
@@ -44,7 +44,7 @@ jobs:
|
||||
run: npm install -g @openai/codex
|
||||
|
||||
- name: Install Rust toolchain
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
uses: dtolnay/rust-toolchain@b725eda525362e7cf34af9a7243cac1e3f01a7ec # stable
|
||||
with:
|
||||
toolchain: stable
|
||||
components: clippy, rustfmt
|
||||
|
||||
@@ -18,7 +18,7 @@ jobs:
|
||||
name: Label PR
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: srvaroa/labeler@v1
|
||||
- uses: srvaroa/labeler@9c29ad1ef33d169f9ef33c52722faf47a566bcf3 # v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
commitlint:
|
||||
@@ -30,7 +30,7 @@ jobs:
|
||||
- uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: "24"
|
||||
- uses: pnpm/action-setup@v6
|
||||
- uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6.1.1
|
||||
with:
|
||||
version: 11.1.1
|
||||
# These rules are disabled because Github will always ensure there
|
||||
|
||||
@@ -47,7 +47,7 @@ jobs:
|
||||
python-version: "3.10"
|
||||
cache: "pip"
|
||||
cache-dependency-path: "docs/requirements.txt"
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3
|
||||
- name: Build Python
|
||||
working-directory: python
|
||||
run: |
|
||||
|
||||
@@ -77,7 +77,7 @@ jobs:
|
||||
echo "from_tag=$FROM_TAG" >> $GITHUB_OUTPUT
|
||||
- name: Create Release Notes
|
||||
id: release_notes
|
||||
uses: mikepenz/release-changelog-builder-action@v4
|
||||
uses: mikepenz/release-changelog-builder-action@32e3c96f29a6532607f638797455e9e98cfc703d # v4.2.2
|
||||
with:
|
||||
configuration: .github/release_notes.json
|
||||
toTag: ${{ steps.extract_version.outputs.tag }}
|
||||
@@ -85,7 +85,7 @@ jobs:
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Create GH release
|
||||
uses: softprops/action-gh-release@v2
|
||||
uses: softprops/action-gh-release@3bb12739c298aeb8a4eeaf626c5b8d85266b0e65 # v2.6.2
|
||||
with:
|
||||
# Marking betas as pre-releases keeps them from taking the "Latest"
|
||||
# badge on the releases page.
|
||||
|
||||
@@ -21,11 +21,10 @@ jobs:
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v6
|
||||
# `go install` at a fixed version is verified against the Go checksum database.
|
||||
- name: Install license-header-checker
|
||||
working-directory: /tmp
|
||||
run: |
|
||||
curl -s https://raw.githubusercontent.com/lluissm/license-header-checker/master/install.sh | bash
|
||||
mv /tmp/bin/license-header-checker /usr/local/bin/
|
||||
GOBIN=/usr/local/bin go install github.com/lluissm/license-header-checker/cmd/license-header-checker@v1.5.0
|
||||
- name: Check license headers (rust)
|
||||
run: license-header-checker -a -v ./rust/license_header.txt ./ rs && [[ -z `git status -s` ]]
|
||||
- name: Check license headers (python)
|
||||
|
||||
@@ -42,7 +42,7 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0
|
||||
lfs: true
|
||||
- uses: pnpm/action-setup@v6
|
||||
- uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6.1.1
|
||||
with:
|
||||
version: 11.1.1
|
||||
- uses: actions/setup-node@v6
|
||||
@@ -52,14 +52,14 @@ jobs:
|
||||
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@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1.17.0
|
||||
with:
|
||||
components: rustfmt, clippy
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install -y protobuf-compiler libssl-dev
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3
|
||||
with:
|
||||
# Restore everywhere, but only save from main. Per-PR saves are
|
||||
# unreadable outside their own branch anyway, since GitHub scopes
|
||||
@@ -98,7 +98,7 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0
|
||||
lfs: true
|
||||
- uses: pnpm/action-setup@v6
|
||||
- uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6.1.1
|
||||
with:
|
||||
version: 11.1.1
|
||||
- uses: actions/setup-node@v6
|
||||
@@ -110,7 +110,7 @@ jobs:
|
||||
node-version: 24
|
||||
cache: 'pnpm'
|
||||
cache-dependency-path: nodejs/pnpm-lock.yaml
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3
|
||||
with:
|
||||
# Restore everywhere, but only save from main. Per-PR saves are
|
||||
# unreadable outside their own branch anyway, since GitHub scopes
|
||||
@@ -188,7 +188,7 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0
|
||||
lfs: true
|
||||
- uses: pnpm/action-setup@v6
|
||||
- uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6.1.1
|
||||
with:
|
||||
version: 11.1.1
|
||||
- uses: actions/setup-node@v6
|
||||
@@ -196,7 +196,7 @@ jobs:
|
||||
node-version: 24
|
||||
cache: 'pnpm'
|
||||
cache-dependency-path: nodejs/pnpm-lock.yaml
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3
|
||||
with:
|
||||
# Same crate, profile and target as the `linux` job above, so reuse
|
||||
# its cache: rust-cache keys on the job id by default, and this job
|
||||
@@ -249,7 +249,7 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0
|
||||
lfs: true
|
||||
- uses: pnpm/action-setup@v6
|
||||
- uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6.1.1
|
||||
with:
|
||||
version: 11.1.1
|
||||
- uses: actions/setup-node@v6
|
||||
@@ -259,11 +259,11 @@ jobs:
|
||||
cache: 'pnpm'
|
||||
cache-dependency-path: nodejs/pnpm-lock.yaml
|
||||
# Use the same pinned compiler for cache selection and the native build.
|
||||
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
- uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1.17.0
|
||||
with:
|
||||
cache: false
|
||||
rustflags: ""
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3
|
||||
with:
|
||||
# Restore everywhere, but only save from main. Per-PR saves are
|
||||
# unreadable outside their own branch anyway, since GitHub scopes
|
||||
|
||||
@@ -4,9 +4,7 @@ env:
|
||||
MACOSX_DEPLOYMENT_TARGET: '10.13'
|
||||
CARGO_INCREMENTAL: '0'
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
id-token: write
|
||||
permissions: {}
|
||||
|
||||
on:
|
||||
push:
|
||||
@@ -33,6 +31,8 @@ concurrency:
|
||||
|
||||
jobs:
|
||||
build-lancedb:
|
||||
permissions:
|
||||
contents: read
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
@@ -167,7 +167,7 @@ jobs:
|
||||
# Cargo also checks out Lance test fixtures below its git cache path.
|
||||
run: git config --global core.longpaths true
|
||||
- name: Setup pnpm
|
||||
uses: pnpm/action-setup@v6
|
||||
uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6.1.1
|
||||
with:
|
||||
version: 11.1.1
|
||||
- name: Setup node
|
||||
@@ -178,7 +178,7 @@ jobs:
|
||||
cache: pnpm
|
||||
cache-dependency-path: nodejs/pnpm-lock.yaml
|
||||
- name: Install
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
uses: dtolnay/rust-toolchain@b725eda525362e7cf34af9a7243cac1e3f01a7ec # stable
|
||||
if: ${{ !matrix.settings.docker }}
|
||||
with:
|
||||
toolchain: stable
|
||||
@@ -194,7 +194,7 @@ jobs:
|
||||
# re-runs regardless, since the local crate changes every time, so the
|
||||
# win is larger on the non-LTO jobs than here.
|
||||
- name: Cache cargo (native builds)
|
||||
uses: Swatinem/rust-cache@v2
|
||||
uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3
|
||||
if: ${{ !matrix.settings.docker }}
|
||||
with:
|
||||
# The release profile and per-target dirs differ from what the test
|
||||
@@ -216,7 +216,7 @@ jobs:
|
||||
# that built these artifacts -- safe, since cargo fingerprints the real
|
||||
# one; a base-image bump just costs one cold build.
|
||||
- name: Cache cargo (docker builds)
|
||||
uses: Swatinem/rust-cache@v2
|
||||
uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3
|
||||
if: ${{ matrix.settings.docker }}
|
||||
with:
|
||||
key: docker-${{ matrix.settings.target }}
|
||||
@@ -225,17 +225,17 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: pnpm install --frozen-lockfile
|
||||
- name: Install Zig
|
||||
uses: mlugg/setup-zig@v2
|
||||
uses: mlugg/setup-zig@d1434d08867e3ee9daa34448df10607b98908d29 # v2.2.1
|
||||
if: ${{ contains(matrix.settings.target, 'musl') }}
|
||||
with:
|
||||
version: 0.14.1
|
||||
- name: Install cargo-zigbuild
|
||||
uses: taiki-e/install-action@v2
|
||||
uses: taiki-e/install-action@cfdb7ed4ccc7c7dce37759eae89dc5674b469b39 # v2.90.3
|
||||
if: ${{ contains(matrix.settings.target, 'musl') }}
|
||||
with:
|
||||
tool: cargo-zigbuild
|
||||
- name: Build in docker
|
||||
uses: addnab/docker-run-action@v3
|
||||
uses: addnab/docker-run-action@4f65fabd2431ebc8d299f8e5a018d79a769ae185 # v3
|
||||
if: ${{ matrix.settings.docker }}
|
||||
with:
|
||||
image: ${{ matrix.settings.docker }}
|
||||
@@ -326,6 +326,8 @@ jobs:
|
||||
nodejs/dist/*
|
||||
!nodejs/dist/*.node
|
||||
test-lancedb:
|
||||
permissions:
|
||||
contents: read
|
||||
name: "Test: ${{ matrix.settings.target }} - node@${{ matrix.node }}"
|
||||
needs:
|
||||
- build-lancedb
|
||||
@@ -352,7 +354,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- name: Setup pnpm
|
||||
uses: pnpm/action-setup@v6
|
||||
uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6.1.1
|
||||
with:
|
||||
version: 11.1.1
|
||||
- name: Setup Node.js 24 for install
|
||||
@@ -394,6 +396,10 @@ jobs:
|
||||
run: node_modules/.bin/jest --verbose
|
||||
publish:
|
||||
name: Publish
|
||||
permissions:
|
||||
contents: read
|
||||
# npm provenance
|
||||
id-token: write
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
@@ -404,7 +410,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- name: Setup pnpm
|
||||
uses: pnpm/action-setup@v6
|
||||
uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6.1.1
|
||||
with:
|
||||
version: 11.1.1
|
||||
- name: Setup node
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
name: Publish CLI installer
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- scripts/install.sh
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
id-token: write
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
if: github.repository == 'lancedb/lancedb' && github.ref == 'refs/heads/main'
|
||||
runs-on: ubuntu-latest
|
||||
concurrency:
|
||||
group: publish-cli-installer
|
||||
cancel-in-progress: false
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
# Queued jobs and retries publish the installer currently on main.
|
||||
ref: refs/heads/main
|
||||
persist-credentials: false
|
||||
|
||||
- uses: aws-actions/configure-aws-credentials@e1253824e5c10ff9df46874f81ed3ec929e19cfd # v6.3.0
|
||||
with:
|
||||
aws-region: us-west-2
|
||||
role-to-assume: ${{ vars.CLI_INSTALLER_AWS_ROLE_ARN }}
|
||||
|
||||
- name: Publish and verify the installer
|
||||
shell: bash
|
||||
env:
|
||||
DISTRIBUTION_ID: ${{ vars.CLI_INSTALLER_DISTRIBUTION_ID }}
|
||||
run: |
|
||||
: "${DISTRIBUTION_ID:?Set CLI_INSTALLER_DISTRIBUTION_ID before publishing}"
|
||||
key=cli/install.sh
|
||||
aws s3api put-object --bucket lancedb-downloads --key "$key" \
|
||||
--body scripts/install.sh --content-type 'text/plain; charset=utf-8' \
|
||||
--cache-control 'public, max-age=0, must-revalidate' > /dev/null
|
||||
invalidation=$(aws cloudfront create-invalidation --distribution-id "$DISTRIBUTION_ID" \
|
||||
--paths "/$key" --query Invalidation.Id --output text)
|
||||
aws cloudfront wait invalidation-completed --distribution-id "$DISTRIBUTION_ID" --id "$invalidation"
|
||||
curl --fail --silent --show-error --retry 3 "https://downloads.lancedb.com/$key" \
|
||||
--output "$RUNNER_TEMP/published-installer.sh"
|
||||
cmp scripts/install.sh "$RUNNER_TEMP/published-installer.sh"
|
||||
@@ -184,7 +184,7 @@ jobs:
|
||||
with:
|
||||
python-version: "3.12"
|
||||
- name: Build sdist
|
||||
uses: PyO3/maturin-action@v1
|
||||
uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0
|
||||
with:
|
||||
maturin-version: "1.12.4"
|
||||
command: sdist
|
||||
@@ -311,7 +311,7 @@ jobs:
|
||||
# `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
|
||||
uses: pypa/gh-action-pypi-publish@7245906fb61fa33a13554f9d5fb856fe61758086 # v1.14.3
|
||||
with:
|
||||
packages-dir: target/wheels/
|
||||
report-failure:
|
||||
|
||||
@@ -112,7 +112,7 @@ jobs:
|
||||
# `pip install -e .` builds the extension with maturin, which is most of
|
||||
# this job's ~33 minutes. It had no Rust cache, so every dependency was
|
||||
# recompiled from scratch on every run.
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3
|
||||
with:
|
||||
# Restore everywhere, but only save from main. Per-PR saves are
|
||||
# unreadable outside their own branch anyway, since GitHub scopes
|
||||
@@ -198,7 +198,7 @@ jobs:
|
||||
python-version: "3.13"
|
||||
# maturin runs cargo natively on macOS (docker is Linux-only), so the host
|
||||
# target dir is cacheable. This job had no Rust cache.
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3
|
||||
with:
|
||||
# Restore everywhere, but only save from main. Per-PR saves are
|
||||
# unreadable outside their own branch anyway, since GitHub scopes
|
||||
@@ -236,7 +236,7 @@ jobs:
|
||||
# maturin runs cargo natively on Windows (docker is Linux-only), so the
|
||||
# host target dir is cacheable. This job had no Rust cache at all and so
|
||||
# rebuilt every dependency from scratch on every run.
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3
|
||||
with:
|
||||
# Restore everywhere, but only save from main. The repo sits at
|
||||
# GitHub's cache cap, so per-PR saves just evict main's entries.
|
||||
@@ -271,7 +271,7 @@ jobs:
|
||||
python-version: "3.10"
|
||||
# As with Doctest, `pip install -e .` compiles the extension and this job
|
||||
# had no Rust cache, which is most of its ~37 minutes.
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3
|
||||
with:
|
||||
# Restore everywhere, but only save from main. Per-PR saves are
|
||||
# unreadable outside their own branch anyway, since GitHub scopes
|
||||
|
||||
+16
-16
@@ -42,7 +42,7 @@ jobs:
|
||||
timeout-minutes: 15
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
- uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1.17.0
|
||||
- name: Read the pinned Lance tag
|
||||
id: lance
|
||||
run: |
|
||||
@@ -108,10 +108,10 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0
|
||||
lfs: true
|
||||
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
- uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1.17.0
|
||||
with:
|
||||
components: rustfmt, clippy
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3
|
||||
with:
|
||||
# Restore everywhere, but only save from main. Per-PR saves are
|
||||
# unreadable outside their own branch anyway, since GitHub scopes
|
||||
@@ -135,7 +135,7 @@ jobs:
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: EmbarkStudios/cargo-deny-action@v2
|
||||
- uses: EmbarkStudios/cargo-deny-action@3c6349835b2b7b196a839186cb8b78e02f7b5f25 # v2.1.1
|
||||
with:
|
||||
command: check advisories bans licenses sources
|
||||
|
||||
@@ -151,7 +151,7 @@ jobs:
|
||||
- uses: actions/checkout@v6
|
||||
# Building without a lock file often requires the latest Rust version since downstream
|
||||
# dependencies may have updated their minimum Rust version.
|
||||
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
- uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1.17.0
|
||||
with:
|
||||
toolchain: "stable"
|
||||
# The explicit cache below runs after lock removal and only saves on main.
|
||||
@@ -159,8 +159,8 @@ jobs:
|
||||
# Remove cargo.lock to force a fresh build
|
||||
- name: Remove Cargo.lock
|
||||
run: rm -f Cargo.lock
|
||||
- uses: rui314/setup-mold@v1
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- uses: rui314/setup-mold@339e96b4ff1f3bd865856ba4cbbe8818a7acb038 # v1
|
||||
- uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3
|
||||
with:
|
||||
# Restore everywhere, but only save from main. Per-PR saves are
|
||||
# unreadable outside their own branch anyway, since GitHub scopes
|
||||
@@ -208,7 +208,7 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0
|
||||
lfs: true
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3
|
||||
with:
|
||||
# Restore everywhere, but only save from main. Per-PR saves are
|
||||
# unreadable outside their own branch anyway, since GitHub scopes
|
||||
@@ -218,7 +218,7 @@ jobs:
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install -y protobuf-compiler libssl-dev
|
||||
- uses: rui314/setup-mold@v1
|
||||
- uses: rui314/setup-mold@339e96b4ff1f3bd865856ba4cbbe8818a7acb038 # v1
|
||||
- name: Make Swap
|
||||
run: |
|
||||
swapfile=/swapfile
|
||||
@@ -280,7 +280,7 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0
|
||||
lfs: true
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3
|
||||
with:
|
||||
# Remote tests use a different feature graph from the main Linux
|
||||
# job. Cache downloads, but build into a fresh target directory.
|
||||
@@ -290,7 +290,7 @@ jobs:
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install -y protobuf-compiler libssl-dev
|
||||
- uses: rui314/setup-mold@v1
|
||||
- uses: rui314/setup-mold@339e96b4ff1f3bd865856ba4cbbe8818a7acb038 # v1
|
||||
- name: Run remote tests
|
||||
run: CARGO_ARGS="--profile ci" make -C ./lancedb remote-tests
|
||||
|
||||
@@ -317,7 +317,7 @@ jobs:
|
||||
python-version: "3.13"
|
||||
- name: CPU features
|
||||
run: sysctl -a | grep cpu
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3
|
||||
with:
|
||||
# PyO3 caches the interpreter library path; runner images can differ.
|
||||
key: ${{ matrix.mac-runner }}-python-${{ steps.python.outputs.python-version }}
|
||||
@@ -358,7 +358,7 @@ jobs:
|
||||
run: git config --global core.longpaths true
|
||||
- name: Set target
|
||||
run: rustup target add ${{ matrix.target }}
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3
|
||||
with:
|
||||
# Restore everywhere, but only save from main. Per-PR saves are
|
||||
# unreadable outside their own branch anyway, since GitHub scopes
|
||||
@@ -397,7 +397,7 @@ jobs:
|
||||
run: git config --global core.longpaths true
|
||||
- name: Set target
|
||||
run: rustup target add aarch64-pc-windows-msvc
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3
|
||||
with:
|
||||
# Restore everywhere, but only save from main. Per-PR saves are
|
||||
# unreadable outside their own branch anyway, since GitHub scopes
|
||||
@@ -437,10 +437,10 @@ jobs:
|
||||
sudo apt update
|
||||
sudo apt install -y protobuf-compiler libssl-dev
|
||||
- name: Install ${{ matrix.msrv }}
|
||||
uses: dtolnay/rust-toolchain@master
|
||||
uses: dtolnay/rust-toolchain@683b588c487a69d01f6c6ddf40f036ff682cc2c8 # master
|
||||
with:
|
||||
toolchain: ${{ matrix.msrv }}
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3
|
||||
with:
|
||||
# Restore everywhere, but only save from main. Per-PR saves are
|
||||
# unreadable outside their own branch anyway, since GitHub scopes
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
LanceDB is a database designed for retrieval, including vector, full-text, and hybrid search.
|
||||
It is a wrapper around Lance. There are two backends: local (in-process like SQLite) and
|
||||
remote (against LanceDB Cloud).
|
||||
It is a wrapper around Lance. There are two editions: LanceDB Embedded (in-process, like
|
||||
SQLite) and LanceDB Enterprise (a server cluster reached over HTTP).
|
||||
|
||||
In user-facing text (docs, docstrings, error messages, examples), always say "Embedded"
|
||||
and "Enterprise". Don't say "local" or "remote" tables. ("LanceDB Cloud" means only the
|
||||
legacy hosted service, not Enterprise.) The code implements Enterprise in the `remote`
|
||||
module, the `remote` cargo feature, and `Remote*` types. Those names are internal and
|
||||
shouldn't leak into user-facing text.
|
||||
|
||||
The core of LanceDB is written in Rust. There are bindings in Python, Typescript, and Java.
|
||||
|
||||
@@ -72,9 +78,10 @@ back and fix it immediately if it is not conventional.
|
||||
## Example plan: adding a new method on Table
|
||||
|
||||
Adding a new method involves first adding it to the Rust core, then exposing it
|
||||
in the Python and TypeScript bindings. There are both local and remote tables.
|
||||
Remote tables are implemented via a HTTP API and require the `remote` cargo
|
||||
feature flag to be enabled. Python has both sync and async methods.
|
||||
in the Python and TypeScript bindings. Every method needs an Embedded and an
|
||||
Enterprise implementation. Enterprise tables are implemented via a HTTP API in the
|
||||
`remote` module and require the `remote` cargo feature flag to be enabled. Python
|
||||
has both sync and async methods.
|
||||
|
||||
Rust core changes:
|
||||
|
||||
@@ -104,7 +111,7 @@ TypeScript bindings changes:
|
||||
2. Run `pnpm build` to generate TypeScript definitions.
|
||||
3. Add typescript method on abstract class `Table` in `nodejs/lancedb/table.ts`.
|
||||
4. Add concrete method on `LocalTable` class in `nodejs/lancedb/table.ts`.
|
||||
* Note: despite the name, this class is also used for remote tables.
|
||||
* Note: despite the name, this class is also used for Enterprise tables.
|
||||
5. Add test in `nodejs/__test__/table.test.ts`.
|
||||
6. Run `pnpm run docs` to generate TypeScript documentation.
|
||||
|
||||
@@ -155,3 +162,17 @@ Please consider the following when reviewing code contributions.
|
||||
### Documentation
|
||||
* New features must include updates to the rust documentation comments. Link to
|
||||
relevant structs and methods to increase the value of documentation.
|
||||
* User guides (`docs/web`) are evergreen: document only the current API. Don't add
|
||||
migration tables or deprecation notices there. Mark deprecated APIs in their
|
||||
docstrings, which feed the API reference.
|
||||
|
||||
### Breaking changes and deprecation
|
||||
* Prefer deprecating over removing a released public API. When the new name differs
|
||||
from the old one, keep the old one as a deprecated alias (`#[deprecated]` in Rust,
|
||||
`DeprecationWarning` in Python, `@deprecated` in TypeScript), with a test that it
|
||||
still works.
|
||||
* Don't reuse a released public name for something with a different meaning. Callers
|
||||
get a confusing error instead of a deprecation warning.
|
||||
* For a breaking change, add `!` to the PR title and start the PR body with a
|
||||
`BREAKING CHANGE:` paragraph covering the new behavior, the old behavior, and how to
|
||||
migrate. Release notes are generated from it.
|
||||
|
||||
+23
-8
@@ -109,12 +109,13 @@ npm i -g mint@4.2.888
|
||||
|
||||
This previews this checkout, including your uncommitted changes. It doesn't
|
||||
include the other documentation sources or render the availability labels.
|
||||
Use the [combined preview](https://github.com/lancedb/docs#development) when
|
||||
checking Enterprise replacements or links to pages from another source.
|
||||
Checking Enterprise replacements or links to pages from another source needs
|
||||
the combined site, which maintainers build. Ask for that check in your pull
|
||||
request if your change needs it.
|
||||
Staging shows saved release editions, so it won't show a new source change
|
||||
just because that change merged.
|
||||
|
||||
Follow the [style guide](https://github.com/lancedb/docs/blob/main/STYLE.md).
|
||||
Follow the [style guide](docs/STYLE.md).
|
||||
[Vale](https://vale.sh) checks wording, names and punctuation using the
|
||||
[bundled LanceDB rules](.github/vale/README.md). Pull requests show suggestions
|
||||
on the lines they change. With Vale 3.24.0 installed, check a page locally with:
|
||||
@@ -182,15 +183,29 @@ You don't need to hold a documentation PR until launch. Use these controls:
|
||||
comment below the table or list, not between entries.
|
||||
|
||||
Drafts remain in the source. Use them to avoid advertising an unfinished
|
||||
feature, not to keep information confidential. See
|
||||
[Writing docs before release](https://github.com/lancedb/docs#writing-docs-before-release)
|
||||
for examples and how to preview a draft.
|
||||
feature, not to keep information confidential. A draft section looks like
|
||||
this:
|
||||
|
||||
```mdx
|
||||
{/*
|
||||
Draft for the Feature X release.
|
||||
|
||||
## Feature X {#feature-x}
|
||||
|
||||
Feature X does ...
|
||||
*/}
|
||||
```
|
||||
|
||||
Give the comment lines of its own, with a blank line before and after it. To
|
||||
see how a draft renders, remove its comment or its `.mintignore` entry in a
|
||||
local change you don't commit, then run `mint dev`.
|
||||
|
||||
Before the intended release, remove the draft controls, restore the navigation
|
||||
and links, and check the result. Those changes must be in the source commit the
|
||||
edition uses. A later change to `main` doesn't update an edition already saved.
|
||||
For a mistake in an existing edition, fix the source and request a
|
||||
[recorded correction](https://github.com/lancedb/docs#correcting-a-saved-edition).
|
||||
For a mistake in an existing edition, fix the source and say in the pull
|
||||
request which editions have the error. A maintainer corrects the saved
|
||||
editions.
|
||||
|
||||
## Release process
|
||||
|
||||
|
||||
Generated
+66
-65
@@ -1395,7 +1395,7 @@ version = "0.11.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "56d87354e4229f54a44f7bf2435906a4656dba36026ab6eaca629a2c436a691c"
|
||||
dependencies = [
|
||||
"bit-vec 0.10.1",
|
||||
"bit-vec 0.10.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1406,9 +1406,9 @@ checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7"
|
||||
|
||||
[[package]]
|
||||
name = "bit-vec"
|
||||
version = "0.10.1"
|
||||
version = "0.10.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5727b15fa97d4f4fee0a3b7c3d550ed0269f54329207b86388de918604e31269"
|
||||
checksum = "72503af1e72be411d74ca45cd6b309878fcb35354e252fc2a3a8bda3a97082a0"
|
||||
dependencies = [
|
||||
"borsh",
|
||||
"serde",
|
||||
@@ -3786,9 +3786,9 @@ checksum = "ee1b05cbd864bcaecbd3455d6d967862d446e4ebfc3c2e5e5b9841e53cba6673"
|
||||
|
||||
[[package]]
|
||||
name = "form_urlencoded"
|
||||
version = "1.2.2"
|
||||
version = "1.2.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf"
|
||||
checksum = "afa489199eaffb1211795df1c6236ce1ad0d41a6fa45250add73e3b02420f06e"
|
||||
dependencies = [
|
||||
"percent-encoding",
|
||||
]
|
||||
@@ -3885,8 +3885,8 @@ checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c"
|
||||
|
||||
[[package]]
|
||||
name = "fsst"
|
||||
version = "15.0.0-beta.25"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v15.0.0-beta.25#f5dbd55dd79f1f0412f897ed1917128300fb8c1a"
|
||||
version = "15.0.0-beta.26"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v15.0.0-beta.26#f9fd19edfb14e43d3981b20dfaf183672751414b"
|
||||
dependencies = [
|
||||
"arrow-array",
|
||||
"rand 0.9.5",
|
||||
@@ -5190,18 +5190,18 @@ checksum = "9028f49264629065d057f340a86acb84867925865f73bbf8d47b4d149a7e88b8"
|
||||
|
||||
[[package]]
|
||||
name = "jieba-macros"
|
||||
version = "0.10.1"
|
||||
version = "0.10.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "46adade69b634535a8f495cf87710ed893cff53e1dbc9dd750c2ab81c5defb82"
|
||||
checksum = "38fc0f3831de71556de69643b80a08a5c8cd260a23c6b8dbeb7cd923c779cac5"
|
||||
dependencies = [
|
||||
"phf_codegen 0.13.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "jieba-rs"
|
||||
version = "0.10.1"
|
||||
version = "0.10.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "11b53580aaa8ec8b713da271da434f8947409242c537a9ab3f7b76bdbb19e8a9"
|
||||
checksum = "bb5bdea4dc241d589e179f39d2a778f31490f3370aa2f626223dbd930ebc5c9d"
|
||||
dependencies = [
|
||||
"bytecount",
|
||||
"cedarwood",
|
||||
@@ -5364,8 +5364,8 @@ checksum = "e037a2e1d8d5fdbd49b16a4ea09d5d6401c1f29eca5ff29d03d3824dba16256a"
|
||||
|
||||
[[package]]
|
||||
name = "lance"
|
||||
version = "15.0.0-beta.25"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v15.0.0-beta.25#f5dbd55dd79f1f0412f897ed1917128300fb8c1a"
|
||||
version = "15.0.0-beta.26"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v15.0.0-beta.26#f9fd19edfb14e43d3981b20dfaf183672751414b"
|
||||
dependencies = [
|
||||
"arc-swap",
|
||||
"arrow",
|
||||
@@ -5440,8 +5440,8 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "lance-arrow"
|
||||
version = "15.0.0-beta.25"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v15.0.0-beta.25#f5dbd55dd79f1f0412f897ed1917128300fb8c1a"
|
||||
version = "15.0.0-beta.26"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v15.0.0-beta.26#f9fd19edfb14e43d3981b20dfaf183672751414b"
|
||||
dependencies = [
|
||||
"arrow-array",
|
||||
"arrow-buffer",
|
||||
@@ -5463,7 +5463,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "lance-arrow-scalar"
|
||||
version = "59.0.0"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v15.0.0-beta.25#f5dbd55dd79f1f0412f897ed1917128300fb8c1a"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v15.0.0-beta.26#f9fd19edfb14e43d3981b20dfaf183672751414b"
|
||||
dependencies = [
|
||||
"arrow-array",
|
||||
"arrow-buffer",
|
||||
@@ -5477,7 +5477,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "lance-arrow-stats"
|
||||
version = "59.0.0"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v15.0.0-beta.25#f5dbd55dd79f1f0412f897ed1917128300fb8c1a"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v15.0.0-beta.26#f9fd19edfb14e43d3981b20dfaf183672751414b"
|
||||
dependencies = [
|
||||
"arrow-array",
|
||||
"arrow-schema",
|
||||
@@ -5486,8 +5486,8 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "lance-bitpacking"
|
||||
version = "15.0.0-beta.25"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v15.0.0-beta.25#f5dbd55dd79f1f0412f897ed1917128300fb8c1a"
|
||||
version = "15.0.0-beta.26"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v15.0.0-beta.26#f9fd19edfb14e43d3981b20dfaf183672751414b"
|
||||
dependencies = [
|
||||
"arrayref",
|
||||
"crunchy",
|
||||
@@ -5497,8 +5497,8 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "lance-core"
|
||||
version = "15.0.0-beta.25"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v15.0.0-beta.25#f5dbd55dd79f1f0412f897ed1917128300fb8c1a"
|
||||
version = "15.0.0-beta.26"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v15.0.0-beta.26#f9fd19edfb14e43d3981b20dfaf183672751414b"
|
||||
dependencies = [
|
||||
"arrow-array",
|
||||
"arrow-buffer",
|
||||
@@ -5536,8 +5536,8 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "lance-datafusion"
|
||||
version = "15.0.0-beta.25"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v15.0.0-beta.25#f5dbd55dd79f1f0412f897ed1917128300fb8c1a"
|
||||
version = "15.0.0-beta.26"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v15.0.0-beta.26#f9fd19edfb14e43d3981b20dfaf183672751414b"
|
||||
dependencies = [
|
||||
"arrow",
|
||||
"arrow-array",
|
||||
@@ -5568,8 +5568,8 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "lance-datafusion-exec"
|
||||
version = "15.0.0-beta.25"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v15.0.0-beta.25#f5dbd55dd79f1f0412f897ed1917128300fb8c1a"
|
||||
version = "15.0.0-beta.26"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v15.0.0-beta.26#f9fd19edfb14e43d3981b20dfaf183672751414b"
|
||||
dependencies = [
|
||||
"arrow",
|
||||
"arrow-array",
|
||||
@@ -5594,8 +5594,8 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "lance-datagen"
|
||||
version = "15.0.0-beta.25"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v15.0.0-beta.25#f5dbd55dd79f1f0412f897ed1917128300fb8c1a"
|
||||
version = "15.0.0-beta.26"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v15.0.0-beta.26#f9fd19edfb14e43d3981b20dfaf183672751414b"
|
||||
dependencies = [
|
||||
"arrow",
|
||||
"arrow-array",
|
||||
@@ -5612,8 +5612,8 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "lance-derive"
|
||||
version = "15.0.0-beta.25"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v15.0.0-beta.25#f5dbd55dd79f1f0412f897ed1917128300fb8c1a"
|
||||
version = "15.0.0-beta.26"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v15.0.0-beta.26#f9fd19edfb14e43d3981b20dfaf183672751414b"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
@@ -5622,8 +5622,8 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "lance-encoding"
|
||||
version = "15.0.0-beta.25"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v15.0.0-beta.25#f5dbd55dd79f1f0412f897ed1917128300fb8c1a"
|
||||
version = "15.0.0-beta.26"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v15.0.0-beta.26#f9fd19edfb14e43d3981b20dfaf183672751414b"
|
||||
dependencies = [
|
||||
"arrow-arith",
|
||||
"arrow-array",
|
||||
@@ -5657,8 +5657,8 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "lance-file"
|
||||
version = "15.0.0-beta.25"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v15.0.0-beta.25#f5dbd55dd79f1f0412f897ed1917128300fb8c1a"
|
||||
version = "15.0.0-beta.26"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v15.0.0-beta.26#f9fd19edfb14e43d3981b20dfaf183672751414b"
|
||||
dependencies = [
|
||||
"arrow-arith",
|
||||
"arrow-array",
|
||||
@@ -5689,8 +5689,8 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "lance-geo"
|
||||
version = "15.0.0-beta.25"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v15.0.0-beta.25#f5dbd55dd79f1f0412f897ed1917128300fb8c1a"
|
||||
version = "15.0.0-beta.26"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v15.0.0-beta.26#f9fd19edfb14e43d3981b20dfaf183672751414b"
|
||||
dependencies = [
|
||||
"arrow-array",
|
||||
"arrow-schema",
|
||||
@@ -5721,8 +5721,8 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "lance-index"
|
||||
version = "15.0.0-beta.25"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v15.0.0-beta.25#f5dbd55dd79f1f0412f897ed1917128300fb8c1a"
|
||||
version = "15.0.0-beta.26"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v15.0.0-beta.26#f9fd19edfb14e43d3981b20dfaf183672751414b"
|
||||
dependencies = [
|
||||
"arc-swap",
|
||||
"arrow",
|
||||
@@ -5795,8 +5795,8 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "lance-index-core"
|
||||
version = "15.0.0-beta.25"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v15.0.0-beta.25#f5dbd55dd79f1f0412f897ed1917128300fb8c1a"
|
||||
version = "15.0.0-beta.26"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v15.0.0-beta.26#f9fd19edfb14e43d3981b20dfaf183672751414b"
|
||||
dependencies = [
|
||||
"arrow-array",
|
||||
"arrow-schema",
|
||||
@@ -5819,8 +5819,8 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "lance-io"
|
||||
version = "15.0.0-beta.25"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v15.0.0-beta.25#f5dbd55dd79f1f0412f897ed1917128300fb8c1a"
|
||||
version = "15.0.0-beta.26"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v15.0.0-beta.26#f9fd19edfb14e43d3981b20dfaf183672751414b"
|
||||
dependencies = [
|
||||
"arrow",
|
||||
"arrow-array",
|
||||
@@ -5865,8 +5865,8 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "lance-jsonb"
|
||||
version = "15.0.0-beta.25"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v15.0.0-beta.25#f5dbd55dd79f1f0412f897ed1917128300fb8c1a"
|
||||
version = "15.0.0-beta.26"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v15.0.0-beta.26#f9fd19edfb14e43d3981b20dfaf183672751414b"
|
||||
dependencies = [
|
||||
"byteorder",
|
||||
"ethnum",
|
||||
@@ -5883,7 +5883,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "lance-linalg"
|
||||
version = "15.0.0-beta.25"
|
||||
version = "15.0.0-beta.26"
|
||||
dependencies = [
|
||||
"approx",
|
||||
"argminmax 0.7.1",
|
||||
@@ -5905,8 +5905,8 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "lance-namespace"
|
||||
version = "15.0.0-beta.25"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v15.0.0-beta.25#f5dbd55dd79f1f0412f897ed1917128300fb8c1a"
|
||||
version = "15.0.0-beta.26"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v15.0.0-beta.26#f9fd19edfb14e43d3981b20dfaf183672751414b"
|
||||
dependencies = [
|
||||
"arrow",
|
||||
"async-trait",
|
||||
@@ -5920,8 +5920,8 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "lance-namespace-impls"
|
||||
version = "15.0.0-beta.25"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v15.0.0-beta.25#f5dbd55dd79f1f0412f897ed1917128300fb8c1a"
|
||||
version = "15.0.0-beta.26"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v15.0.0-beta.26#f9fd19edfb14e43d3981b20dfaf183672751414b"
|
||||
dependencies = [
|
||||
"arc-swap",
|
||||
"arrow",
|
||||
@@ -5975,8 +5975,8 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "lance-select"
|
||||
version = "15.0.0-beta.25"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v15.0.0-beta.25#f5dbd55dd79f1f0412f897ed1917128300fb8c1a"
|
||||
version = "15.0.0-beta.26"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v15.0.0-beta.26#f9fd19edfb14e43d3981b20dfaf183672751414b"
|
||||
dependencies = [
|
||||
"arrow-array",
|
||||
"arrow-buffer",
|
||||
@@ -5990,8 +5990,8 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "lance-table"
|
||||
version = "15.0.0-beta.25"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v15.0.0-beta.25#f5dbd55dd79f1f0412f897ed1917128300fb8c1a"
|
||||
version = "15.0.0-beta.26"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v15.0.0-beta.26#f9fd19edfb14e43d3981b20dfaf183672751414b"
|
||||
dependencies = [
|
||||
"arrow",
|
||||
"arrow-array",
|
||||
@@ -6032,8 +6032,8 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "lance-testing"
|
||||
version = "15.0.0-beta.25"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v15.0.0-beta.25#f5dbd55dd79f1f0412f897ed1917128300fb8c1a"
|
||||
version = "15.0.0-beta.26"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v15.0.0-beta.26#f9fd19edfb14e43d3981b20dfaf183672751414b"
|
||||
dependencies = [
|
||||
"arrow-array",
|
||||
"arrow-schema",
|
||||
@@ -6046,8 +6046,8 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "lance-tokenizer"
|
||||
version = "15.0.0-beta.25"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v15.0.0-beta.25#f5dbd55dd79f1f0412f897ed1917128300fb8c1a"
|
||||
version = "15.0.0-beta.26"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v15.0.0-beta.26#f9fd19edfb14e43d3981b20dfaf183672751414b"
|
||||
dependencies = [
|
||||
"frostem",
|
||||
"icu_segmenter",
|
||||
@@ -6060,7 +6060,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "lancedb"
|
||||
version = "0.42.0-beta.18"
|
||||
version = "0.42.0-beta.22"
|
||||
dependencies = [
|
||||
"ahash",
|
||||
"anyhow",
|
||||
@@ -6171,7 +6171,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "lancedb-cli"
|
||||
version = "0.42.0-beta.18"
|
||||
version = "0.42.0-beta.22"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"arrow-array",
|
||||
@@ -6214,7 +6214,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "lancedb-nodejs"
|
||||
version = "0.42.0-beta.18"
|
||||
version = "0.42.0-beta.22"
|
||||
dependencies = [
|
||||
"arrow-array",
|
||||
"arrow-buffer",
|
||||
@@ -6234,12 +6234,13 @@ dependencies = [
|
||||
"napi",
|
||||
"napi-build",
|
||||
"napi-derive",
|
||||
"serde",
|
||||
"serde_json",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "lancedb-python"
|
||||
version = "0.42.0-beta.18"
|
||||
version = "0.42.0-beta.22"
|
||||
dependencies = [
|
||||
"arc-swap",
|
||||
"arrow",
|
||||
@@ -6393,9 +6394,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "libsais-rs"
|
||||
version = "0.2.0"
|
||||
version = "0.2.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "40fe164dbd47ea0c20e78a121c980ef673326905f1d4fba55e3645a20ef6717f"
|
||||
checksum = "ec55b7be74ed721889b8bc62d53e6a032d2b3b9bb60a4942b45b1e8362e64583"
|
||||
dependencies = [
|
||||
"rayon",
|
||||
]
|
||||
@@ -8668,7 +8669,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b8530004ccb15eae51c7e40009fbe317f341f804db54dc033eec1c50be28cfa0"
|
||||
dependencies = [
|
||||
"bit-set 0.11.1",
|
||||
"bit-vec 0.10.1",
|
||||
"bit-vec 0.10.2",
|
||||
"bitflags 2.11.1",
|
||||
"chacha20",
|
||||
"core_detect",
|
||||
@@ -11925,9 +11926,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "url"
|
||||
version = "2.5.8"
|
||||
version = "2.5.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed"
|
||||
checksum = "f00cd2407bb42c0ef17be88d4cf020f5cceffd121665bac9b8b9493a369b3b1a"
|
||||
dependencies = [
|
||||
"form_urlencoded",
|
||||
"idna",
|
||||
|
||||
+14
-14
@@ -20,20 +20,20 @@ categories = ["database-implementations"]
|
||||
rust-version = "1.95.0"
|
||||
|
||||
[workspace.dependencies]
|
||||
lance = { "version" = "=15.0.0-beta.25", default-features = false, "tag" = "v15.0.0-beta.25", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-core = { "version" = "=15.0.0-beta.25", "tag" = "v15.0.0-beta.25", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-datagen = { "version" = "=15.0.0-beta.25", "tag" = "v15.0.0-beta.25", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-file = { "version" = "=15.0.0-beta.25", "tag" = "v15.0.0-beta.25", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-io = { "version" = "=15.0.0-beta.25", default-features = false, "tag" = "v15.0.0-beta.25", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-index = { "version" = "=15.0.0-beta.25", "tag" = "v15.0.0-beta.25", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-jsonb = { "version" = "=15.0.0-beta.25", "tag" = "v15.0.0-beta.25", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-namespace = { "version" = "=15.0.0-beta.25", "tag" = "v15.0.0-beta.25", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-namespace-impls = { "version" = "=15.0.0-beta.25", default-features = false, "tag" = "v15.0.0-beta.25", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-table = { "version" = "=15.0.0-beta.25", "tag" = "v15.0.0-beta.25", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-testing = { "version" = "=15.0.0-beta.25", "tag" = "v15.0.0-beta.25", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-datafusion = { "version" = "=15.0.0-beta.25", "tag" = "v15.0.0-beta.25", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-encoding = { "version" = "=15.0.0-beta.25", "tag" = "v15.0.0-beta.25", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-arrow = { "version" = "=15.0.0-beta.25", "tag" = "v15.0.0-beta.25", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance = { "version" = "=15.0.0-beta.26", default-features = false, "tag" = "v15.0.0-beta.26", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-core = { "version" = "=15.0.0-beta.26", "tag" = "v15.0.0-beta.26", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-datagen = { "version" = "=15.0.0-beta.26", "tag" = "v15.0.0-beta.26", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-file = { "version" = "=15.0.0-beta.26", "tag" = "v15.0.0-beta.26", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-io = { "version" = "=15.0.0-beta.26", default-features = false, "tag" = "v15.0.0-beta.26", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-index = { "version" = "=15.0.0-beta.26", "tag" = "v15.0.0-beta.26", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-jsonb = { "version" = "=15.0.0-beta.26", "tag" = "v15.0.0-beta.26", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-namespace = { "version" = "=15.0.0-beta.26", "tag" = "v15.0.0-beta.26", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-namespace-impls = { "version" = "=15.0.0-beta.26", default-features = false, "tag" = "v15.0.0-beta.26", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-table = { "version" = "=15.0.0-beta.26", "tag" = "v15.0.0-beta.26", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-testing = { "version" = "=15.0.0-beta.26", "tag" = "v15.0.0-beta.26", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-datafusion = { "version" = "=15.0.0-beta.26", "tag" = "v15.0.0-beta.26", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-encoding = { "version" = "=15.0.0-beta.26", "tag" = "v15.0.0-beta.26", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-arrow = { "version" = "=15.0.0-beta.26", "tag" = "v15.0.0-beta.26", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lancedb = { path = "rust/lancedb", default-features = false }
|
||||
ahash = "0.8"
|
||||
anyhow = "1"
|
||||
|
||||
@@ -20,7 +20,20 @@ parity gaps when reviewing — but only flag real ones:
|
||||
* Stay silent on internal-only refactors, tests, docs, and changes with no cross-SDK
|
||||
surface.
|
||||
* Parity expectations apply to the Python and TypeScript (`nodejs`) SDKs. Java currently
|
||||
implements only the remote table, not the local/embedded backend, so it is expected to
|
||||
be partial — do not flag Java for missing local-only functionality.
|
||||
implements only Enterprise tables, not the Embedded backend, so it is expected to
|
||||
be partial — do not flag Java for missing Embedded-only functionality.
|
||||
* Keep parity feedback to a short, clearly-labeled note (e.g. "Possible SDK parity
|
||||
gap: …"). It is advisory, not a merge blocker.
|
||||
|
||||
## User-facing text and API compatibility
|
||||
|
||||
Check new user-facing text and public API changes against the rules in `AGENTS.md`:
|
||||
|
||||
* Docs, docstrings, error messages, and examples say "Embedded" and "Enterprise", not
|
||||
"local" or "remote" tables.
|
||||
* Released public APIs are deprecated rather than removed, and released names are not
|
||||
reused for something with a different meaning.
|
||||
* User guides (`docs/web`) document only the current API, with no migration or
|
||||
deprecation notices.
|
||||
* Breaking changes have `!` in the PR title and a `BREAKING CHANGE:` paragraph at the
|
||||
top of the PR body.
|
||||
|
||||
+7029
-1104
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,42 @@
|
||||
#!/bin/sh
|
||||
# Run from repository root. The fake transport serves a deliberately corrupt archive.
|
||||
set -eu
|
||||
work=$(mktemp -d)
|
||||
trap 'rm -rf "$work"' EXIT
|
||||
export HOME="$work/home" LANCEDB_VERSION=v0.42.0-beta.19
|
||||
unset LANCEDB_INSTALL_DIR
|
||||
mkdir -p "$work/bin" "$HOME"
|
||||
export PATH="$work/bin:$PATH"
|
||||
cat > "$work/bin/curl" <<'MOCK'
|
||||
#!/bin/sh
|
||||
while [ "$1" != -o ]; do shift; done
|
||||
case "$3" in
|
||||
*/SHA256SUMS)
|
||||
for target in x86_64-unknown-linux-gnu aarch64-unknown-linux-gnu aarch64-apple-darwin; do
|
||||
printf '%064d lancedb-%s-%s.tar.gz\n' 0 "$LANCEDB_VERSION" "$target"
|
||||
done > "$2" ;;
|
||||
*) printf 'corrupt archive' > "$2" ;;
|
||||
esac
|
||||
MOCK
|
||||
chmod +x "$work/bin/curl"
|
||||
reject() {
|
||||
if sh scripts/install.sh > "$work/log" 2>&1; then
|
||||
echo "Unexpected install success" >&2
|
||||
exit 1
|
||||
fi
|
||||
grep -F "$1" "$work/log"
|
||||
}
|
||||
|
||||
printf 'existing admin CLI\n' > "$work/bin/lancedb"
|
||||
chmod +x "$work/bin/lancedb"
|
||||
reject 'on PATH'
|
||||
test ! -e "$HOME/.local/bin/lancedb"
|
||||
export LANCEDB_INSTALL_DIR="$work/separate bin"
|
||||
mkdir -p "$LANCEDB_INSTALL_DIR"
|
||||
ln -s "$work/bin/lancedb" "$LANCEDB_INSTALL_DIR/lancedb"
|
||||
reject 'already exists'
|
||||
test -L "$LANCEDB_INSTALL_DIR/lancedb"
|
||||
rm "$LANCEDB_INSTALL_DIR/lancedb"
|
||||
reject 'Checksum mismatch'
|
||||
test -z "$(ls -A "$LANCEDB_INSTALL_DIR")"
|
||||
test "$(cat "$work/bin/lancedb")" = 'existing admin CLI'
|
||||
@@ -132,13 +132,31 @@ ignore = [
|
||||
{ id = "RUSTSEC-2026-0398", reason = "zstd-safe 7 via arrow-ipc 58; affected seekable API is not enabled" },
|
||||
{ id = "RUSTSEC-2026-0403", reason = "zstd-safe 7 via arrow-ipc 58; affected streaming decoder API is unused" },
|
||||
|
||||
# pin-utils: unmaintained; reviewed 2026-11-05. Transitive via
|
||||
# aws-smithy-http/runtime/types, including aws-config -> lance-io.
|
||||
# No safe upgrade exists; clearing requires AWS Smithy to migrate to
|
||||
# core::pin::pin!, pin-project, or pin-project-lite. Revisit on AWS updates.
|
||||
# pin-utils: unmaintained; reviewed 2026-11-05, removed 2026-11-17 after
|
||||
# the lockfile dropped the aws-smithy pins that carried it.
|
||||
# https://rustsec.org/advisories/RUSTSEC-2026-0441
|
||||
# https://github.com/rustsec/advisory-db/issues/3314
|
||||
{ id = "RUSTSEC-2026-0441", reason = "pin-utils unmaintained via AWS Smithy; no safe upgrade, awaiting upstream migration" },
|
||||
|
||||
# chrono: unmaintained; reviewed 2026-11-17. Informational notice, not a
|
||||
# vulnerability. Transitive via arrow 59 / datafusion 55 and the lance
|
||||
# stack throughout the workspace. RustSec lists no patched version and
|
||||
# recommends jiff/time; clearing it requires the arrow/datafusion/lance
|
||||
# ecosystem to migrate.
|
||||
# https://rustsec.org/advisories/RUSTSEC-2026-0543
|
||||
{ id = "RUSTSEC-2026-0543", reason = "chrono unmaintained via arrow/datafusion/lance; no fixed upstream release, awaiting ecosystem migration" },
|
||||
|
||||
# chrono-tz: unmaintained; reviewed 2026-11-17. Informational notice, not
|
||||
# a vulnerability. Transitive via arrow-array → arrow → datafusion/lance.
|
||||
# No patched version exists; clearing it needs the same ecosystem
|
||||
# migration off chrono as RUSTSEC-2026-0543.
|
||||
# https://rustsec.org/advisories/RUSTSEC-2026-0555
|
||||
{ id = "RUSTSEC-2026-0555", reason = "chrono-tz unmaintained via arrow/datafusion/lance; no fixed upstream release" },
|
||||
|
||||
# humantime: unmaintained; reviewed 2026-11-17. Informational notice, not
|
||||
# a vulnerability. Transitive via lance, object_store (through datafusion)
|
||||
# and xet-runtime. No patched version exists; the advisory follows chrono's
|
||||
# maintenance status.
|
||||
# https://rustsec.org/advisories/RUSTSEC-2026-0542
|
||||
{ id = "RUSTSEC-2026-0542", reason = "humantime unmaintained via lance/object_store/xet-runtime; no fixed upstream release" },
|
||||
]
|
||||
|
||||
|
||||
|
||||
+6
-23
@@ -1,27 +1,10 @@
|
||||
# Simple base dockerfile that supports basic dependencies required to run lance with FTS and Hybrid Search
|
||||
# Simple base dockerfile for running LanceDB, including FTS and Hybrid Search
|
||||
# Usage: docker build -t lancedb:latest -f Dockerfile .
|
||||
FROM python:3.12-slim-bookworm
|
||||
|
||||
# Install build dependencies in a single layer
|
||||
RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
curl \
|
||||
build-essential \
|
||||
protobuf-compiler \
|
||||
git \
|
||||
ca-certificates && \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install Rust (pinned installer, non-interactive)
|
||||
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable --profile minimal
|
||||
|
||||
# Set the environment variable for Rust
|
||||
ENV PATH="/root/.cargo/bin:${PATH}"
|
||||
|
||||
# Verify installations
|
||||
RUN python --version && \
|
||||
rustc --version && \
|
||||
protoc --version
|
||||
|
||||
# lancedb ships prebuilt manylinux wheels, so no Rust or C toolchain is needed.
|
||||
RUN pip install --no-cache-dir lancedb
|
||||
|
||||
RUN useradd --create-home --uid 1000 lancedb
|
||||
USER lancedb
|
||||
WORKDIR /home/lancedb
|
||||
|
||||
+148
@@ -0,0 +1,148 @@
|
||||
# LanceDB documentation style
|
||||
|
||||
Write for developers who want to understand LanceDB and get something done.
|
||||
Be direct, approachable and technically precise. Give readers enough context
|
||||
to make a decision, then show them how to act on it.
|
||||
|
||||
This guide covers prose on docs.lancedb.com: the pages in this repository's
|
||||
`docs/web`, including the public Enterprise pages, and the Geneva, dataset and
|
||||
REST pages kept in other sources. The
|
||||
[contributing guide](../CONTRIBUTING.md#documentation) covers previewing,
|
||||
code examples and availability labels.
|
||||
|
||||
## Start with the reader's goal
|
||||
|
||||
Open with what the feature does and when to use it. Keep the introduction
|
||||
short. Put prerequisites before the instructions that need them, and explain
|
||||
limitations beside the choice or operation they affect.
|
||||
|
||||
Show the common path before advanced options. A guide should get readers to a
|
||||
useful result before asking them to compare every configuration. This is a
|
||||
default, not a required outline for every page.
|
||||
|
||||
## Give each page a purpose
|
||||
|
||||
A concept page explains a few central ideas and how they relate. A guide helps
|
||||
readers complete a task. A reference describes exact syntax, options and
|
||||
behavior. Link to related material with descriptive link text instead of
|
||||
making every page cover all three roles.
|
||||
|
||||
Keep each section focused on the page's purpose. Don't add a conclusion or a
|
||||
next-steps section unless it helps the reader decide what to do next.
|
||||
|
||||
## Teach through examples
|
||||
|
||||
Use small datasets, meaningful names and examples that build on each other.
|
||||
Include the imports, setup and prerequisites readers need, or clearly link to
|
||||
shared setup. State when successive blocks belong to one program. Show the
|
||||
expected result when it helps readers understand the operation.
|
||||
|
||||
Where equivalent SDK support exists, show Python, TypeScript and Rust
|
||||
consistently. Use the same task and sample data across languages, with
|
||||
idiomatic code in each. If support differs, explain the difference beside the
|
||||
example; don't invent an equivalent API. Prefer fresh example data and make
|
||||
any destructive behavior explicit.
|
||||
|
||||
Explain what an example demonstrates or why an option matters. Avoid narrating
|
||||
every line when the code already makes its meaning clear.
|
||||
|
||||
## Explain choices and consequences
|
||||
|
||||
Tell readers when to choose an option and what changes when they do. State the
|
||||
relevant tradeoff, such as latency versus recall, rather than listing settings
|
||||
without guidance. Use a table when it makes alternatives easier to compare.
|
||||
|
||||
Name the product or component whose behavior you describe. Use LanceDB
|
||||
Enterprise when you mean the offering; use deployment when you mean a
|
||||
particular installation or its configuration. Describe concrete capabilities
|
||||
and benefits without unsupported performance claims or superlatives.
|
||||
|
||||
## Say it directly
|
||||
|
||||
Address the reader as "you" and prefer active verbs and familiar words.
|
||||
Introduce unfamiliar terms when readers first need them. Prefer "use" to
|
||||
"utilize" and "to" to "in order to". Keep technical terms precise: "GPU
|
||||
utilization", for example, has a specific meaning and does not need replacing.
|
||||
|
||||
Describe the subject, not the page or the writing. Instead of "This page is the
|
||||
concept; the SQL reference is the specification", explain the concept and
|
||||
link to the reference. Instead of opening with "That matters", state the
|
||||
consequence. Avoid "simply" and "obviously" when they assume a task is easy for
|
||||
the reader. These are writing guidelines, not blanket bans on individual words.
|
||||
|
||||
## Headings
|
||||
|
||||
A heading names the task or topic of its section. "Then what" doesn't; "Choose
|
||||
an output" does. Prefer specific headings such as "Data durability" to broad
|
||||
questions such as "What survives?". Use sentence case, preserving product names
|
||||
and identifiers.
|
||||
|
||||
## Names
|
||||
|
||||
Write product names exactly: LanceDB, LanceDB Embedded and LanceDB Enterprise.
|
||||
Write other names as their owners do, such as Hugging Face, LangChain,
|
||||
TypeScript and Voyage AI.
|
||||
|
||||
- **LanceDB Embedded** is the in-process execution model: the SDK runs
|
||||
database operations inside the application's process and reads Lance tables
|
||||
directly, from local disk or object storage. Don't write "LanceDB OSS",
|
||||
"LanceDB Local" or "local mode".
|
||||
- **LanceDB Enterprise** is the commercial product. Use this name in product
|
||||
descriptions, SDK documentation and architecture explanations: "a LanceDB
|
||||
SDK connects to LanceDB Enterprise". Describe execution directly: query
|
||||
execution, indexing, caching and maintenance run on the service, outside
|
||||
the application. Write "Embedded and Enterprise" when comparing offerings.
|
||||
Don't introduce "LanceDB Distributed" as another name for the product or
|
||||
its execution model. Lowercase "distributed" still describes how a feature
|
||||
works, such as distributed search, caching or training. Use "Enterprise
|
||||
table" or "Enterprise connection" in prose; keep API identifiers such as
|
||||
`RemoteTable` unchanged.
|
||||
- **LanceDB Cloud** is only the legacy hosted service. Keep it where text is
|
||||
specific to that service, such as `db://` URIs with an `api_key` and
|
||||
`region`; otherwise write LanceDB Enterprise.
|
||||
- **Open source** is a property, not a product: "the open-source LanceDB SDKs",
|
||||
"Lance is open source". Where free versus paid is the point, write "LanceDB
|
||||
Embedded (open source)" and "LanceDB Enterprise". Don't use "OSS" as a
|
||||
product name, as in "OSS vs Enterprise".
|
||||
- Internal component names stay out of public text. Write "query node",
|
||||
"executor" and LanceDB Enterprise instead; the `InternalNames` Vale rule
|
||||
lists the names it catches. Geneva is a product name and stays as is.
|
||||
|
||||
Package, module, class and repository names are code, so put them in code
|
||||
font: `lancedb`, `pyarrow`, `HuggingFaceEmbeddings`.
|
||||
|
||||
## Punctuation
|
||||
|
||||
Don't use em dashes in prose, or a double hyphen or spaced en dash in place of
|
||||
one. Use a comma, a colon, parentheses or two sentences. An en dash in a range,
|
||||
such as 1–3, is fine, and so is a table cell that holds only an em dash to mean
|
||||
"none".
|
||||
|
||||
## Automated checks and review
|
||||
|
||||
[Vale](https://vale.sh) checks a small subset of these conventions: product
|
||||
names, dashes, repeated words, a few vague phrases and headings, and a few
|
||||
plain-language substitutions. Findings are advisory and appear on changed
|
||||
lines; they never fail the check. Installation or configuration failures can
|
||||
still fail it. See the [bundled rules](../.github/vale/README.md) for usage and tests.
|
||||
|
||||
Vale cannot verify technical claims, example correctness, SDK coverage or a
|
||||
page's organization. Review those using implementation evidence, tests and
|
||||
feature-owner input. Confirm availability and release status with the owner;
|
||||
do not infer a release promise from an implementation or a passing test.
|
||||
Reader-visible component titles and captions in MDX attributes are also left
|
||||
to review because Vale does not inspect those attributes.
|
||||
|
||||
Use these guidelines as defaults. Reviewers can make exceptions when they
|
||||
improve clarity or accuracy.
|
||||
|
||||
## Exceptions
|
||||
|
||||
When a sentence must break an automated rule, such as a quoted error message,
|
||||
switch off that rule around it and say why in the pull request:
|
||||
|
||||
```mdx
|
||||
{/* vale LanceDB.Dashes = NO */}
|
||||
The server returns "Table not found — check the name".
|
||||
{/* vale LanceDB.Dashes = YES */}
|
||||
```
|
||||
@@ -14,7 +14,7 @@ Add the following dependency to your `pom.xml`:
|
||||
<dependency>
|
||||
<groupId>com.lancedb</groupId>
|
||||
<artifactId>lancedb-core</artifactId>
|
||||
<version>0.42.0-beta.18</version>
|
||||
<version>0.42.0-beta.22</version>
|
||||
</dependency>
|
||||
```
|
||||
|
||||
|
||||
@@ -64,6 +64,35 @@ with `status: "failed"` instead of throwing.
|
||||
|
||||
### create()
|
||||
|
||||
#### create(name, options)
|
||||
|
||||
```ts
|
||||
create(name, options): Promise<Table>
|
||||
```
|
||||
|
||||
Create a branch from a tag and return a handle scoped to it.
|
||||
|
||||
##### Parameters
|
||||
|
||||
* **name**: `string`
|
||||
Name of the new branch.
|
||||
|
||||
* **options**: [`CreateBranchOptions`](../interfaces/CreateBranchOptions.md)
|
||||
Named source. `fromTag` keeps the tag's branch and version.
|
||||
|
||||
##### Returns
|
||||
|
||||
`Promise`<[`Table`](Table.md)>
|
||||
|
||||
##### Example
|
||||
|
||||
```typescript
|
||||
const branches = await table.branches();
|
||||
const branch = await branches.create("exp", { fromTag: "baseline" });
|
||||
```
|
||||
|
||||
#### create(name, fromRef, fromVersion)
|
||||
|
||||
```ts
|
||||
create(
|
||||
name,
|
||||
@@ -73,7 +102,7 @@ create(
|
||||
|
||||
Create a branch and return a handle scoped to it.
|
||||
|
||||
#### Parameters
|
||||
##### Parameters
|
||||
|
||||
* **name**: `string`
|
||||
Name of the new branch.
|
||||
@@ -84,7 +113,7 @@ Create a branch and return a handle scoped to it.
|
||||
* **fromVersion?**: `number`
|
||||
A specific version on `fromRef`. Defaults to latest.
|
||||
|
||||
#### Returns
|
||||
##### Returns
|
||||
|
||||
`Promise`<[`Table`](Table.md)>
|
||||
|
||||
|
||||
@@ -196,10 +196,20 @@ it can be queried, indexed and searched, and it appears in `tableNames`.
|
||||
|
||||
* **options?**
|
||||
|
||||
* **options.gpuClass?**: `string`
|
||||
|
||||
* **options.gpuCount?**: `number`
|
||||
|
||||
* **options.limit?**: `number`
|
||||
|
||||
* **options.select?**: [`MaterializedViewSelect`](../type-aliases/MaterializedViewSelect.md)
|
||||
|
||||
* **options.totalCpuMillis?**: `number`
|
||||
|
||||
* **options.totalGpuCount?**: `number`
|
||||
|
||||
* **options.totalMemoryBytes?**: `number`
|
||||
|
||||
* **options.where?**: `string`
|
||||
|
||||
* **options.withNoData?**: `boolean`
|
||||
@@ -456,7 +466,7 @@ Rejects a table that exists but is not a materialized view.
|
||||
### dropMaterializedViewAsync()
|
||||
|
||||
```ts
|
||||
abstract dropMaterializedViewAsync(name, namespacePath?): Promise<Job>
|
||||
abstract dropMaterializedViewAsync(name, namespacePath?): Promise<Job<void>>
|
||||
```
|
||||
|
||||
Start dropping the materialized view named `name` and return its job.
|
||||
@@ -473,7 +483,7 @@ Rejects a table that exists but is not a materialized view.
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`Job`](Job.md)>
|
||||
`Promise`<[`Job`](Job.md)<`void`>>
|
||||
|
||||
***
|
||||
|
||||
@@ -532,7 +542,7 @@ Drop an existing table.
|
||||
### dropTableAsync()
|
||||
|
||||
```ts
|
||||
abstract dropTableAsync(name, namespacePath?): Promise<Job>
|
||||
abstract dropTableAsync(name, namespacePath?): Promise<Job<void>>
|
||||
```
|
||||
|
||||
Start dropping a table and return its cleanup job.
|
||||
@@ -548,7 +558,7 @@ on the returned job to know when cleanup has finished.
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`Job`](Job.md)>
|
||||
`Promise`<[`Job`](Job.md)<`void`>>
|
||||
|
||||
***
|
||||
|
||||
@@ -579,7 +589,7 @@ catalog removal; physical cleanup continues in the background.
|
||||
### dropViewAsync()
|
||||
|
||||
```ts
|
||||
abstract dropViewAsync(name, namespacePath?): Promise<Job>
|
||||
abstract dropViewAsync(name, namespacePath?): Promise<Job<void>>
|
||||
```
|
||||
|
||||
Drop a view and return its SQL query job.
|
||||
@@ -594,7 +604,7 @@ catalog removal; physical cleanup continues in the background.
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`Job`](Job.md)>
|
||||
`Promise`<[`Job`](Job.md)<`void`>>
|
||||
|
||||
***
|
||||
|
||||
@@ -729,7 +739,7 @@ state and error behavior; options control page size and the starting token.
|
||||
### openJob()
|
||||
|
||||
```ts
|
||||
abstract openJob(jobId): Promise<Job>
|
||||
abstract openJob<T>(jobId): Promise<Job<T>>
|
||||
```
|
||||
|
||||
Open a server-side job by id, returning a handle with its record already
|
||||
@@ -740,13 +750,17 @@ The returned [Job](Job.md) answers for its own state, specification,
|
||||
result, failure and event history, so there is no separate
|
||||
connection-level call for any of them.
|
||||
|
||||
#### Type Parameters
|
||||
|
||||
• **T** = `void`
|
||||
|
||||
#### Parameters
|
||||
|
||||
* **jobId**: `string`
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`Job`](Job.md)>
|
||||
`Promise`<[`Job`](Job.md)<`T`>>
|
||||
|
||||
***
|
||||
|
||||
|
||||
@@ -258,3 +258,51 @@ using an underlying bitmap index.
|
||||
#### Returns
|
||||
|
||||
[`Index`](Index.md)
|
||||
|
||||
***
|
||||
|
||||
### rtree()
|
||||
|
||||
```ts
|
||||
static rtree(options?): Index
|
||||
```
|
||||
|
||||
Create an RTree index.
|
||||
|
||||
An RTree index is a scalar index on a GeoArrow geometry column, that is, a
|
||||
column whose Arrow field metadata sets `ARROW:extension:name` to a GeoArrow
|
||||
type such as `geoarrow.point`, `geoarrow.polygon` or `geoarrow.wkb`. It
|
||||
stores the bounding box of each geometry and accelerates spatial filters.
|
||||
|
||||
The index accelerates `ST_Intersects`, `ST_Contains`, `ST_Within`,
|
||||
`ST_Touches`, `ST_Crosses`, `ST_Overlaps`, `ST_Covers` and `ST_CoveredBy`
|
||||
between the indexed column and a constant geometry, in either argument
|
||||
order, for example
|
||||
`ST_Within(geom, ST_GeomFromText('POLYGON ((...))'))`, as well as
|
||||
`geom IS NULL`. These filters can be combined with other conditions using
|
||||
`AND`.
|
||||
|
||||
See the R-tree section of https://docs.lancedb.com/indexing/scalar-index
|
||||
for storing geometry, the other spatial functions, and spatial filters on
|
||||
vector search.
|
||||
|
||||
Remote tables send the `RTREE` index type to the server, which must
|
||||
support it.
|
||||
|
||||
#### Parameters
|
||||
|
||||
* **options?**: `Partial`<[`RTreeOptions`](../interfaces/RTreeOptions.md)>
|
||||
|
||||
#### Returns
|
||||
|
||||
[`Index`](Index.md)
|
||||
|
||||
#### Example
|
||||
|
||||
```ts
|
||||
await table.createIndex("geom", { config: Index.rtree() });
|
||||
await table
|
||||
.query()
|
||||
.where("ST_Intersects(geom, ST_GeomFromText('POLYGON ((0 0, 4 0, 0 4, 0 0))'))")
|
||||
.toArray();
|
||||
```
|
||||
|
||||
+293
-6
@@ -4,7 +4,7 @@
|
||||
|
||||
[@lancedb/lancedb](../globals.md) / Job
|
||||
|
||||
# Class: Job
|
||||
# Class: Job<T>
|
||||
|
||||
A handle to an operation that may still be running.
|
||||
|
||||
@@ -20,8 +20,26 @@ extra round trip on every call:
|
||||
- Registry details are null until one of those runs. Query handles report
|
||||
jobType "query" immediately.
|
||||
|
||||
## Type Parameters
|
||||
|
||||
• **T** = `void`
|
||||
|
||||
## Accessors
|
||||
|
||||
### attempt
|
||||
|
||||
```ts
|
||||
get attempt(): null | number
|
||||
```
|
||||
|
||||
One-based attempt ordinal. Worker replacement does not increment it.
|
||||
|
||||
#### Returns
|
||||
|
||||
`null` \| `number`
|
||||
|
||||
***
|
||||
|
||||
### creationMs
|
||||
|
||||
```ts
|
||||
@@ -36,6 +54,20 @@ When the job was created, in milliseconds since the epoch.
|
||||
|
||||
***
|
||||
|
||||
### executionEpoch
|
||||
|
||||
```ts
|
||||
get executionEpoch(): null | number
|
||||
```
|
||||
|
||||
Most recent execution's fencing token, when reported.
|
||||
|
||||
#### Returns
|
||||
|
||||
`null` \| `number`
|
||||
|
||||
***
|
||||
|
||||
### failure
|
||||
|
||||
```ts
|
||||
@@ -69,6 +101,23 @@ durable resume tokens.
|
||||
|
||||
***
|
||||
|
||||
### jobId
|
||||
|
||||
```ts
|
||||
get jobId(): null | string
|
||||
```
|
||||
|
||||
Identity of the selected attempt last observed by this handle.
|
||||
For operation handles, `refresh()` or `status()` can select a different
|
||||
attempt while `id` stays unchanged. Save this value after refreshing and
|
||||
use it throughout paged diagnostics. Local IDs cannot be reopened on a server.
|
||||
|
||||
#### Returns
|
||||
|
||||
`null` \| `string`
|
||||
|
||||
***
|
||||
|
||||
### jobType
|
||||
|
||||
```ts
|
||||
@@ -84,6 +133,34 @@ server-reported job type. Null for in-process handles.
|
||||
|
||||
***
|
||||
|
||||
### lifecycleState
|
||||
|
||||
```ts
|
||||
get lifecycleState(): null | JobState
|
||||
```
|
||||
|
||||
Detailed state last observed; unknown values never establish success.
|
||||
|
||||
#### Returns
|
||||
|
||||
`null` \| [`JobState`](../type-aliases/JobState.md)
|
||||
|
||||
***
|
||||
|
||||
### operationId
|
||||
|
||||
```ts
|
||||
get operationId(): null | string
|
||||
```
|
||||
|
||||
Root of the explicit retry lineage, when reported.
|
||||
|
||||
#### Returns
|
||||
|
||||
`null` \| `string`
|
||||
|
||||
***
|
||||
|
||||
### result
|
||||
|
||||
```ts
|
||||
@@ -100,6 +177,34 @@ instead.
|
||||
|
||||
***
|
||||
|
||||
### retryOf
|
||||
|
||||
```ts
|
||||
get retryOf(): null | string
|
||||
```
|
||||
|
||||
Immediate predecessor attempt, when reported.
|
||||
|
||||
#### Returns
|
||||
|
||||
`null` \| `string`
|
||||
|
||||
***
|
||||
|
||||
### sourceTableVersion
|
||||
|
||||
```ts
|
||||
get sourceTableVersion(): null | number
|
||||
```
|
||||
|
||||
Source snapshot pinned for this attempt, when reported.
|
||||
|
||||
#### Returns
|
||||
|
||||
`null` \| `number`
|
||||
|
||||
***
|
||||
|
||||
### spec
|
||||
|
||||
```ts
|
||||
@@ -142,6 +247,43 @@ Request cancellation. Cancelling a finished operation is a no-op.
|
||||
|
||||
***
|
||||
|
||||
### captureProfile()
|
||||
|
||||
```ts
|
||||
captureProfile(workerId, options): Promise<FunctionProfile>
|
||||
```
|
||||
|
||||
Request a profile of a running Enterprise Function worker session.
|
||||
Returns the accepted identity without waiting for recording to finish.
|
||||
Requires System Operate permission and server profiling support. The server
|
||||
pins the worker, Python session and execution epoch. One capture per job
|
||||
can be active. Captures add workload-dependent overhead.
|
||||
|
||||
GPU tracing requires initialized PyTorch CUDA/CUPTI. CPU sampling requires
|
||||
readable per-thread procfs and is unavailable in dedicated sandboxes.
|
||||
|
||||
#### Parameters
|
||||
|
||||
* **workerId**: `string`
|
||||
|
||||
* **options**: [`FunctionProfileOptions`](../interfaces/FunctionProfileOptions.md) = `{}`
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`FunctionProfile`](../interfaces/FunctionProfile.md)>
|
||||
|
||||
#### Example
|
||||
|
||||
```ts
|
||||
const profile = await job.captureProfile("worker-id", {
|
||||
kind: "gpu", durationSeconds: 2,
|
||||
});
|
||||
await job.waitForProfile(profile.profileId, { timeoutMs: 60_000 });
|
||||
await job.exportProfile(profile.profileId, "gpu.trace.json");
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### events()
|
||||
|
||||
```ts
|
||||
@@ -171,6 +313,89 @@ per fragment. `filter` is a SQL-like expression over the `state`,
|
||||
|
||||
***
|
||||
|
||||
### exportProfile()
|
||||
|
||||
```ts
|
||||
exportProfile(profileId, path): Promise<void>
|
||||
```
|
||||
|
||||
Write a completed capture's JSON after successful retrieval. Open CPU
|
||||
exports in speedscope and GPU exports in Perfetto. GPU activity durations
|
||||
can overlap and are not utilization; Python operator attribution and GPU
|
||||
allocation stacks are excluded. Filesystem errors propagate to the caller.
|
||||
|
||||
#### Parameters
|
||||
|
||||
* **profileId**: `string`
|
||||
|
||||
* **path**: `string`
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`void`>
|
||||
|
||||
***
|
||||
|
||||
### history()
|
||||
|
||||
```ts
|
||||
history(options?): AsyncGenerator<Table<any>, any, unknown>
|
||||
```
|
||||
|
||||
Walk retained history one page at a time using the server's continuation.
|
||||
|
||||
#### Parameters
|
||||
|
||||
* **options?**: [`JobEventsOptions`](../interfaces/JobEventsOptions.md)
|
||||
|
||||
#### Returns
|
||||
|
||||
`AsyncGenerator`<`Table`<`any`>, `any`, `unknown`>
|
||||
|
||||
***
|
||||
|
||||
### profileArtifact()
|
||||
|
||||
```ts
|
||||
profileArtifact(profileId): Promise<Record<string, unknown>>
|
||||
```
|
||||
|
||||
Retrieve a completed capture's actual JSON: speedscope for CPU,
|
||||
tracemalloc for Python allocations, or Chrome Trace Event JSON for GPU.
|
||||
Truncation flags are preserved. Retention is at most one hour and eight
|
||||
captures per job, until earlier scratch reclamation or archival.
|
||||
Permission, expired-artifact and unsupported-server errors propagate.
|
||||
|
||||
#### Parameters
|
||||
|
||||
* **profileId**: `string`
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`Record`<`string`, `unknown`>>
|
||||
|
||||
***
|
||||
|
||||
### profileStatus()
|
||||
|
||||
```ts
|
||||
profileStatus(profileId): Promise<FunctionProfile>
|
||||
```
|
||||
|
||||
Fetch capture identity and status, including retained lookup after refresh.
|
||||
Failed captures return status "failed" with the server's error reason.
|
||||
This never changes the parent job's cached state.
|
||||
|
||||
#### Parameters
|
||||
|
||||
* **profileId**: `string`
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`FunctionProfile`](../interfaces/FunctionProfile.md)>
|
||||
|
||||
***
|
||||
|
||||
### progress()
|
||||
|
||||
```ts
|
||||
@@ -204,14 +429,28 @@ its full record, then cache it for the getters above.
|
||||
|
||||
***
|
||||
|
||||
### retry()
|
||||
|
||||
```ts
|
||||
retry(): Promise<Job<T>>
|
||||
```
|
||||
|
||||
Select this exact attempt's pinned successor. Requires backend support.
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`Job`](Job.md)<`T`>>
|
||||
|
||||
***
|
||||
|
||||
### status()
|
||||
|
||||
```ts
|
||||
status(): Promise<string>
|
||||
```
|
||||
|
||||
The operation's current lifecycle state: "running", "finished", "failed",
|
||||
or "cancelled".
|
||||
The current status, usually "running", "finished", "failed", or "cancelled".
|
||||
A Function refresh waiting for execution workers reports "waiting_for_capacity".
|
||||
|
||||
A point snapshot; unlike [Job.wait](Job.md#wait) it does not block or reject on a
|
||||
terminal failure state. Also refreshes the getters above.
|
||||
@@ -222,6 +461,20 @@ terminal failure state. Also refreshes the getters above.
|
||||
|
||||
***
|
||||
|
||||
### statusTyped()
|
||||
|
||||
```ts
|
||||
statusTyped(): Promise<JobState>
|
||||
```
|
||||
|
||||
Refresh and return the detailed lifecycle state.
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`JobState`](../type-aliases/JobState.md)>
|
||||
|
||||
***
|
||||
|
||||
### toString()
|
||||
|
||||
```ts
|
||||
@@ -241,7 +494,7 @@ printing it.
|
||||
### wait()
|
||||
|
||||
```ts
|
||||
wait(progressCallback?): Promise<void>
|
||||
wait(optionsOrProgress?): Promise<T>
|
||||
```
|
||||
|
||||
Wait until the operation reaches a terminal state.
|
||||
@@ -253,10 +506,44 @@ synchronous observer: its return value is ignored and not awaited. If it
|
||||
throws, the error is logged with `console.warn` and waiting continues; a
|
||||
callback exception does not reject `wait`.
|
||||
|
||||
Pass an options object to set a client-side timeout. Expiry rejects with an
|
||||
error and stops this wait, including pending status requests and backoff.
|
||||
The operation continues; use the same handle to wait again. Registry jobs
|
||||
can also be reopened with `Connection.openJob`; query IDs cannot.
|
||||
|
||||
#### Parameters
|
||||
|
||||
* **progressCallback?**: [`JobProgressCallback`](../type-aliases/JobProgressCallback.md)
|
||||
* **optionsOrProgress?**: [`JobWaitOptions`](../interfaces/JobWaitOptions.md) \| [`JobProgressCallback`](../type-aliases/JobProgressCallback.md)
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`void`>
|
||||
`Promise`<`T`>
|
||||
|
||||
#### Example
|
||||
|
||||
```ts
|
||||
const result = await job.wait({ timeoutMs: 60_000, onProgress: console.log });
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### waitForProfile()
|
||||
|
||||
```ts
|
||||
waitForProfile(profileId, options): Promise<FunctionProfile>
|
||||
```
|
||||
|
||||
Wait for a capture with a configurable timeout and polling cadence.
|
||||
Defaults to 60 seconds with two seconds between requests. A timeout stops
|
||||
only this wait; the capture and Function refresh continue. A failed capture
|
||||
rejects with its server-reported reason. Keep its ID to wait again.
|
||||
|
||||
#### Parameters
|
||||
|
||||
* **profileId**: `string`
|
||||
|
||||
* **options**: [`FunctionProfileWaitOptions`](../interfaces/FunctionProfileWaitOptions.md) = `{}`
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`FunctionProfile`](../interfaces/FunctionProfile.md)>
|
||||
|
||||
@@ -78,8 +78,18 @@ source-version pinning. Their results leave `mode`, `rowsWritten`, and
|
||||
|
||||
* **options.full?**: `boolean`
|
||||
|
||||
* **options.gpuClass?**: `string`
|
||||
|
||||
* **options.gpuCount?**: `number`
|
||||
|
||||
* **options.sourceVersion?**: `number`
|
||||
|
||||
* **options.totalCpuMillis?**: `number`
|
||||
|
||||
* **options.totalGpuCount?**: `number`
|
||||
|
||||
* **options.totalMemoryBytes?**: `number`
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`RefreshMaterializedViewResult`](../interfaces/RefreshMaterializedViewResult.md)>
|
||||
|
||||
+335
-36
@@ -268,6 +268,38 @@ const after = await table.getRTEStats();
|
||||
|
||||
***
|
||||
|
||||
### cleanupAsync()
|
||||
|
||||
```ts
|
||||
cleanupAsync(_options?): Promise<Job<CleanupResult>>
|
||||
```
|
||||
|
||||
Submit durable remote cleanup through SQL VACUUM and return after acceptance.
|
||||
Requires table Ownership and parent Usage. Retention inherits from the table
|
||||
then deployment when omitted. Local/historical handles are unsupported.
|
||||
Before submission, disable/drain automatic cleanup and prevent other cleanup,
|
||||
tag/branch publication and restore until completion, including direct clients.
|
||||
Coordination is not enforced by the server. Cancellation cannot undo deletion
|
||||
or prove storage I/O stopped. Preview is available without deletion.
|
||||
Wait timeout leaves work running; save the ID and reopen with db.openJob().
|
||||
|
||||
#### Parameters
|
||||
|
||||
* **\_options?**: [`CleanupOptions`](../interfaces/CleanupOptions.md)
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`Job`](Job.md)<[`CleanupResult`](../interfaces/CleanupResult.md)>>
|
||||
|
||||
#### Example
|
||||
|
||||
```ts
|
||||
const job = await table.cleanupAsync({ minAgeSeconds: 604800 });
|
||||
const result = await job.wait({ timeoutMs: 600000 });
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### close()
|
||||
|
||||
```ts
|
||||
@@ -305,6 +337,40 @@ It is a no-op when no writers are cached.
|
||||
|
||||
***
|
||||
|
||||
### compactAsync()
|
||||
|
||||
```ts
|
||||
compactAsync(_options?): Promise<Job<CompactionResult>>
|
||||
```
|
||||
|
||||
Submit remote compaction and return its durable job after acceptance.
|
||||
|
||||
Uses SQL OPTIMIZE, inheriting branch and namespace from this table. Requires
|
||||
a compatible remote server and table Ownership plus parent Usage. Local and
|
||||
historical-version handles are unsupported. Existing optimize() behavior is unchanged.
|
||||
Waiting tracks the rewrite itself and returns actual row/file statistics.
|
||||
Missing result payloads are errors; older workers can omit file counts.
|
||||
Status, progress, events and cancellation reuse the generic HTTP job APIs.
|
||||
Reopen with db.openJob<CompactionResult>(job.id!). A wait timeout does not cancel work.
|
||||
|
||||
#### Parameters
|
||||
|
||||
* **\_options?**: [`CompactionOptions`](../interfaces/CompactionOptions.md)
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`Job`](Job.md)<[`CompactionResult`](../interfaces/CompactionResult.md)>>
|
||||
|
||||
#### Example
|
||||
|
||||
```ts
|
||||
const job = await table.compactAsync({ targetRowsPerFragment: 1000 });
|
||||
const result = await job.wait();
|
||||
console.log(result.rowsSucceeded, result.fragmentsRemoved);
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### compactRTE()
|
||||
|
||||
```ts
|
||||
@@ -423,7 +489,7 @@ await table.createIndex("my_float_col");
|
||||
### createIndexAsync()
|
||||
|
||||
```ts
|
||||
abstract createIndexAsync(column, options?): Promise<Job>
|
||||
abstract createIndexAsync(column, options?): Promise<Job<void>>
|
||||
```
|
||||
|
||||
Create an index, returning a handle to the indexing job.
|
||||
@@ -444,7 +510,7 @@ account for the replacement caveat described in [Table.createIndex](Table.md#cre
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`Job`](Job.md)>
|
||||
`Promise`<[`Job`](Job.md)<`void`>>
|
||||
|
||||
***
|
||||
|
||||
@@ -486,6 +552,53 @@ containing the new version number of the table
|
||||
|
||||
***
|
||||
|
||||
### delta()
|
||||
|
||||
```ts
|
||||
delta(fromVersion, toVersion?): Promise<TableDelta>
|
||||
```
|
||||
|
||||
Compare two persisted versions or same-branch tags on an Embedded table.
|
||||
|
||||
`fromVersion` is exclusive and `toVersion` is inclusive. Omitting
|
||||
`toVersion` uses the version currently visible through this handle,
|
||||
including a checked-out version. The endpoints are fixed when the delta is
|
||||
created.
|
||||
|
||||
Row readers require stable row IDs at both endpoints. Create the table with
|
||||
`storageOptions: { new_table_enable_stable_row_ids: "true" }` to enable
|
||||
them. `listTransactions()` works without stable row IDs.
|
||||
|
||||
Row readers reject ranges containing a Restore, or ranges whose transaction
|
||||
history cannot prove they are restore-free. Recompute the checkpoint with a
|
||||
full rescan and reinitialize it at the range end version.
|
||||
|
||||
LanceDB Enterprise tables reject this operation.
|
||||
|
||||
#### Parameters
|
||||
|
||||
* **fromVersion**: [`DeltaVersion`](../type-aliases/DeltaVersion.md)
|
||||
|
||||
* **toVersion?**: [`DeltaVersion`](../type-aliases/DeltaVersion.md)
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`TableDelta`](TableDelta.md)>
|
||||
|
||||
#### Example
|
||||
|
||||
```ts
|
||||
const delta = await table.delta("baseline");
|
||||
const reader = delta.insertedRows();
|
||||
console.log((await reader.schema()).fields.map((field) => field.name));
|
||||
for await (const batch of reader) {
|
||||
console.log(batch.getChild("id")?.toJSON());
|
||||
}
|
||||
console.log(await delta.listTransactions());
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### disableRTE()
|
||||
|
||||
```ts
|
||||
@@ -619,6 +732,58 @@ await table.enableRTE({
|
||||
|
||||
***
|
||||
|
||||
### explainCleanup()
|
||||
|
||||
```ts
|
||||
explainCleanup(_options?): Promise<CleanupPlan>
|
||||
```
|
||||
|
||||
Preview version deletion without creating a job. Execution re-evaluates current state.
|
||||
|
||||
#### Parameters
|
||||
|
||||
* **\_options?**: [`CleanupOptions`](../interfaces/CleanupOptions.md)
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`CleanupPlan`](../interfaces/CleanupPlan.md)>
|
||||
|
||||
***
|
||||
|
||||
### explainPrewarmData()
|
||||
|
||||
```ts
|
||||
explainPrewarmData(_options?): Promise<PrewarmDataPlan>
|
||||
```
|
||||
|
||||
Preview prewarm with the same options as [prewarmDataAsync](Table.md#prewarmdataasync), without
|
||||
submitting a warming job. Requires LanceDB Enterprise with structured SQL
|
||||
previews, table Select and database/namespace Usage. Reads metadata and
|
||||
returns the source version, readable plan, and conservative pruning summary.
|
||||
A later submission plans its own snapshot. Historical and Embedded handles
|
||||
are unsupported. Unknown measurements remain null.
|
||||
Custom table implementations can override this method; its default rejects
|
||||
with an unsupported-operation error.
|
||||
|
||||
#### Parameters
|
||||
|
||||
* **\_options?**: [`PrewarmDataOptions`](../interfaces/PrewarmDataOptions.md)
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`PrewarmDataPlan`](../interfaces/PrewarmDataPlan.md)>
|
||||
|
||||
#### Example
|
||||
|
||||
```ts
|
||||
const plan = await table.explainPrewarmData({
|
||||
columns: ["video"], filter: "quality > $minimum", parameters: {minimum: 0.7},
|
||||
});
|
||||
console.log(plan.pruning.selectedFragments);
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### fetchBlobFiles()
|
||||
|
||||
```ts
|
||||
@@ -867,6 +1032,26 @@ Resolves to `undefined` only when the RTE write path is not enabled.
|
||||
|
||||
***
|
||||
|
||||
### getTableOverrides()
|
||||
|
||||
```ts
|
||||
getTableOverrides(): Promise<Record<string, unknown>>
|
||||
```
|
||||
|
||||
Read the stored overrides for a remote Enterprise table.
|
||||
|
||||
Overrides configure background behavior such as automatic compaction,
|
||||
cleanup, and reindex execution. Keys use the server's snake_case names.
|
||||
Returns an empty object when no overrides are set. Local tables are unsupported.
|
||||
Custom table implementations inherit a default rejection unless they override
|
||||
this method.
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`Record`<`string`, `unknown`>>
|
||||
|
||||
***
|
||||
|
||||
### indexStats()
|
||||
|
||||
```ts
|
||||
@@ -1047,29 +1232,99 @@ retrying with the settings removed.
|
||||
|
||||
### prewarmData()
|
||||
|
||||
#### prewarmData(options)
|
||||
|
||||
```ts
|
||||
abstract prewarmData(columns?): Promise<void>
|
||||
abstract prewarmData(options?): Promise<void>
|
||||
```
|
||||
|
||||
Prewarm one or more columns of data in the table.
|
||||
|
||||
#### Parameters
|
||||
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. Submission uses SQL PREWARM and needs Flight
|
||||
SQL connectivity. Use [prewarmDataAsync](Table.md#prewarmdataasync) to retain the job handle.
|
||||
|
||||
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 in LanceDB Enterprise.
|
||||
|
||||
##### Parameters
|
||||
|
||||
* **options?**: [`PrewarmDataOptions`](../interfaces/PrewarmDataOptions.md)
|
||||
Columns, a metadata-pruning filter, and per-executor concurrency.
|
||||
Omitted or empty columns warm every column.
|
||||
|
||||
##### Returns
|
||||
|
||||
`Promise`<`void`>
|
||||
|
||||
##### Example
|
||||
|
||||
```ts
|
||||
await table.prewarmData({
|
||||
columns: ["payload"], filter: "quality > 0.7", concurrency: 4,
|
||||
});
|
||||
```
|
||||
|
||||
#### prewarmData(columns)
|
||||
|
||||
```ts
|
||||
abstract prewarmData(columns?): Promise<void>
|
||||
```
|
||||
|
||||
Submit data prewarm using the columns-array form and return after acceptance.
|
||||
|
||||
##### 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 in LanceDB Enterprise.
|
||||
Columns to warm; omitted or empty means every column.
|
||||
|
||||
##### Returns
|
||||
|
||||
`Promise`<`void`>
|
||||
|
||||
***
|
||||
|
||||
### prewarmDataAsync()
|
||||
|
||||
```ts
|
||||
abstract prewarmDataAsync(options?): Promise<Job<PrewarmDataResult>>
|
||||
```
|
||||
|
||||
Submit data prewarm through SQL and return its durable warming-job handle.
|
||||
|
||||
The table handle supplies the branch and namespace. Requires a compatible
|
||||
SQL PREWARM server and Flight SQL connectivity. Standard authorization
|
||||
requires table Select and database/namespace Usage. Status/wait use generic
|
||||
HTTP job APIs; events and cancellation retain their own privileges.
|
||||
No REST fallback or option-dropping retry is performed. Historical-version
|
||||
handles are unsupported; call `checkoutLatest()` first.
|
||||
|
||||
Submission returns after acceptance. Use `job.wait()` for completion, or
|
||||
save `job.id` and reopen it with `db.openJob(id)`. A timeout does not cancel
|
||||
the job. After `job.refresh()`, `job.spec.table_version` is the pinned version.
|
||||
|
||||
#### Parameters
|
||||
|
||||
* **options?**: [`PrewarmDataOptions`](../interfaces/PrewarmDataOptions.md)
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`void`>
|
||||
`Promise`<[`Job`](Job.md)<[`PrewarmDataResult`](../interfaces/PrewarmDataResult.md)>>
|
||||
|
||||
#### Example
|
||||
|
||||
```ts
|
||||
const job = await table.prewarmDataAsync({
|
||||
columns: ["video"], filter: "quality > $minimum",
|
||||
parameters: { minimum: 0.7 }, concurrency: 4,
|
||||
});
|
||||
await job.wait();
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
@@ -1200,7 +1455,7 @@ number of rows filled and the new version number of the table.
|
||||
### refreshColumnAsync()
|
||||
|
||||
```ts
|
||||
abstract refreshColumnAsync(column, options?): Promise<Job>
|
||||
abstract refreshColumnAsync(column, options?): Promise<Job<void>>
|
||||
```
|
||||
|
||||
Like [Table#refreshColumn](Table.md#refreshcolumn), but returns a handle to the refresh
|
||||
@@ -1225,26 +1480,18 @@ LanceDB Enterprise it is the server's backfill job.
|
||||
`REFRESH COLUMN ... WHERE ... WITH (...)` form: `where` narrows the rows,
|
||||
`errorPolicy`, `maxFailedFraction`, `maxFailedRows`, `rowTimeoutSeconds`
|
||||
and `initTimeoutSeconds` govern failing rows. `batchSize`, `gpuClass`,
|
||||
`maxConcurrency`, `resourceBudget`, `supervisorResources`,
|
||||
`maxConcurrency`, `totalCpuMillis`, `totalMemoryBytes`, `supervisorResources`,
|
||||
`planningWorkers` and `maxExecutorProcessesPerWorker` size registered
|
||||
Function refreshes. `retryPolicy` overrides user-code retries only when
|
||||
repeating partial work is safe; set `maxAttempts: 1` to disable retries.
|
||||
`maxConcurrency` overrides the registered default for this logical
|
||||
execution only and is a positive integer; it is not an account-wide
|
||||
quota. A `resourceBudget` requires `cpuMillis` and
|
||||
`memoryBytes`; its `gpuCount` defaults to zero for a CPU-only Function.
|
||||
`supervisorResources` and each `planningWorkers.resources` entry require
|
||||
positive `cpuMillis`, `memoryBytes` and `ephemeralStorageBytes`.
|
||||
`planningWorkers` also requires positive `maxWorkers`,
|
||||
`rowsPerWorker` and `fragmentsPerWorker`.
|
||||
The budget applies only to this explicit refresh and does not configure
|
||||
a later automatic refresh.
|
||||
`gpuCount` at the top level is the shorthand that preserves the
|
||||
deployment defaults for CPU and memory, and cannot be combined with
|
||||
`resourceBudget`. `numWorkers` applies only to expression columns; use
|
||||
`resourceBudget` for registered Functions. All are LanceDB Enterprise
|
||||
only; a LanceDB Embedded refresh rejects every option other than
|
||||
`batchSize`, `gpuClass` and `gpuCount`.
|
||||
quota. `totalCpuMillis`, `totalMemoryBytes`, and `totalGpuCount` override
|
||||
their corresponding execution-wide resource limits independently. Unset
|
||||
values inherit column defaults, then Function defaults, then deployment
|
||||
defaults. A zero GPU limit is valid for CPU-only Functions.
|
||||
`supervisorResources` and `planningWorkers.resources` are per-pod sizes.
|
||||
`numWorkers` applies only to expression columns.
|
||||
`publicationIntervalRows` opts into publishing completed Function split
|
||||
ranges once their accumulated unpublished rows reach the threshold.
|
||||
It must be a positive safe integer and requires non-Blob Function outputs.
|
||||
@@ -1253,17 +1500,15 @@ LanceDB Enterprise it is the server's backfill job.
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`Job`](Job.md)>
|
||||
`Promise`<[`Job`](Job.md)<`void`>>
|
||||
|
||||
#### Example
|
||||
|
||||
```ts
|
||||
const job = await table.refreshColumnAsync("embedding", {
|
||||
where: "published_at > '2026-01-01'",
|
||||
resourceBudget: {
|
||||
cpuMillis: 8000,
|
||||
memoryBytes: 16 * 1024 ** 3,
|
||||
},
|
||||
totalCpuMillis: 8000,
|
||||
totalMemoryBytes: 16 * 1024 ** 3,
|
||||
maxConcurrency: 4,
|
||||
publicationIntervalRows: 10000,
|
||||
errorPolicy: "skip",
|
||||
@@ -1276,6 +1521,22 @@ console.log(await job.status()); // "finished"
|
||||
|
||||
***
|
||||
|
||||
### resetTableOverrides()
|
||||
|
||||
```ts
|
||||
resetTableOverrides(): Promise<Record<string, unknown>>
|
||||
```
|
||||
|
||||
Clear a remote Enterprise table's overrides and return an empty object.
|
||||
Local tables and custom table implementations without override support reject
|
||||
this operation.
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`Record`<`string`, `unknown`>>
|
||||
|
||||
***
|
||||
|
||||
### restore()
|
||||
|
||||
```ts
|
||||
@@ -1633,6 +1894,44 @@ resolves to the new table version.
|
||||
|
||||
***
|
||||
|
||||
### updateTableOverrides()
|
||||
|
||||
```ts
|
||||
updateTableOverrides(overrides): Promise<Record<string, unknown>>
|
||||
```
|
||||
|
||||
Recursively merge overrides into a remote Enterprise table's stored overrides.
|
||||
|
||||
Fetches the current overrides, merges nested objects locally, then sends the
|
||||
complete replacement using REST PUT. Other values replace existing values;
|
||||
unrelated fields from the read snapshot are preserved. This read-modify-write
|
||||
is not atomic: concurrent edits can be overwritten, even to unrelated fields.
|
||||
Coordinate writers when concurrent edits must be preserved. An empty update
|
||||
only reads and returns the current overrides.
|
||||
|
||||
Unlike this SDK method, CLI `set` and REST PUT replace the overrides object
|
||||
without merging. Use [Table.resetTableOverrides](Table.md#resettableoverrides) to clear all overrides.
|
||||
Local tables and custom table implementations without override support reject
|
||||
this operation.
|
||||
|
||||
#### Parameters
|
||||
|
||||
* **overrides**: `Record`<`string`, `unknown`>
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`Record`<`string`, `unknown`>>
|
||||
|
||||
#### Example
|
||||
|
||||
```ts
|
||||
await table.updateTableOverrides({
|
||||
job_types: { compaction: { enabled: false } },
|
||||
});
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### vectorSearch()
|
||||
|
||||
```ts
|
||||
|
||||
@@ -0,0 +1,110 @@
|
||||
[**@lancedb/lancedb**](../README.md) • **Docs**
|
||||
|
||||
***
|
||||
|
||||
[@lancedb/lancedb](../globals.md) / TableDelta
|
||||
|
||||
# Class: TableDelta
|
||||
|
||||
A handle for reading changes between two pinned table versions.
|
||||
|
||||
Created by [Table.delta](Table.md#delta). Endpoints are fixed at creation; later writes
|
||||
or tag moves do not change this delta.
|
||||
|
||||
## Accessors
|
||||
|
||||
### beginVersion
|
||||
|
||||
```ts
|
||||
get beginVersion(): bigint
|
||||
```
|
||||
|
||||
The exclusive start version, as an exact u64 bigint.
|
||||
|
||||
#### Returns
|
||||
|
||||
`bigint`
|
||||
|
||||
***
|
||||
|
||||
### endVersion
|
||||
|
||||
```ts
|
||||
get endVersion(): bigint
|
||||
```
|
||||
|
||||
The inclusive end version, as an exact u64 bigint.
|
||||
|
||||
#### Returns
|
||||
|
||||
`bigint`
|
||||
|
||||
## Methods
|
||||
|
||||
### deletedRowIds()
|
||||
|
||||
```ts
|
||||
deletedRowIds(): TableDeltaReader
|
||||
```
|
||||
|
||||
Stream deleted row IDs. Each batch has one `_rowid: uint64` column.
|
||||
|
||||
#### Returns
|
||||
|
||||
[`TableDeltaReader`](../interfaces/TableDeltaReader.md)
|
||||
|
||||
***
|
||||
|
||||
### insertedRows()
|
||||
|
||||
```ts
|
||||
insertedRows(): TableDeltaReader
|
||||
```
|
||||
|
||||
Stream rows inserted in `(beginVersion, endVersion]`.
|
||||
|
||||
#### Returns
|
||||
|
||||
[`TableDeltaReader`](../interfaces/TableDeltaReader.md)
|
||||
|
||||
***
|
||||
|
||||
### listTransactions()
|
||||
|
||||
```ts
|
||||
listTransactions(): Promise<TableDeltaTransaction[]>
|
||||
```
|
||||
|
||||
List readable transactions committed in `(beginVersion, endVersion]`.
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`TableDeltaTransaction`](../interfaces/TableDeltaTransaction.md)[]>
|
||||
|
||||
***
|
||||
|
||||
### updatedRows()
|
||||
|
||||
```ts
|
||||
updatedRows(): TableDeltaReader
|
||||
```
|
||||
|
||||
Stream rows updated in `(beginVersion, endVersion]`.
|
||||
|
||||
#### Returns
|
||||
|
||||
[`TableDeltaReader`](../interfaces/TableDeltaReader.md)
|
||||
|
||||
***
|
||||
|
||||
### upsertedRows()
|
||||
|
||||
```ts
|
||||
upsertedRows(): TableDeltaReader
|
||||
```
|
||||
|
||||
Stream inserted and updated rows in `(beginVersion, endVersion]`.
|
||||
|
||||
#### Returns
|
||||
|
||||
[`TableDeltaReader`](../interfaces/TableDeltaReader.md)
|
||||
@@ -6,6 +6,8 @@
|
||||
|
||||
# Class: Tags
|
||||
|
||||
Tags label table versions with human-readable names.
|
||||
|
||||
## Constructors
|
||||
|
||||
### new Tags()
|
||||
@@ -23,14 +25,19 @@ new Tags(): Tags
|
||||
### create()
|
||||
|
||||
```ts
|
||||
create(tag, version): Promise<void>
|
||||
create(tag, version?): Promise<void>
|
||||
```
|
||||
|
||||
Create a tag for a table version.
|
||||
|
||||
Omit `version` to tag the version this handle currently shows,
|
||||
including a checked-out version.
|
||||
|
||||
#### Parameters
|
||||
|
||||
* **tag**: `string`
|
||||
|
||||
* **version**: `number`
|
||||
* **version?**: `null` \| `number`
|
||||
|
||||
#### Returns
|
||||
|
||||
|
||||
+23
-1
@@ -49,6 +49,7 @@
|
||||
- [Session](classes/Session.md)
|
||||
- [StaticHeaderProvider](classes/StaticHeaderProvider.md)
|
||||
- [Table](classes/Table.md)
|
||||
- [TableDelta](classes/TableDelta.md)
|
||||
- [TagContents](classes/TagContents.md)
|
||||
- [Tags](classes/Tags.md)
|
||||
- [TakeQuery](classes/TakeQuery.md)
|
||||
@@ -71,13 +72,18 @@
|
||||
- [CherryPickError](interfaces/CherryPickError.md)
|
||||
- [CherryPickPreview](interfaces/CherryPickPreview.md)
|
||||
- [CherryPickResult](interfaces/CherryPickResult.md)
|
||||
- [CleanupOptions](interfaces/CleanupOptions.md)
|
||||
- [CleanupPlan](interfaces/CleanupPlan.md)
|
||||
- [CleanupResult](interfaces/CleanupResult.md)
|
||||
- [ClientConfig](interfaces/ClientConfig.md)
|
||||
- [ColumnAlteration](interfaces/ColumnAlteration.md)
|
||||
- [ColumnOrdering](interfaces/ColumnOrdering.md)
|
||||
- [CompactionOptions](interfaces/CompactionOptions.md)
|
||||
- [CompactionResult](interfaces/CompactionResult.md)
|
||||
- [CompactionStats](interfaces/CompactionStats.md)
|
||||
- [ConnectNamespaceOptions](interfaces/ConnectNamespaceOptions.md)
|
||||
- [ConnectionOptions](interfaces/ConnectionOptions.md)
|
||||
- [CreateBranchOptions](interfaces/CreateBranchOptions.md)
|
||||
- [CreateNamespaceOptions](interfaces/CreateNamespaceOptions.md)
|
||||
- [CreateNamespaceResponse](interfaces/CreateNamespaceResponse.md)
|
||||
- [CreateTableOptions](interfaces/CreateTableOptions.md)
|
||||
@@ -103,10 +109,12 @@
|
||||
- [FunctionErrorRecord](interfaces/FunctionErrorRecord.md)
|
||||
- [FunctionErrors](interfaces/FunctionErrors.md)
|
||||
- [FunctionErrorsOptions](interfaces/FunctionErrorsOptions.md)
|
||||
- [FunctionProfile](interfaces/FunctionProfile.md)
|
||||
- [FunctionProfileOptions](interfaces/FunctionProfileOptions.md)
|
||||
- [FunctionProfileWaitOptions](interfaces/FunctionProfileWaitOptions.md)
|
||||
- [FunctionRefreshPlanningConfig](interfaces/FunctionRefreshPlanningConfig.md)
|
||||
- [FunctionRefreshPodResources](interfaces/FunctionRefreshPodResources.md)
|
||||
- [FunctionRetryPolicy](interfaces/FunctionRetryPolicy.md)
|
||||
- [FunctionWorkerResourceBudget](interfaces/FunctionWorkerResourceBudget.md)
|
||||
- [HnswPqOptions](interfaces/HnswPqOptions.md)
|
||||
- [HnswSqOptions](interfaces/HnswSqOptions.md)
|
||||
- [IndexConfig](interfaces/IndexConfig.md)
|
||||
@@ -119,6 +127,7 @@
|
||||
- [JobFailureInfo](interfaces/JobFailureInfo.md)
|
||||
- [JobInfo](interfaces/JobInfo.md)
|
||||
- [JobProgress](interfaces/JobProgress.md)
|
||||
- [JobWaitOptions](interfaces/JobWaitOptions.md)
|
||||
- [ListingOptions](interfaces/ListingOptions.md)
|
||||
- [MaterializedViewDefinition](interfaces/MaterializedViewDefinition.md)
|
||||
- [MemtableStats](interfaces/MemtableStats.md)
|
||||
@@ -128,9 +137,14 @@
|
||||
- [OpenTableOptions](interfaces/OpenTableOptions.md)
|
||||
- [OptimizeOptions](interfaces/OptimizeOptions.md)
|
||||
- [OptimizeStats](interfaces/OptimizeStats.md)
|
||||
- [PrewarmDataOptions](interfaces/PrewarmDataOptions.md)
|
||||
- [PrewarmDataPlan](interfaces/PrewarmDataPlan.md)
|
||||
- [PrewarmDataResult](interfaces/PrewarmDataResult.md)
|
||||
- [PrewarmPruningSummary](interfaces/PrewarmPruningSummary.md)
|
||||
- [QueryExecutionOptions](interfaces/QueryExecutionOptions.md)
|
||||
- [RTEStats](interfaces/RTEStats.md)
|
||||
- [RTEWriteSpec](interfaces/RTEWriteSpec.md)
|
||||
- [RTreeOptions](interfaces/RTreeOptions.md)
|
||||
- [RefreshColumnOptions](interfaces/RefreshColumnOptions.md)
|
||||
- [RefreshColumnResult](interfaces/RefreshColumnResult.md)
|
||||
- [RefreshMaterializedViewResult](interfaces/RefreshMaterializedViewResult.md)
|
||||
@@ -147,6 +161,8 @@
|
||||
- [SplitRandomOptions](interfaces/SplitRandomOptions.md)
|
||||
- [SplitSequentialOptions](interfaces/SplitSequentialOptions.md)
|
||||
- [SsTableStats](interfaces/SsTableStats.md)
|
||||
- [TableDeltaReader](interfaces/TableDeltaReader.md)
|
||||
- [TableDeltaTransaction](interfaces/TableDeltaTransaction.md)
|
||||
- [TableNamesOptions](interfaces/TableNamesOptions.md)
|
||||
- [TableShardStats](interfaces/TableShardStats.md)
|
||||
- [TableStatistics](interfaces/TableStatistics.md)
|
||||
@@ -178,13 +194,19 @@
|
||||
- [Data](type-aliases/Data.md)
|
||||
- [DataLike](type-aliases/DataLike.md)
|
||||
- [DataTypeLike](type-aliases/DataTypeLike.md)
|
||||
- [DeltaVersion](type-aliases/DeltaVersion.md)
|
||||
- [ExprLike](type-aliases/ExprLike.md)
|
||||
- [FieldLike](type-aliases/FieldLike.md)
|
||||
- [FunctionProfileKind](type-aliases/FunctionProfileKind.md)
|
||||
- [FunctionProfileStatus](type-aliases/FunctionProfileStatus.md)
|
||||
- [IntoSql](type-aliases/IntoSql.md)
|
||||
- [IntoVector](type-aliases/IntoVector.md)
|
||||
- [JobProgressCallback](type-aliases/JobProgressCallback.md)
|
||||
- [JobState](type-aliases/JobState.md)
|
||||
- [MaterializedViewSelect](type-aliases/MaterializedViewSelect.md)
|
||||
- [MultiVector](type-aliases/MultiVector.md)
|
||||
- [QueryParameterValue](type-aliases/QueryParameterValue.md)
|
||||
- [QueryParameters](type-aliases/QueryParameters.md)
|
||||
- [RecordBatchLike](type-aliases/RecordBatchLike.md)
|
||||
- [SchemaLike](type-aliases/SchemaLike.md)
|
||||
- [TableLike](type-aliases/TableLike.md)
|
||||
|
||||
@@ -38,8 +38,8 @@ preview: CherryPickPreview;
|
||||
|
||||
```ts
|
||||
status:
|
||||
| "ready"
|
||||
| "failed"
|
||||
| "ready"
|
||||
| "notImplemented"
|
||||
| "cherryPicked"
|
||||
| "unknown";
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
[**@lancedb/lancedb**](../README.md) • **Docs**
|
||||
|
||||
***
|
||||
|
||||
[@lancedb/lancedb](../globals.md) / CleanupOptions
|
||||
|
||||
# Interface: CleanupOptions
|
||||
|
||||
Per-run retention; omission inherits selected table/branch then deployment policy.
|
||||
|
||||
## Properties
|
||||
|
||||
### minAgeSeconds?
|
||||
|
||||
```ts
|
||||
optional minAgeSeconds: number;
|
||||
```
|
||||
|
||||
Minimum old-version age in seconds. Zero is explicit, not omitted.
|
||||
@@ -0,0 +1,57 @@
|
||||
[**@lancedb/lancedb**](../README.md) • **Docs**
|
||||
|
||||
***
|
||||
|
||||
[@lancedb/lancedb](../globals.md) / CleanupPlan
|
||||
|
||||
# Interface: CleanupPlan
|
||||
|
||||
Read-only deletion estimates; no job or deletion snapshot is reserved.
|
||||
|
||||
## Properties
|
||||
|
||||
### bytesToRemove
|
||||
|
||||
```ts
|
||||
bytesToRemove: number;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### cutoffMillis
|
||||
|
||||
```ts
|
||||
cutoffMillis: number;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### formatVersion
|
||||
|
||||
```ts
|
||||
formatVersion: number;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### minAgeSeconds
|
||||
|
||||
```ts
|
||||
minAgeSeconds: number;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### sourceVersion
|
||||
|
||||
```ts
|
||||
sourceVersion: number;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### versionsToRemove
|
||||
|
||||
```ts
|
||||
versionsToRemove: number;
|
||||
```
|
||||
@@ -0,0 +1,61 @@
|
||||
[**@lancedb/lancedb**](../README.md) • **Docs**
|
||||
|
||||
***
|
||||
|
||||
[@lancedb/lancedb](../globals.md) / CleanupResult
|
||||
|
||||
# Interface: CleanupResult
|
||||
|
||||
Version-deletion outcome. Best-effort auxiliary sweeps are excluded.
|
||||
|
||||
## Properties
|
||||
|
||||
### bytesRemoved
|
||||
|
||||
```ts
|
||||
bytesRemoved: null | number;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### failedDeletes
|
||||
|
||||
```ts
|
||||
failedDeletes: null | number;
|
||||
```
|
||||
|
||||
Failed object deletions, if measured. Successful removals are retained.
|
||||
|
||||
***
|
||||
|
||||
### formatVersion
|
||||
|
||||
```ts
|
||||
formatVersion: number;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### minAgeSeconds
|
||||
|
||||
```ts
|
||||
minAgeSeconds: number;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### oldVersions
|
||||
|
||||
```ts
|
||||
oldVersions: null | number;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### statisticsComplete
|
||||
|
||||
```ts
|
||||
statisticsComplete: boolean;
|
||||
```
|
||||
|
||||
False after uncertain retry/recovery; both counts are then null.
|
||||
@@ -0,0 +1,99 @@
|
||||
[**@lancedb/lancedb**](../README.md) • **Docs**
|
||||
|
||||
***
|
||||
|
||||
[@lancedb/lancedb](../globals.md) / CompactionResult
|
||||
|
||||
# Interface: CompactionResult
|
||||
|
||||
Actual committed outcome of one remote compaction job.
|
||||
|
||||
## Properties
|
||||
|
||||
### completionPercentage
|
||||
|
||||
```ts
|
||||
completionPercentage: number;
|
||||
```
|
||||
|
||||
Percentage of planned live rows committed, from 0 to 100.
|
||||
|
||||
***
|
||||
|
||||
### filesAdded
|
||||
|
||||
```ts
|
||||
filesAdded: null | number;
|
||||
```
|
||||
|
||||
Files added, including deletion files; null if an older worker omitted it.
|
||||
|
||||
***
|
||||
|
||||
### filesRemoved
|
||||
|
||||
```ts
|
||||
filesRemoved: null | number;
|
||||
```
|
||||
|
||||
Files removed, including deletion files; null if an older worker omitted it.
|
||||
|
||||
***
|
||||
|
||||
### fragmentsAdded
|
||||
|
||||
```ts
|
||||
fragmentsAdded: null | number;
|
||||
```
|
||||
|
||||
Fragments added by committed rewrites; null if an older worker omitted it.
|
||||
|
||||
***
|
||||
|
||||
### fragmentsRemoved
|
||||
|
||||
```ts
|
||||
fragmentsRemoved: null | number;
|
||||
```
|
||||
|
||||
Fragments removed by committed rewrites; null if an older worker omitted it.
|
||||
|
||||
***
|
||||
|
||||
### moreWork
|
||||
|
||||
```ts
|
||||
moreWork: boolean;
|
||||
```
|
||||
|
||||
A bounded run left eligible work for another invocation.
|
||||
|
||||
***
|
||||
|
||||
### partialCommit
|
||||
|
||||
```ts
|
||||
partialCommit: boolean;
|
||||
```
|
||||
|
||||
Some planned groups were not committed.
|
||||
|
||||
***
|
||||
|
||||
### rowsFailed
|
||||
|
||||
```ts
|
||||
rowsFailed: number;
|
||||
```
|
||||
|
||||
Planned live rows not committed by this job.
|
||||
|
||||
***
|
||||
|
||||
### rowsSucceeded
|
||||
|
||||
```ts
|
||||
rowsSucceeded: number;
|
||||
```
|
||||
|
||||
Live source rows in committed rewrite groups.
|
||||
@@ -0,0 +1,20 @@
|
||||
[**@lancedb/lancedb**](../README.md) • **Docs**
|
||||
|
||||
***
|
||||
|
||||
[@lancedb/lancedb](../globals.md) / CreateBranchOptions
|
||||
|
||||
# Interface: CreateBranchOptions
|
||||
|
||||
Options for creating a branch from a named source.
|
||||
|
||||
## Properties
|
||||
|
||||
### fromTag
|
||||
|
||||
```ts
|
||||
fromTag: string;
|
||||
```
|
||||
|
||||
Tag to fork from. The tag keeps the branch and version it points to.
|
||||
Cannot be combined with `fromRef` or `fromVersion`.
|
||||
@@ -22,11 +22,11 @@ optional activeJobId: string;
|
||||
|
||||
```ts
|
||||
optional blockedReason:
|
||||
| "cancelled"
|
||||
| "table_has_mem_wal"
|
||||
| "inputs_not_settled"
|
||||
| "dependency_in_flight"
|
||||
| "table_capacity"
|
||||
| "cancelled"
|
||||
| "preparation_backoff"
|
||||
| "failure_threshold_reached"
|
||||
| "binding_revision_missing";
|
||||
@@ -86,8 +86,8 @@ optional nextRunAtReason: string;
|
||||
|
||||
```ts
|
||||
state:
|
||||
| "running"
|
||||
| "queued"
|
||||
| "running"
|
||||
| "disabled"
|
||||
| "ready"
|
||||
| "up_to_date"
|
||||
|
||||
@@ -20,6 +20,16 @@ Fragments whose detail was capped.
|
||||
|
||||
***
|
||||
|
||||
### pageToken?
|
||||
|
||||
```ts
|
||||
optional pageToken: string;
|
||||
```
|
||||
|
||||
Continue the same job/filter. Absent for complete pages and older servers.
|
||||
|
||||
***
|
||||
|
||||
### records
|
||||
|
||||
```ts
|
||||
|
||||
@@ -37,3 +37,13 @@ optional limit: number;
|
||||
```
|
||||
|
||||
At most this many records (server default 10000, cap 100000).
|
||||
|
||||
***
|
||||
|
||||
### pageToken?
|
||||
|
||||
```ts
|
||||
optional pageToken: string;
|
||||
```
|
||||
|
||||
Empty starts retained history, including repaired rows, for an exact jobId; otherwise continue that page.
|
||||
|
||||
@@ -0,0 +1,126 @@
|
||||
[**@lancedb/lancedb**](../README.md) • **Docs**
|
||||
|
||||
***
|
||||
|
||||
[@lancedb/lancedb](../globals.md) / FunctionProfile
|
||||
|
||||
# Interface: FunctionProfile
|
||||
|
||||
A capture identity and status snapshot. Keep profileId for retained lookup
|
||||
after the Function refresh completes. Timestamp fields are epoch milliseconds.
|
||||
|
||||
## Properties
|
||||
|
||||
### artifactId
|
||||
|
||||
```ts
|
||||
readonly artifactId: null | string;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### completedAtMillis
|
||||
|
||||
```ts
|
||||
readonly completedAtMillis: null | number;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### deadlineAtMillis
|
||||
|
||||
```ts
|
||||
readonly deadlineAtMillis: number;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### durationSeconds
|
||||
|
||||
```ts
|
||||
readonly durationSeconds: number;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### error
|
||||
|
||||
```ts
|
||||
readonly error: null | string;
|
||||
```
|
||||
|
||||
The server's capture failure reason; this is not a refresh job failure.
|
||||
|
||||
***
|
||||
|
||||
### executionEpoch
|
||||
|
||||
```ts
|
||||
readonly executionEpoch: number;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### expiresAtMillis
|
||||
|
||||
```ts
|
||||
readonly expiresAtMillis: number;
|
||||
```
|
||||
|
||||
Upper retention bound; job scratch reclamation can remove artifacts sooner.
|
||||
|
||||
***
|
||||
|
||||
### jobId
|
||||
|
||||
```ts
|
||||
readonly jobId: string;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### kind
|
||||
|
||||
```ts
|
||||
readonly kind: FunctionProfileKind;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### profileId
|
||||
|
||||
```ts
|
||||
readonly profileId: string;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### requestedAtMillis
|
||||
|
||||
```ts
|
||||
readonly requestedAtMillis: number;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### sessionSlot
|
||||
|
||||
```ts
|
||||
readonly sessionSlot: number;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### status
|
||||
|
||||
```ts
|
||||
readonly status: FunctionProfileStatus;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### workerId
|
||||
|
||||
```ts
|
||||
readonly workerId: string;
|
||||
```
|
||||
@@ -0,0 +1,39 @@
|
||||
[**@lancedb/lancedb**](../README.md) • **Docs**
|
||||
|
||||
***
|
||||
|
||||
[@lancedb/lancedb](../globals.md) / FunctionProfileOptions
|
||||
|
||||
# Interface: FunctionProfileOptions
|
||||
|
||||
Options for requesting a Function worker capture.
|
||||
|
||||
## Properties
|
||||
|
||||
### durationSeconds?
|
||||
|
||||
```ts
|
||||
optional durationSeconds: number;
|
||||
```
|
||||
|
||||
1–30 seconds for CPU/memory, default 10; 1–5 for GPU, default 5.
|
||||
|
||||
***
|
||||
|
||||
### kind?
|
||||
|
||||
```ts
|
||||
optional kind: FunctionProfileKind;
|
||||
```
|
||||
|
||||
CPU samples, retained Python allocations, or PyTorch CUDA activities.
|
||||
|
||||
***
|
||||
|
||||
### sessionSlot?
|
||||
|
||||
```ts
|
||||
optional sessionSlot: number;
|
||||
```
|
||||
|
||||
Python execution session within the worker; default zero.
|
||||
@@ -0,0 +1,29 @@
|
||||
[**@lancedb/lancedb**](../README.md) • **Docs**
|
||||
|
||||
***
|
||||
|
||||
[@lancedb/lancedb](../globals.md) / FunctionProfileWaitOptions
|
||||
|
||||
# Interface: FunctionProfileWaitOptions
|
||||
|
||||
Client-side controls while waiting for a Function worker capture.
|
||||
|
||||
## Properties
|
||||
|
||||
### pollIntervalMs?
|
||||
|
||||
```ts
|
||||
optional pollIntervalMs: number;
|
||||
```
|
||||
|
||||
Delay between status requests; defaults to 2,000 ms and must be positive.
|
||||
|
||||
***
|
||||
|
||||
### timeoutMs?
|
||||
|
||||
```ts
|
||||
optional timeoutMs: number;
|
||||
```
|
||||
|
||||
Maximum wait including HTTP requests and sleeps; defaults to 60,000 ms.
|
||||
@@ -1,39 +0,0 @@
|
||||
[**@lancedb/lancedb**](../README.md) • **Docs**
|
||||
|
||||
***
|
||||
|
||||
[@lancedb/lancedb](../globals.md) / FunctionWorkerResourceBudget
|
||||
|
||||
# Interface: FunctionWorkerResourceBudget
|
||||
|
||||
Aggregate worker resources for one Enterprise Function refresh.
|
||||
|
||||
## Properties
|
||||
|
||||
### cpuMillis
|
||||
|
||||
```ts
|
||||
cpuMillis: number;
|
||||
```
|
||||
|
||||
Aggregate CPU budget in millicores; 1000 is one CPU.
|
||||
|
||||
***
|
||||
|
||||
### gpuCount?
|
||||
|
||||
```ts
|
||||
optional gpuCount: number;
|
||||
```
|
||||
|
||||
Aggregate GPU budget. Omitted means zero, a CPU-only refresh.
|
||||
|
||||
***
|
||||
|
||||
### memoryBytes
|
||||
|
||||
```ts
|
||||
memoryBytes: number;
|
||||
```
|
||||
|
||||
Aggregate memory budget in bytes.
|
||||
@@ -27,3 +27,13 @@ optional limit: number;
|
||||
```
|
||||
|
||||
Maximum event rows to return, up to the server maximum of 10,000.
|
||||
|
||||
***
|
||||
|
||||
### pageToken?
|
||||
|
||||
```ts
|
||||
optional pageToken: string;
|
||||
```
|
||||
|
||||
Opaque continuation from the preceding page's schema metadata.
|
||||
|
||||
@@ -10,6 +10,26 @@ A row from `Connection.listJobs`: one server-side job.
|
||||
|
||||
## Properties
|
||||
|
||||
### columns
|
||||
|
||||
```ts
|
||||
columns: string[];
|
||||
```
|
||||
|
||||
Affected columns; empty when unavailable or not column-scoped.
|
||||
|
||||
***
|
||||
|
||||
### completedAtMillis?
|
||||
|
||||
```ts
|
||||
optional completedAtMillis: number;
|
||||
```
|
||||
|
||||
Terminal timestamp in milliseconds since the epoch, when known.
|
||||
|
||||
***
|
||||
|
||||
### createdAtMillis
|
||||
|
||||
```ts
|
||||
@@ -20,6 +40,46 @@ When the job was created, in milliseconds since the epoch.
|
||||
|
||||
***
|
||||
|
||||
### durationMillis?
|
||||
|
||||
```ts
|
||||
optional durationMillis: number;
|
||||
```
|
||||
|
||||
Creation-to-completion wall time, including queueing and pauses.
|
||||
|
||||
***
|
||||
|
||||
### failure?
|
||||
|
||||
```ts
|
||||
optional failure: JobFailureInfo;
|
||||
```
|
||||
|
||||
Durable failure summary, when available.
|
||||
|
||||
***
|
||||
|
||||
### functionName?
|
||||
|
||||
```ts
|
||||
optional functionName: string;
|
||||
```
|
||||
|
||||
Pinned Function catalog name, with namespace segments joined by `$`.
|
||||
|
||||
***
|
||||
|
||||
### functionVersion?
|
||||
|
||||
```ts
|
||||
optional functionVersion: string;
|
||||
```
|
||||
|
||||
Pinned Function version, when known.
|
||||
|
||||
***
|
||||
|
||||
### jobId
|
||||
|
||||
```ts
|
||||
|
||||
@@ -17,6 +17,14 @@ different counters. A missing counter is unknown; it is not zero.
|
||||
|
||||
## Properties
|
||||
|
||||
### bytes\_read?
|
||||
|
||||
```ts
|
||||
optional bytes_read: null | number;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### estimated\_remaining\_time\_millis?
|
||||
|
||||
```ts
|
||||
@@ -37,6 +45,72 @@ Execution identity and sample time used for client-side ETA derivation.
|
||||
|
||||
***
|
||||
|
||||
### executors\_active?
|
||||
|
||||
```ts
|
||||
optional executors_active: null | number;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### executors\_completed?
|
||||
|
||||
```ts
|
||||
optional executors_completed: null | number;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### executors\_failed?
|
||||
|
||||
```ts
|
||||
optional executors_failed: null | number;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### executors\_partial?
|
||||
|
||||
```ts
|
||||
optional executors_partial: null | number;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### executors\_targeted?
|
||||
|
||||
```ts
|
||||
optional executors_targeted: null | number;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### fragments\_selected?
|
||||
|
||||
```ts
|
||||
optional fragments_selected: null | number;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### groups\_completed?
|
||||
|
||||
```ts
|
||||
optional groups_completed: null | number;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### groups\_planned?
|
||||
|
||||
```ts
|
||||
optional groups_planned: null | number;
|
||||
```
|
||||
|
||||
Maintenance work observations; rewritten rows are not committed rows.
|
||||
|
||||
***
|
||||
|
||||
### paused?
|
||||
|
||||
```ts
|
||||
@@ -57,6 +131,22 @@ Coarse server-derived phase, including phases from newer servers.
|
||||
|
||||
***
|
||||
|
||||
### ranges\_completed?
|
||||
|
||||
```ts
|
||||
optional ranges_completed: null | number;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### ranges\_planned?
|
||||
|
||||
```ts
|
||||
optional ranges_planned: null | number;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### rows\_computed?
|
||||
|
||||
```ts
|
||||
@@ -92,6 +182,14 @@ optional rows_remaining: null | number;
|
||||
|
||||
***
|
||||
|
||||
### rows\_rewritten?
|
||||
|
||||
```ts
|
||||
optional rows_rewritten: null | number;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### rows\_skipped?
|
||||
|
||||
```ts
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
[**@lancedb/lancedb**](../README.md) • **Docs**
|
||||
|
||||
***
|
||||
|
||||
[@lancedb/lancedb](../globals.md) / JobWaitOptions
|
||||
|
||||
# Interface: JobWaitOptions
|
||||
|
||||
Client-side controls for waiting without cancelling the underlying job.
|
||||
|
||||
## Properties
|
||||
|
||||
### onProgress?
|
||||
|
||||
```ts
|
||||
optional onProgress: JobProgressCallback;
|
||||
```
|
||||
|
||||
Observe progress using the same poller that waits for completion.
|
||||
|
||||
***
|
||||
|
||||
### timeoutMs?
|
||||
|
||||
```ts
|
||||
optional timeoutMs: number;
|
||||
```
|
||||
|
||||
Maximum wait in milliseconds, including status requests and polling backoff.
|
||||
Must be a nonnegative safe integer. Omit to wait indefinitely; zero allows
|
||||
only an immediately ready result.
|
||||
@@ -0,0 +1,49 @@
|
||||
[**@lancedb/lancedb**](../README.md) • **Docs**
|
||||
|
||||
***
|
||||
|
||||
[@lancedb/lancedb](../globals.md) / PrewarmDataOptions
|
||||
|
||||
# Interface: PrewarmDataOptions
|
||||
|
||||
Settings for data-cache prewarm submissions and metadata previews.
|
||||
|
||||
## Properties
|
||||
|
||||
### columns?
|
||||
|
||||
```ts
|
||||
optional columns: string[];
|
||||
```
|
||||
|
||||
Lance field paths to warm; omitted or empty means every column.
|
||||
|
||||
***
|
||||
|
||||
### concurrency?
|
||||
|
||||
```ts
|
||||
optional concurrency: number;
|
||||
```
|
||||
|
||||
Positive per-executor concurrency, at most 4294967295.
|
||||
|
||||
***
|
||||
|
||||
### filter?
|
||||
|
||||
```ts
|
||||
optional filter: string;
|
||||
```
|
||||
|
||||
A single SQL predicate for conservative metadata pruning.
|
||||
|
||||
***
|
||||
|
||||
### parameters?
|
||||
|
||||
```ts
|
||||
optional parameters: QueryParameters;
|
||||
```
|
||||
|
||||
Typed positional or named filter values, sent separately from SQL.
|
||||
@@ -0,0 +1,37 @@
|
||||
[**@lancedb/lancedb**](../README.md) • **Docs**
|
||||
|
||||
***
|
||||
|
||||
[@lancedb/lancedb](../globals.md) / PrewarmDataPlan
|
||||
|
||||
# Interface: PrewarmDataPlan
|
||||
|
||||
Metadata-only snapshot preview; no warming job is submitted.
|
||||
|
||||
## Properties
|
||||
|
||||
### plan
|
||||
|
||||
```ts
|
||||
plan: string;
|
||||
```
|
||||
|
||||
Readable display text. Use pruning for structured facts.
|
||||
|
||||
***
|
||||
|
||||
### pruning
|
||||
|
||||
```ts
|
||||
pruning: PrewarmPruningSummary;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### tableVersion
|
||||
|
||||
```ts
|
||||
tableVersion: number;
|
||||
```
|
||||
|
||||
Snapshot used for this preview. A later submission plans its own snapshot.
|
||||
@@ -0,0 +1,79 @@
|
||||
[**@lancedb/lancedb**](../README.md) • **Docs**
|
||||
|
||||
***
|
||||
|
||||
[@lancedb/lancedb](../globals.md) / PrewarmDataResult
|
||||
|
||||
# Interface: PrewarmDataResult
|
||||
|
||||
Reported executor work for a pinned snapshot; unavailable measurements stay null.
|
||||
|
||||
## Properties
|
||||
|
||||
### bytesRead
|
||||
|
||||
```ts
|
||||
bytesRead: null | number;
|
||||
```
|
||||
|
||||
Reported bytes read, or null when unavailable.
|
||||
|
||||
***
|
||||
|
||||
### executorsCompleted
|
||||
|
||||
```ts
|
||||
executorsCompleted: null | number;
|
||||
```
|
||||
|
||||
Executors that finished successfully or partially, or null when unavailable.
|
||||
|
||||
***
|
||||
|
||||
### executorsPartial
|
||||
|
||||
```ts
|
||||
executorsPartial: null | number;
|
||||
```
|
||||
|
||||
Subset of completed executors reporting partial warming, or null when unavailable.
|
||||
|
||||
***
|
||||
|
||||
### executorsTargeted
|
||||
|
||||
```ts
|
||||
executorsTargeted: null | number;
|
||||
```
|
||||
|
||||
Reported executors targeted, or null when unavailable.
|
||||
|
||||
***
|
||||
|
||||
### fragmentsSelected
|
||||
|
||||
```ts
|
||||
fragmentsSelected: null | number;
|
||||
```
|
||||
|
||||
Reported fragments selected, or null when unavailable.
|
||||
|
||||
***
|
||||
|
||||
### rangesCompleted
|
||||
|
||||
```ts
|
||||
rangesCompleted: null | number;
|
||||
```
|
||||
|
||||
Reported ranges completed, or null when unavailable.
|
||||
|
||||
***
|
||||
|
||||
### tableVersion
|
||||
|
||||
```ts
|
||||
tableVersion: number;
|
||||
```
|
||||
|
||||
The source snapshot captured by submission.
|
||||
@@ -0,0 +1,61 @@
|
||||
[**@lancedb/lancedb**](../README.md) • **Docs**
|
||||
|
||||
***
|
||||
|
||||
[@lancedb/lancedb](../globals.md) / PrewarmPruningSummary
|
||||
|
||||
# Interface: PrewarmPruningSummary
|
||||
|
||||
Conservative metadata proof, rather than exact matching rows.
|
||||
|
||||
## Properties
|
||||
|
||||
### fallbackReason
|
||||
|
||||
```ts
|
||||
fallbackReason: null | string;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### inputFragments
|
||||
|
||||
```ts
|
||||
inputFragments: number;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### mode
|
||||
|
||||
```ts
|
||||
mode: string;
|
||||
```
|
||||
|
||||
Server-reported proof mode; future servers may add modes.
|
||||
|
||||
***
|
||||
|
||||
### prunedFragments
|
||||
|
||||
```ts
|
||||
prunedFragments: number;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### selectedFragments
|
||||
|
||||
```ts
|
||||
selectedFragments: number;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### selectedRowRanges
|
||||
|
||||
```ts
|
||||
selectedRowRanges: null | number;
|
||||
```
|
||||
|
||||
Candidate physical intervals, or null when unknown.
|
||||
@@ -0,0 +1,21 @@
|
||||
[**@lancedb/lancedb**](../README.md) • **Docs**
|
||||
|
||||
***
|
||||
|
||||
[@lancedb/lancedb](../globals.md) / RTreeOptions
|
||||
|
||||
# Interface: RTreeOptions
|
||||
|
||||
Options to create an `RTREE` index
|
||||
|
||||
## Properties
|
||||
|
||||
### pageSize?
|
||||
|
||||
```ts
|
||||
optional pageSize: number;
|
||||
```
|
||||
|
||||
The maximum number of entries in each R-tree page.
|
||||
|
||||
Must be at least 2. The default is 4096.
|
||||
@@ -8,8 +8,7 @@
|
||||
|
||||
Options for `Table.refreshColumn` and `Table.refreshColumnAsync`. Every
|
||||
option is LanceDB Enterprise only; a LanceDB Embedded refresh ignores
|
||||
`batchSize`, `gpuClass` and `gpuCount` and rejects the rest, including
|
||||
`resourceBudget`.
|
||||
`batchSize`, `gpuClass` and `totalGpuCount` and rejects the rest.
|
||||
|
||||
## Properties
|
||||
|
||||
@@ -50,7 +49,7 @@ GPU class for Function workers.
|
||||
optional gpuCount: number;
|
||||
```
|
||||
|
||||
Positive aggregate GPU budget for Function workers.
|
||||
Positive GPU count allocated to each Function worker.
|
||||
|
||||
***
|
||||
|
||||
@@ -140,17 +139,6 @@ Requires LanceDB Enterprise with non-Blob Function outputs.
|
||||
|
||||
***
|
||||
|
||||
### resourceBudget?
|
||||
|
||||
```ts
|
||||
optional resourceBudget: FunctionWorkerResourceBudget;
|
||||
```
|
||||
|
||||
Complete aggregate CPU and memory budget for a registered Function
|
||||
refresh. `gpuCount` inside the budget defaults to zero.
|
||||
|
||||
***
|
||||
|
||||
### retryPolicy?
|
||||
|
||||
```ts
|
||||
@@ -181,6 +169,36 @@ CPU, memory, and ephemeral-storage limits for the refresh supervisor.
|
||||
|
||||
***
|
||||
|
||||
### totalCpuMillis?
|
||||
|
||||
```ts
|
||||
optional totalCpuMillis: number;
|
||||
```
|
||||
|
||||
Override the total CPU budget in millicores for this refresh.
|
||||
|
||||
***
|
||||
|
||||
### totalGpuCount?
|
||||
|
||||
```ts
|
||||
optional totalGpuCount: number;
|
||||
```
|
||||
|
||||
Nonnegative total GPU budget for Function workers.
|
||||
|
||||
***
|
||||
|
||||
### totalMemoryBytes?
|
||||
|
||||
```ts
|
||||
optional totalMemoryBytes: number;
|
||||
```
|
||||
|
||||
Override the total memory budget in bytes for this refresh.
|
||||
|
||||
***
|
||||
|
||||
### where?
|
||||
|
||||
```ts
|
||||
|
||||
@@ -0,0 +1,109 @@
|
||||
[**@lancedb/lancedb**](../README.md) • **Docs**
|
||||
|
||||
***
|
||||
|
||||
[@lancedb/lancedb](../globals.md) / TableDeltaReader
|
||||
|
||||
# Interface: TableDeltaReader
|
||||
|
||||
A streaming table-delta reader.
|
||||
|
||||
`schema()` is available before consuming the stream, including when the
|
||||
range is empty. The stream yields Arrow record batches without
|
||||
materializing the full result.
|
||||
|
||||
A reader owns one native cursor. It is single-use:
|
||||
`[Symbol.asyncIterator]()` returns the same iterator, concurrent pulls are
|
||||
serialized, and `return()` releases the native stream on early drop.
|
||||
|
||||
## Extends
|
||||
|
||||
- `AsyncIterable`<`RecordBatch`>.`AsyncIterator`<`RecordBatch`>
|
||||
|
||||
## Methods
|
||||
|
||||
### \[asyncIterator\]()
|
||||
|
||||
```ts
|
||||
asyncIterator: AsyncIterator<RecordBatch<any>, any, undefined>
|
||||
```
|
||||
|
||||
#### Returns
|
||||
|
||||
`AsyncIterator`<`RecordBatch`<`any`>, `any`, `undefined`>
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`AsyncIterable.[asyncIterator]`
|
||||
|
||||
***
|
||||
|
||||
### next()
|
||||
|
||||
```ts
|
||||
next(...args): Promise<IteratorResult<RecordBatch<any>, any>>
|
||||
```
|
||||
|
||||
#### Parameters
|
||||
|
||||
* ...**args**: [] \| [`undefined`]
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`IteratorResult`<`RecordBatch`<`any`>, `any`>>
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`AsyncIterator.next`
|
||||
|
||||
***
|
||||
|
||||
### return()?
|
||||
|
||||
```ts
|
||||
optional return(value?): Promise<IteratorResult<RecordBatch<any>, any>>
|
||||
```
|
||||
|
||||
#### Parameters
|
||||
|
||||
* **value?**: `any`
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`IteratorResult`<`RecordBatch`<`any`>, `any`>>
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`AsyncIterator.return`
|
||||
|
||||
***
|
||||
|
||||
### schema()
|
||||
|
||||
```ts
|
||||
schema(): Promise<Schema<any>>
|
||||
```
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`Schema`<`any`>>
|
||||
|
||||
***
|
||||
|
||||
### throw()?
|
||||
|
||||
```ts
|
||||
optional throw(e?): Promise<IteratorResult<RecordBatch<any>, any>>
|
||||
```
|
||||
|
||||
#### Parameters
|
||||
|
||||
* **e?**: `any`
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`IteratorResult`<`RecordBatch`<`any`>, `any`>>
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`AsyncIterator.throw`
|
||||
@@ -0,0 +1,51 @@
|
||||
[**@lancedb/lancedb**](../README.md) • **Docs**
|
||||
|
||||
***
|
||||
|
||||
[@lancedb/lancedb](../globals.md) / TableDeltaTransaction
|
||||
|
||||
# Interface: TableDeltaTransaction
|
||||
|
||||
A committed transaction in a table delta range.
|
||||
|
||||
## Properties
|
||||
|
||||
### operation
|
||||
|
||||
```ts
|
||||
operation: string;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### readVersion
|
||||
|
||||
```ts
|
||||
readVersion: bigint;
|
||||
```
|
||||
|
||||
The version the transaction was based on. Exact u64 value.
|
||||
|
||||
***
|
||||
|
||||
### tag?
|
||||
|
||||
```ts
|
||||
optional tag: string;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### transactionProperties?
|
||||
|
||||
```ts
|
||||
optional transactionProperties: Record<string, string>;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### uuid
|
||||
|
||||
```ts
|
||||
uuid: string;
|
||||
```
|
||||
@@ -0,0 +1,17 @@
|
||||
[**@lancedb/lancedb**](../README.md) • **Docs**
|
||||
|
||||
***
|
||||
|
||||
[@lancedb/lancedb](../globals.md) / DeltaVersion
|
||||
|
||||
# Type Alias: DeltaVersion
|
||||
|
||||
```ts
|
||||
type DeltaVersion: number | bigint | string;
|
||||
```
|
||||
|
||||
One endpoint of a table delta: a positive version number/bigint or a tag on
|
||||
the table handle's current branch.
|
||||
|
||||
Use a `bigint` when the version may exceed `Number.MAX_SAFE_INTEGER`.
|
||||
Strings are always tags.
|
||||
@@ -0,0 +1,13 @@
|
||||
[**@lancedb/lancedb**](../README.md) • **Docs**
|
||||
|
||||
***
|
||||
|
||||
[@lancedb/lancedb](../globals.md) / FunctionProfileKind
|
||||
|
||||
# Type Alias: FunctionProfileKind
|
||||
|
||||
```ts
|
||||
type FunctionProfileKind: "cpu" | "gpu" | "memory";
|
||||
```
|
||||
|
||||
Evidence collected from one Function worker's Python execution session.
|
||||
@@ -0,0 +1,13 @@
|
||||
[**@lancedb/lancedb**](../README.md) • **Docs**
|
||||
|
||||
***
|
||||
|
||||
[@lancedb/lancedb](../globals.md) / FunctionProfileStatus
|
||||
|
||||
# Type Alias: FunctionProfileStatus
|
||||
|
||||
```ts
|
||||
type FunctionProfileStatus: "pending" | "capturing" | "complete" | "failed";
|
||||
```
|
||||
|
||||
A capture's lifecycle, independent of its parent refresh job.
|
||||
@@ -0,0 +1,21 @@
|
||||
[**@lancedb/lancedb**](../README.md) • **Docs**
|
||||
|
||||
***
|
||||
|
||||
[@lancedb/lancedb](../globals.md) / JobState
|
||||
|
||||
# Type Alias: JobState
|
||||
|
||||
```ts
|
||||
type JobState:
|
||||
| "created"
|
||||
| "queued"
|
||||
| "in_progress"
|
||||
| "succeeded"
|
||||
| "failed"
|
||||
| "canceled"
|
||||
| "timed_out"
|
||||
| string & object;
|
||||
```
|
||||
|
||||
Detailed lifecycle state. Unrecognized future values remain strings.
|
||||
@@ -0,0 +1,20 @@
|
||||
[**@lancedb/lancedb**](../README.md) • **Docs**
|
||||
|
||||
***
|
||||
|
||||
[@lancedb/lancedb](../globals.md) / QueryParameterValue
|
||||
|
||||
# Type Alias: QueryParameterValue
|
||||
|
||||
```ts
|
||||
type QueryParameterValue:
|
||||
| string
|
||||
| number
|
||||
| bigint
|
||||
| boolean
|
||||
| Date
|
||||
| Uint8Array
|
||||
| null;
|
||||
```
|
||||
|
||||
Scalar SQL values. Use a one-row Arrow table for explicit Arrow types.
|
||||
@@ -0,0 +1,16 @@
|
||||
[**@lancedb/lancedb**](../README.md) • **Docs**
|
||||
|
||||
***
|
||||
|
||||
[@lancedb/lancedb](../globals.md) / QueryParameters
|
||||
|
||||
# Type Alias: QueryParameters
|
||||
|
||||
```ts
|
||||
type QueryParameters: readonly QueryParameterValue[] | Readonly<Record<string, QueryParameterValue>> | TableLike | RecordBatchLike;
|
||||
```
|
||||
|
||||
Values for `$1`/`$name` placeholders, sent separately from SQL text.
|
||||
Arrays bind by position; objects bind by name. Arrow columns bind both ways.
|
||||
Safe integers and bigint use Int64; fractional numbers use Float64.
|
||||
Arrow input preserves explicit types.
|
||||
+201
-18
@@ -37,6 +37,14 @@ embedding_functions`. Prefer keyword arguments for optional parameters.
|
||||
|
||||
::: lancedb.db.DBConnection
|
||||
|
||||
Embedded connections support `location=` on `open_table` to open a table from an
|
||||
explicit dataset URI instead of the derived `<database>/<name>.lance` path:
|
||||
|
||||
```python
|
||||
db = lancedb.connect("./data")
|
||||
table = db.open_table("events", location="./datasets/events.lance")
|
||||
```
|
||||
|
||||
Use `db.server_info()` (or `await db.server_info()` on an asynchronous connection)
|
||||
to include the responding server's release, Git revision, build date and Function
|
||||
runtime information in a bug report. It returns a JSON-compatible dictionary and
|
||||
@@ -298,7 +306,8 @@ call or return a polling continuation that the SDK follows automatically.
|
||||
This behavior is the same with and without parameters. Open the reader directly;
|
||||
a directly streamed query needs its reader to make progress. Dropping an unread
|
||||
handle or its reader stops direct streaming. Deferred execution continues until
|
||||
explicitly cancelled.
|
||||
explicitly cancelled by default; use `cancel_on_drop=True` to attempt cancellation
|
||||
when its unread handle or reader is dropped.
|
||||
|
||||
For example:
|
||||
|
||||
@@ -352,6 +361,26 @@ reader = db.execute_query(
|
||||
# await query.cancel()
|
||||
```
|
||||
|
||||
Set `timeout` to bound submission and result consumption together, including
|
||||
any time before opening a reader. Set `read_timeout` to limit each server read.
|
||||
Both accept `datetime.timedelta` and apply to one execution. An expired timeout
|
||||
or failed result read stops reading and attempts to cancel Flight execution.
|
||||
Cancellation on drop requires the submitting runtime to remain alive. Durable
|
||||
server-side jobs require explicit `db.cancel_job(query.job_id)`.
|
||||
|
||||
```python
|
||||
from datetime import timedelta
|
||||
|
||||
query = db.execute_query_async(
|
||||
"SELECT * FROM events",
|
||||
timeout=timedelta(seconds=30),
|
||||
read_timeout=timedelta(seconds=5),
|
||||
cancel_on_drop=True,
|
||||
)
|
||||
# To stop this execution explicitly:
|
||||
query.cancel()
|
||||
```
|
||||
|
||||
## Namespaces (Synchronous)
|
||||
|
||||
A namespace-backed connection resolves tables through a
|
||||
@@ -420,6 +449,8 @@ code that used the former LanceDB Enterprise-only argument order.
|
||||
|
||||
::: lancedb.table.Branches
|
||||
|
||||
::: lancedb.table.TableDelta
|
||||
|
||||
::: lancedb.RTEWriteSpec
|
||||
|
||||
## Functions and Jobs
|
||||
@@ -442,6 +473,53 @@ identifiers. `fn.image` has a concise representation; `describe()` exposes Pytho
|
||||
and CUDA requirements without inspecting Pydantic internals. Platforms, base image
|
||||
and size are `None` until the service reports them. The full image descriptor and
|
||||
canonical JSON remain available.
|
||||
Jobs retain an attempt identity through `job_id()`, and explicit server retries
|
||||
report `operation_id()`, `attempt()`, and `retry_of()` when the server supports
|
||||
them.
|
||||
`lifecycle_state()` and `status_typed()` expose detailed `JobState` values while
|
||||
the existing string `status()` remains available. Unknown future states retain
|
||||
their value and never imply success. `source_table_version()` identifies the
|
||||
attempt's pinned input snapshot when reported.
|
||||
|
||||
```python
|
||||
from datetime import timedelta
|
||||
from lancedb import JobState
|
||||
|
||||
job = db.open_job(job_id)
|
||||
state = job.status_typed()
|
||||
if state is JobState.SUCCEEDED:
|
||||
print(job.operation_id(), job.attempt(), job.source_table_version())
|
||||
job.wait(timeout=timedelta(seconds=5))
|
||||
for page in job.history(limit=1000):
|
||||
print(page)
|
||||
```
|
||||
|
||||
A wait timeout leaves execution running and the handle reusable. Cancellation
|
||||
can be refused when publication has already acquired its commit claim; inspect
|
||||
the job again to learn that attempt's outcome. LanceDB Embedded handles have a
|
||||
stable identity for their lifetime and share typed lifecycle and wait semantics;
|
||||
their IDs cannot be reopened after a process restart. Event history, durable
|
||||
retries, and per-row Function errors require a backend that records them.
|
||||
|
||||
Explicit retries name the exact failed attempt and preserve its resolved
|
||||
Function version and source snapshot. Repeating `job.retry()` selects the same
|
||||
successor; call `retry()` on that successor to request another attempt. Safely
|
||||
retryable states and publication outcomes are validated by the backend.
|
||||
|
||||
```python
|
||||
retry = failed_job.retry()
|
||||
retry.refresh()
|
||||
attempt_job_id = retry.job_id()
|
||||
token = ""
|
||||
while token is not None:
|
||||
errors = table.function_errors(job_id=attempt_job_id, limit=1000, page_token=token)
|
||||
print(errors.records, errors.fragments)
|
||||
token = errors.page_token
|
||||
```
|
||||
|
||||
An empty error page can still carry a continuation. Keep the table, branch,
|
||||
job, and column filters unchanged while paging. Diagnose a terminal attempt for
|
||||
its complete retained row errors; an executing attempt is a partial observation.
|
||||
|
||||
A `@function` definition is also a local callable. Call a decorated function
|
||||
directly with row inputs, or call a decorated class with its initialization fields
|
||||
@@ -449,7 +527,9 @@ and then call the returned instance; call `close()` if the class defines it. Thi
|
||||
path uses the current Python environment and does not create a registered
|
||||
`FunctionVersion`, build the declared remote runtime, resolve Secrets, or execute
|
||||
the remote Arrow adapter. A registered `FunctionVersion` call instead binds
|
||||
`col(...)` inputs and returns a remote `FunctionApplication`.
|
||||
`col(...)` inputs and returns a remote `FunctionApplication`. Passing an `Expr`
|
||||
such as `col("value")` to a definition raises `TypeError` before the callable
|
||||
runs; bind it on the registered `FunctionVersion` instead.
|
||||
|
||||
```python
|
||||
from lancedb import function
|
||||
@@ -481,19 +561,41 @@ scaler.close()
|
||||
### Function packaging restrictions
|
||||
|
||||
The decorator snapshots the Function's source and referenced globals into a new
|
||||
module. It conservatively rejects imports of `sys`, `builtins`, `importlib`,
|
||||
`inspect`, `gc`, `ctypes`, and `types`, including submodules such as `ctypes.util`
|
||||
and `importlib.metadata`. This applies to imports inside function or class bodies
|
||||
and references to module-level aliases. Even ordinary uses such as `sys.version`
|
||||
and `ctypes.util.find_library` are blocked: these modules can reach names outside
|
||||
the reconstructed Function namespace. References to `globals`, `locals`, `vars`,
|
||||
`eval`, `exec`, `compile`, and `__import__` are rejected as dynamic namespace access.
|
||||
These restrictions also apply to the deprecated `@udf` alias.
|
||||
module. It supports three statically recognizable diagnostic operations:
|
||||
`sys.stderr`, `sys.version_info`, and `importlib.metadata.version`. Direct
|
||||
imports, `from` imports, and aliases are treated the same way, whether the
|
||||
import appears inside a function or class body or at module level.
|
||||
|
||||
For legitimate uses, move the code into an importable helper module and ship it
|
||||
with `code=`, or install its package with `pip=` or `conda=`. Imported helpers keep
|
||||
their own namespace; the packager does not scan their bodies. Helpers defined in
|
||||
`__main__` are copied by source and have the same restrictions as the Function.
|
||||
Other imports of `sys`, `builtins`, `importlib`, `inspect`, `gc`, `ctypes`, and
|
||||
`types`, including submodules such as `ctypes.util` and `importlib.resources`,
|
||||
remain blocked. This applies to imports inside function or class bodies and
|
||||
references to module-level aliases. Even ordinary uses such as `sys.version`
|
||||
and `ctypes.util.find_library` are blocked: these modules can reach names
|
||||
outside the reconstructed Function namespace. References to `globals`, `locals`,
|
||||
`vars`, `eval`, `exec`, `compile`, and `__import__` are rejected as dynamic
|
||||
namespace access. These restrictions also apply to the deprecated `@udf` alias.
|
||||
|
||||
For example, a diagnostic Function can report its Python version and NumPy
|
||||
version without a helper module:
|
||||
|
||||
```python
|
||||
import importlib.metadata
|
||||
import sys
|
||||
|
||||
from lancedb import function
|
||||
|
||||
|
||||
@function(pip=["numpy"])
|
||||
def report(value: int) -> str:
|
||||
print("diagnostic", file=sys.stderr)
|
||||
return f"numpy {importlib.metadata.version('numpy')} on {sys.version_info}"
|
||||
```
|
||||
|
||||
For other restricted uses, move the code into an importable helper module and
|
||||
ship it with `code=`, or install its package with `pip=` or `conda=`. Imported
|
||||
helpers keep their own namespace; the packager does not scan their bodies.
|
||||
Helpers defined in `__main__` are copied by source and have the same
|
||||
restrictions as the Function.
|
||||
|
||||
For example, put this helper in `native_diagnostics/__init__.py`:
|
||||
|
||||
@@ -640,7 +742,15 @@ with BlobReader(read_range, len(payload)) as reader:
|
||||
|
||||
::: lancedb.functions.RefreshColumnResult
|
||||
|
||||
::: lancedb.FunctionErrors
|
||||
::: lancedb.functions.FunctionErrorGroup
|
||||
|
||||
::: lancedb.functions.FunctionProvenance
|
||||
|
||||
::: lancedb.functions.FunctionValueProvenance
|
||||
|
||||
::: lancedb.functions.AsyncFunctionErrors
|
||||
|
||||
::: lancedb.functions.FunctionErrors
|
||||
|
||||
::: lancedb.FunctionErrorRecord
|
||||
|
||||
@@ -656,6 +766,8 @@ with BlobReader(read_range, len(payload)) as reader:
|
||||
|
||||
::: lancedb.job.Job
|
||||
|
||||
::: lancedb.job.JobState
|
||||
|
||||
::: lancedb.job.AsyncJob
|
||||
|
||||
::: lancedb.job.JobInfo
|
||||
@@ -664,6 +776,12 @@ with BlobReader(read_range, len(payload)) as reader:
|
||||
|
||||
::: lancedb.job.JobFailureInfo
|
||||
|
||||
::: lancedb.profiling.FunctionProfile
|
||||
|
||||
::: lancedb.profiling.FunctionProfileKind
|
||||
|
||||
::: lancedb.profiling.FunctionProfileStatus
|
||||
|
||||
::: lancedb.sql.Query
|
||||
|
||||
::: lancedb.sql.AsyncQuery
|
||||
@@ -763,6 +881,8 @@ of raw SQL strings with [where][lancedb.query.LanceQueryBuilder.where] and
|
||||
|
||||
::: lancedb.query.Query
|
||||
|
||||
::: lancedb.query.ColumnOrdering
|
||||
|
||||
::: lancedb.query.LanceQueryBuilder
|
||||
|
||||
::: lancedb.query.LanceVectorQueryBuilder
|
||||
@@ -873,6 +993,18 @@ with `search().with_row_id(True).to_arrow()` and pass the result to the fetch AP
|
||||
One missing or deleted row ID rejects the entire blob-read batch; the APIs do
|
||||
not return partial results.
|
||||
|
||||
Row positions are not row IDs. To read by position, call
|
||||
`take_offsets(offsets, with_row_id=True)` first and pass the resulting `_rowid`
|
||||
values; `fetch_blobs` remains row-ID based. A query result table that carries
|
||||
snapshot metadata keeps the snapshot that produced it on LanceDB Enterprise, so
|
||||
the fetched bytes or files stay pinned if the table changes. Metadata-free
|
||||
inputs, including legacy query responses and plain row-ID lists, are read from
|
||||
the table handle's current snapshot; keep the source unchanged between selection
|
||||
and fetching. Partial snapshot metadata fails explicitly. For `fetch_blob_files`,
|
||||
a snapshot-bound read also fails explicitly when the serving node cannot echo
|
||||
the immutable identity. The basic remote Blob API floor (server 0.5.0) does not
|
||||
by itself provide that echo capability.
|
||||
|
||||
Local and remote `BlobFile` handles prefetch 512 KiB for sequential reads by
|
||||
default. Pass `buffer_size=0` to `fetch_blob_files`, `open_blob_file`, or
|
||||
`open_blob_files` for sparse reads, or choose another window size in bytes.
|
||||
@@ -906,9 +1038,42 @@ PyArrow's `RecordBatch.from_pylist(..., schema=...)` cannot convert raw bytes
|
||||
into the blob extension type; use `blob_array` and `RecordBatch.from_arrays`
|
||||
when constructing batches explicitly.
|
||||
|
||||
For external blob references, construct the descriptor struct described by
|
||||
[blob][lancedb.schema.blob], then wrap it with `pa.ExtensionArray.from_storage`.
|
||||
Inline `data` and external `uri` representations are mutually exclusive.
|
||||
For external blob references, use [blob_uri_array][lancedb.blob_uri_array]. It builds the
|
||||
same extension type from URI strings and optional `(position, size)` byte
|
||||
ranges without requiring pylance. Inline `data` and external `uri` representations
|
||||
are mutually exclusive.
|
||||
|
||||
Register the object prefix with [BasePath][lancedb.BasePath] on
|
||||
`create_table(..., initial_bases=[...])` to store a matched absolute blob URI
|
||||
relative to a base and to scope credentials with `base_<id>.<option>` storage
|
||||
options. A create with data stays a single atomic request; without a matching
|
||||
base, pass `allow_external_blob_outside_bases=True` to keep the absolute URI
|
||||
instead. That opt-in still expects a valid absolute URI and applies to one
|
||||
write; a later `add()` needs its own opt-in. When registering several bases,
|
||||
supply distinct explicit non-zero IDs: the pinned Lance release can collide
|
||||
when automatic and explicit IDs are mixed, leaving a listed but unopenable name
|
||||
after a failed create; retrying with distinct explicit IDs succeeds.
|
||||
|
||||
```python
|
||||
from lancedb import BasePath, blob, blob_uri_array
|
||||
|
||||
schema = pa.schema(
|
||||
[
|
||||
pa.field("id", pa.int64()),
|
||||
blob("video").with_metadata({"lancedb:logical_type": "mp4"}),
|
||||
]
|
||||
)
|
||||
videos = blob_uri_array(
|
||||
["s3://bucket/clip-0.mp4", "s3://bucket/clip-1.mp4"],
|
||||
positions=[0, 0],
|
||||
sizes=[1 << 20, 1 << 20],
|
||||
)
|
||||
db.create_table(
|
||||
"videos",
|
||||
data=pa.RecordBatch.from_arrays([pa.array([0, 1]), videos], schema=schema),
|
||||
initial_bases=[BasePath("s3://bucket")],
|
||||
)
|
||||
```
|
||||
|
||||
LanceDB Enterprise SQL returns blob bytes by default. Select `blob_descriptor(video)` to
|
||||
return an openable reference instead, then use
|
||||
@@ -970,6 +1135,10 @@ so the fetch APIs cannot read their bytes yet.
|
||||
|
||||
::: lancedb.schema.blob_array
|
||||
|
||||
::: lancedb.blob_uri_array
|
||||
|
||||
::: lancedb.BasePath
|
||||
|
||||
::: lancedb._blob.BlobFile
|
||||
options:
|
||||
show_root_full_path: false
|
||||
@@ -1226,6 +1395,8 @@ Table hold your actual data as a collection of records / rows.
|
||||
|
||||
::: lancedb.table.AsyncBranches
|
||||
|
||||
::: lancedb.table.AsyncTableDelta
|
||||
|
||||
## Materialized Views (Asynchronous)
|
||||
|
||||
::: lancedb.materialized_view.AsyncMaterializedView
|
||||
@@ -1486,3 +1657,15 @@ that accepts `python_bundle.resources`.
|
||||
|
||||
Caches, hidden paths, symlinks and unsafe paths are excluded. Use `pip=` or
|
||||
`conda=` for platform-specific dependencies and `models=` for large model snapshots.
|
||||
|
||||
::: lancedb.compaction.CompactionResult
|
||||
|
||||
::: lancedb.cleanup.CleanupPlan
|
||||
|
||||
::: lancedb.cleanup.CleanupResult
|
||||
|
||||
::: lancedb.prewarm.PrewarmDataResult
|
||||
|
||||
::: lancedb.prewarm.PrewarmDataPlan
|
||||
|
||||
::: lancedb.prewarm.PrewarmPruningSummary
|
||||
|
||||
@@ -0,0 +1,149 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-FileCopyrightText: Copyright The LanceDB Authors
|
||||
|
||||
|
||||
def test_photo_tutorial(tmp_path, monkeypatch):
|
||||
monkeypatch.chdir(tmp_path)
|
||||
# --8<-- [start:photo_files]
|
||||
import struct
|
||||
import zlib
|
||||
from pathlib import Path
|
||||
|
||||
def solid_png(rgb):
|
||||
def chunk(kind, data):
|
||||
checksum = zlib.crc32(kind + data) & 0xFFFFFFFF
|
||||
return (
|
||||
struct.pack(">I", len(data)) + kind + data + struct.pack(">I", checksum)
|
||||
)
|
||||
|
||||
header = struct.pack(">IIBBBBB", 8, 8, 8, 2, 0, 0, 0)
|
||||
pixels = (b"\x00" + bytes(rgb) * 8) * 8
|
||||
return (
|
||||
b"\x89PNG\r\n\x1a\n"
|
||||
+ chunk(b"IHDR", header)
|
||||
+ chunk(b"IDAT", zlib.compress(pixels))
|
||||
+ chunk(b"IEND", b"")
|
||||
)
|
||||
|
||||
inputs = Path("photo-inputs")
|
||||
inputs.mkdir()
|
||||
for label, rgb in [("red", (255, 0, 0)), ("blue", (0, 0, 255))]:
|
||||
(inputs / f"{label}.png").write_bytes(solid_png(rgb))
|
||||
# --8<-- [end:photo_files]
|
||||
|
||||
# --8<-- [start:photo_connect_embedded]
|
||||
import lancedb
|
||||
|
||||
db = lancedb.connect("./photo-db")
|
||||
# --8<-- [end:photo_connect_embedded]
|
||||
|
||||
# --8<-- [start:photo_ingest]
|
||||
import pyarrow as pa
|
||||
|
||||
schema = pa.schema(
|
||||
[
|
||||
pa.field("id", pa.int64(), nullable=False),
|
||||
pa.field("label", pa.string(), nullable=False),
|
||||
lancedb.blob("image", nullable=False),
|
||||
],
|
||||
metadata={"lance.blob.managed": "false"},
|
||||
)
|
||||
photos = db.create_table("photos", schema=schema)
|
||||
photos.add(
|
||||
[
|
||||
{"id": 1, "label": "red", "image": (inputs / "red.png").read_bytes()},
|
||||
{"id": 2, "label": "blue", "image": (inputs / "blue.png").read_bytes()},
|
||||
]
|
||||
)
|
||||
assert photos.count_rows() == 2
|
||||
# --8<-- [end:photo_ingest]
|
||||
|
||||
# --8<-- [start:photo_fetch]
|
||||
hits = (
|
||||
photos.search()
|
||||
.where("label = 'red'")
|
||||
.select(["id", "label"])
|
||||
.with_row_id(True)
|
||||
.limit(10)
|
||||
.to_list()
|
||||
)
|
||||
assert [row["id"] for row in hits] == [1]
|
||||
payloads = photos.fetch_blobs("image", [row["_rowid"] for row in hits]).to_pylist()
|
||||
assert payloads == [(inputs / "red.png").read_bytes()]
|
||||
saved = Path("selected-red.png")
|
||||
saved.write_bytes(payloads[0])
|
||||
assert saved.read_bytes() == (inputs / "red.png").read_bytes()
|
||||
# --8<-- [end:photo_fetch]
|
||||
|
||||
# --8<-- [start:photo_bytes]
|
||||
rows = (
|
||||
photos.search()
|
||||
.where("label = 'red'")
|
||||
.select(["id", "image"])
|
||||
.limit(10)
|
||||
.to_list(blob_mode="bytes")
|
||||
)
|
||||
assert rows == [{"id": 1, "image": (inputs / "red.png").read_bytes()}]
|
||||
# --8<-- [end:photo_bytes]
|
||||
|
||||
# --8<-- [start:photo_ranges]
|
||||
with photos.fetch_blob_files("image", [hits[0]["_rowid"]])[0] as reader:
|
||||
assert reader.read_range(0, 8) == b"\x89PNG\r\n\x1a\n"
|
||||
# --8<-- [end:photo_ranges]
|
||||
|
||||
# --8<-- [start:photo_copy_embedded]
|
||||
selected = (
|
||||
photos.search()
|
||||
.where("label = 'red'")
|
||||
.select(["id", "label", "image"])
|
||||
.limit(10)
|
||||
.to_arrow(blob_mode="bytes")
|
||||
)
|
||||
db.create_table("photo_subset", data=selected, schema=schema)
|
||||
# --8<-- [end:photo_copy_embedded]
|
||||
|
||||
# --8<-- [start:photo_verify]
|
||||
photo_subset = db.open_table("photo_subset")
|
||||
assert photo_subset.count_rows() == 1
|
||||
copied = (
|
||||
photo_subset.search()
|
||||
.select(["id", "label"])
|
||||
.with_row_id(True)
|
||||
.limit(10)
|
||||
.to_list()
|
||||
)
|
||||
assert [(row["id"], row["label"]) for row in copied] == [(1, "red")]
|
||||
copied_bytes = photo_subset.fetch_blobs(
|
||||
"image", [row["_rowid"] for row in copied]
|
||||
).to_pylist()
|
||||
assert copied_bytes == [(inputs / "red.png").read_bytes()]
|
||||
# --8<-- [end:photo_verify]
|
||||
|
||||
|
||||
def enterprise_connection():
|
||||
# --8<-- [start:photo_connect_enterprise]
|
||||
import os
|
||||
|
||||
import lancedb
|
||||
|
||||
db = lancedb.connect(
|
||||
os.environ["LANCEDB_URI"],
|
||||
api_key=os.environ["LANCEDB_API_KEY"],
|
||||
region=os.environ["LANCEDB_REGION"],
|
||||
host_override=os.environ["LANCEDB_HOST_OVERRIDE"],
|
||||
sql_host_override=os.environ["LANCEDB_SQL_HOST_OVERRIDE"],
|
||||
)
|
||||
# --8<-- [end:photo_connect_enterprise]
|
||||
return db
|
||||
|
||||
|
||||
def copy_with_enterprise_sql(db):
|
||||
# --8<-- [start:photo_copy_sql]
|
||||
db.execute_query(
|
||||
"CREATE TABLE photo_subset (id BIGINT, label VARCHAR, image BLOB)"
|
||||
).read_all()
|
||||
db.execute_query(
|
||||
"INSERT INTO photo_subset (id, label, image) "
|
||||
"SELECT id, label, image FROM photos WHERE label = 'red'"
|
||||
).read_all()
|
||||
# --8<-- [end:photo_copy_sql]
|
||||
+467
-405
File diff suppressed because it is too large
Load Diff
@@ -10,7 +10,7 @@
|
||||
"node": ">=22.6.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@lancedb/lancedb": "0.41.0-beta.8",
|
||||
"@lancedb/lancedb": "0.42.0-beta.20",
|
||||
"apache-arrow": "21.2.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -561,6 +561,83 @@ def test_scalar_index_uuid(tmp_db):
|
||||
assert len(result) == n + len(new_users)
|
||||
|
||||
|
||||
def test_scalar_index_rtree(tmp_db):
|
||||
db = tmp_db
|
||||
|
||||
# --8<-- [start:scalar_index_rtree_data]
|
||||
import pyarrow as pa
|
||||
|
||||
point = pa.struct([("x", pa.float64()), ("y", pa.float64())])
|
||||
schema = pa.schema(
|
||||
[
|
||||
pa.field("name", pa.string()),
|
||||
pa.field(
|
||||
"location", point, metadata={"ARROW:extension:name": "geoarrow.point"}
|
||||
),
|
||||
pa.field("vector", pa.list_(pa.float32(), 2)),
|
||||
]
|
||||
)
|
||||
places = [
|
||||
("Ferry Building", -122.3937, 37.7955, [0.7, 0.3]),
|
||||
("Golden Gate Park", -122.4862, 37.7694, [0.1, 0.9]),
|
||||
("Oakland Museum", -122.2638, 37.7987, [1.0, 0.05]),
|
||||
]
|
||||
data = pa.Table.from_pylist(
|
||||
[
|
||||
{"name": name, "location": {"x": x, "y": y}, "vector": vector}
|
||||
for name, x, y, vector in places
|
||||
],
|
||||
schema=schema,
|
||||
)
|
||||
table = db.create_table("places", data)
|
||||
# --8<-- [end:scalar_index_rtree_data]
|
||||
|
||||
# --8<-- [start:scalar_index_rtree_create]
|
||||
from lancedb.index import RTree
|
||||
|
||||
table.create_index("location", config=RTree())
|
||||
# --8<-- [end:scalar_index_rtree_create]
|
||||
|
||||
# --8<-- [start:scalar_index_rtree_filter]
|
||||
san_francisco = (
|
||||
"ST_GeomFromText('POLYGON ((-122.52 37.70, -122.35 37.70, "
|
||||
"-122.35 37.83, -122.52 37.83, -122.52 37.70))')"
|
||||
)
|
||||
in_san_francisco = f"ST_Within(location, {san_francisco})"
|
||||
|
||||
places_in_sf = table.search().where(in_san_francisco).select(["name"]).to_list()
|
||||
# [{'name': 'Ferry Building'}, {'name': 'Golden Gate Park'}]
|
||||
# --8<-- [end:scalar_index_rtree_filter]
|
||||
|
||||
assert sorted(row["name"] for row in places_in_sf) == [
|
||||
"Ferry Building",
|
||||
"Golden Gate Park",
|
||||
]
|
||||
|
||||
# --8<-- [start:scalar_index_rtree_vector]
|
||||
# The nearest place overall is in Oakland; the spatial prefilter keeps the
|
||||
# search inside San Francisco.
|
||||
nearest_in_sf = (
|
||||
table.search([1.0, 0.0])
|
||||
.where(in_san_francisco)
|
||||
.select(["name", "_distance"])
|
||||
.limit(1)
|
||||
.to_list()
|
||||
)
|
||||
# [{'name': 'Ferry Building', '_distance': 0.18}]
|
||||
# --8<-- [end:scalar_index_rtree_vector]
|
||||
|
||||
assert nearest_in_sf[0]["name"] == "Ferry Building"
|
||||
assert nearest_in_sf[0]["_distance"] == pytest.approx(0.18, abs=1e-6)
|
||||
nearest = table.search([1.0, 0.0]).select(["name", "_distance"]).limit(1)
|
||||
assert nearest.to_list()[0]["name"] == "Oakland Museum"
|
||||
|
||||
# --8<-- [start:scalar_index_rtree_explain]
|
||||
plan = table.search().where(in_san_francisco).explain_plan(verbose=True)
|
||||
assert "ScalarIndexQuery" in plan
|
||||
# --8<-- [end:scalar_index_rtree_explain]
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_scalar_index_nested_fields(mem_db_async):
|
||||
db = mem_db_async
|
||||
|
||||
@@ -350,9 +350,9 @@ def test_quickstart_derived_feature(db_path_factory):
|
||||
flatten_stats(table)
|
||||
|
||||
# --8<-- [start:quickstart_add_feature]
|
||||
from lancedb import col, udf
|
||||
from lancedb import col, function
|
||||
|
||||
@udf
|
||||
@function
|
||||
def quality_score(
|
||||
motion: float, sharpness: float, exposure: float, framing: float
|
||||
) -> float:
|
||||
@@ -385,9 +385,9 @@ def test_quickstart_derived_feature_on_a_deployment(deployment):
|
||||
table = create_frames(deployment)
|
||||
flatten_stats(table)
|
||||
|
||||
from lancedb import col, udf
|
||||
from lancedb import col, function
|
||||
|
||||
@udf
|
||||
@function
|
||||
def quality_score(
|
||||
motion: float, sharpness: float, exposure: float, framing: float
|
||||
) -> float:
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-FileCopyrightText: Copyright The LanceDB Authors
|
||||
|
||||
|
||||
def test_versioning_checkpoint_delta(tmp_db):
|
||||
db = tmp_db
|
||||
|
||||
# --8<-- [start:versioning_checkpoint_delta]
|
||||
table = db.create_table(
|
||||
"checkpoint_delta_example",
|
||||
[
|
||||
{"id": 1, "author": "Richard", "quote": "Wubba Lubba Dub Dub!"},
|
||||
{"id": 2, "author": "Morty", "quote": "Rick, what's going on?"},
|
||||
],
|
||||
storage_options={"new_table_enable_stable_row_ids": "true"},
|
||||
mode="overwrite",
|
||||
)
|
||||
table.tags.create("baseline", table.version)
|
||||
table.add([{"id": 3, "author": "Summer", "quote": "Whatever, Grandpa"}])
|
||||
table.update(where="id = 2", values={"quote": "Aww geez, Rick!"})
|
||||
table.delete("id = 1")
|
||||
|
||||
delta = table.delta("baseline")
|
||||
print("inserted:", delta.inserted_rows().read_all()["id"].to_pylist())
|
||||
print("updated:", delta.updated_rows().read_all()["id"].to_pylist())
|
||||
print("deleted:", delta.deleted_row_ids().read_all()["_rowid"].to_pylist())
|
||||
print(
|
||||
"transactions:",
|
||||
[transaction["operation"] for transaction in delta.list_transactions()],
|
||||
)
|
||||
# --8<-- [end:versioning_checkpoint_delta]
|
||||
|
||||
assert table.version == 4
|
||||
assert delta.inserted_rows().read_all()["id"].to_pylist() == [3]
|
||||
assert delta.updated_rows().read_all()["id"].to_pylist() == [2]
|
||||
assert delta.deleted_row_ids().read_all().num_rows == 1
|
||||
assert [transaction["operation"] for transaction in delta.list_transactions()] == [
|
||||
"Append",
|
||||
"Update",
|
||||
"Delete",
|
||||
]
|
||||
@@ -1328,7 +1328,8 @@ def test_versioning_tags(tmp_db):
|
||||
# --8<-- [start:versioning_tags]
|
||||
# Create a tag pointing at a specific version
|
||||
table.tags.create("baseline", 1)
|
||||
table.tags.create("with-edits", table.version)
|
||||
# Omit version to tag the version this handle currently shows.
|
||||
table.tags.create("with-edits")
|
||||
|
||||
# List all tags on this table
|
||||
print(table.tags.list())
|
||||
@@ -1343,6 +1344,9 @@ def test_versioning_tags(tmp_db):
|
||||
table.checkout("baseline")
|
||||
print(table.version)
|
||||
|
||||
# A checked-out handle tags the older version it shows, not the latest.
|
||||
table.tags.create("baseline-checkout")
|
||||
|
||||
# Delete a tag (does not delete the underlying version)
|
||||
table.tags.delete("with-edits")
|
||||
|
||||
@@ -1350,6 +1354,7 @@ def test_versioning_tags(tmp_db):
|
||||
table.checkout_latest()
|
||||
# --8<-- [end:versioning_tags]
|
||||
assert table.version == 3
|
||||
assert table.tags.get_version("baseline-checkout") == 2
|
||||
assert "baseline" in table.tags.list()
|
||||
assert "with-edits" not in table.tags.list()
|
||||
|
||||
@@ -1387,8 +1392,15 @@ def test_branches(tmp_db):
|
||||
# Fork an isolated, writable branch from main's latest version.
|
||||
# `create` returns a table handle scoped to the new branch.
|
||||
branch = table.branches.create("exp")
|
||||
|
||||
# Fork from a tag. `from_tag` is keyword-only and cannot be combined with
|
||||
# `from_ref` or `from_version`.
|
||||
table.tags.create("baseline", 1)
|
||||
tag_branch = table.branches.create("exp-from-tag", from_tag="baseline")
|
||||
# --8<-- [end:branch_create]
|
||||
|
||||
assert tag_branch.count_rows() == 3
|
||||
|
||||
# --8<-- [start:branch_write]
|
||||
# Writes land on the branch handle only; main is left untouched.
|
||||
branch.add([{"id": 4, "author": "Lancelot", "quote": "For the realm!"}])
|
||||
@@ -1414,6 +1426,8 @@ def test_branches(tmp_db):
|
||||
|
||||
assert table.count_rows() == 3
|
||||
assert "exp" not in table.branches.list()
|
||||
assert "exp-from-tag" in table.branches.list()
|
||||
table.branches.delete("exp-from-tag")
|
||||
|
||||
# Setup: a branch with row results that we want to apply to main.
|
||||
candidate = table.branches.create("candidate")
|
||||
|
||||
Generated
+2
-2
@@ -3679,9 +3679,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "libsais-rs"
|
||||
version = "0.2.0"
|
||||
version = "0.2.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "40fe164dbd47ea0c20e78a121c980ef673326905f1d4fba55e3645a20ef6717f"
|
||||
checksum = "ec55b7be74ed721889b8bc62d53e6a032d2b3b9bb60a4942b45b1e8362e64583"
|
||||
dependencies = [
|
||||
"rayon",
|
||||
]
|
||||
|
||||
@@ -1379,17 +1379,27 @@ async fn main() {
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
// --8<-- [start:branch_create]
|
||||
use lancedb::table::Ref;
|
||||
|
||||
// --8<-- [start:branch_create]
|
||||
// Fork an isolated, writable branch from main's latest version.
|
||||
// `create_branch` returns a table handle scoped to the new branch.
|
||||
let branch = branches_table
|
||||
.create_branch("exp", Ref::Version(None, None))
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
// Fork from a tag. A tag keeps its branch and version.
|
||||
let mut tags = branches_table.tags().await.unwrap();
|
||||
tags.create("baseline", 1).await.unwrap();
|
||||
let tag_branch = branches_table
|
||||
.create_branch("exp-from-tag", Ref::Tag("baseline".to_string()))
|
||||
.await
|
||||
.unwrap();
|
||||
// --8<-- [end:branch_create]
|
||||
|
||||
assert_eq!(tag_branch.count_rows(None).await.unwrap(), 3);
|
||||
|
||||
// --8<-- [start:branch_write]
|
||||
// Writes land on the branch handle only; main is left untouched.
|
||||
branch
|
||||
@@ -1428,6 +1438,14 @@ async fn main() {
|
||||
|
||||
assert_eq!(branches_table.count_rows(None).await.unwrap(), 3);
|
||||
assert!(!branches_table.list_branches().await.unwrap().contains_key("exp"));
|
||||
assert!(
|
||||
branches_table
|
||||
.list_branches()
|
||||
.await
|
||||
.unwrap()
|
||||
.contains_key("exp-from-tag")
|
||||
);
|
||||
branches_table.delete_branch("exp-from-tag").await.unwrap();
|
||||
|
||||
// Setup: a branch with row results that we want to apply to main.
|
||||
let candidate = branches_table
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-FileCopyrightText: Copyright The LanceDB Authors
|
||||
|
||||
import type { Connection } from "@lancedb/lancedb";
|
||||
|
||||
/**
|
||||
* Draft checkpoint-delta example for the Versioning guide.
|
||||
*
|
||||
* This file is snippet source only. The published documentation test package is
|
||||
* pinned to an older npm release, so it is not part of the Jest test glob.
|
||||
*/
|
||||
export async function versioningCheckpointDeltaExample(
|
||||
db: Connection,
|
||||
): Promise<void> {
|
||||
// --8<-- [start:versioning_checkpoint_delta]
|
||||
const table = await db.createTable(
|
||||
"checkpoint_delta_example",
|
||||
[
|
||||
{ id: 1, author: "Richard", quote: "Wubba Lubba Dub Dub!" },
|
||||
{ id: 2, author: "Morty", quote: "Rick, what's going on?" },
|
||||
],
|
||||
{
|
||||
mode: "overwrite",
|
||||
storageOptions: { new_table_enable_stable_row_ids: "true" },
|
||||
},
|
||||
);
|
||||
const tags = await table.tags();
|
||||
await tags.create("baseline", await table.version());
|
||||
await table.add([
|
||||
{ id: 3, author: "Summer", quote: "Whatever, Grandpa" },
|
||||
]);
|
||||
await table.update({
|
||||
where: "id = 2",
|
||||
values: { quote: "Aww geez, Rick!" },
|
||||
});
|
||||
await table.delete("id = 1");
|
||||
|
||||
const delta = await table.delta("baseline");
|
||||
console.log(delta.beginVersion, delta.endVersion);
|
||||
|
||||
const inserted = delta.insertedRows();
|
||||
console.log((await inserted.schema()).fields.map((field) => field.name));
|
||||
for await (const batch of inserted) {
|
||||
console.log("inserted:", batch.getChild("id")?.toJSON());
|
||||
}
|
||||
|
||||
const updated = delta.updatedRows();
|
||||
for await (const batch of updated) {
|
||||
console.log("updated:", batch.getChild("id")?.toJSON());
|
||||
}
|
||||
|
||||
const deleted = delta.deletedRowIds();
|
||||
for await (const batch of deleted) {
|
||||
console.log("deleted row ids:", batch.getChild("_rowid")?.toJSON());
|
||||
}
|
||||
|
||||
console.log(
|
||||
"transactions:",
|
||||
(await delta.listTransactions()).map(
|
||||
(transaction) => transaction.operation,
|
||||
),
|
||||
);
|
||||
// --8<-- [end:versioning_checkpoint_delta]
|
||||
}
|
||||
@@ -1,4 +1,3 @@
|
||||
tools/cli.mdx
|
||||
# Branching is Beta; not documented until early access. tables/branching.mdx
|
||||
# stays reachable (out of the nav only): SDK error messages link to it.
|
||||
# To restore: docs.json Tutorials > Feature Engineering, after tutorials/feature-engineering/materialized-views.
|
||||
|
||||
@@ -19,7 +19,7 @@ file format, so moving data from one edition to the other does not require a dat
|
||||
| **Mode** | Single process | Distributed fleet | LanceDB Embedded runs on one host, so scale is limited to what it can provide. Enterprise spreads work across nodes, adds capacity by adding nodes, and keeps serving even if one node fails. |
|
||||
| **Query serving** | Uses the resources of your application process | Adds independently scaled query compute | Size the Enterprise cluster for your workload and latency target. See the expected-performance sections on [vector search](/search/vector-search#expected-performance) and [full-text search](/search/full-text-search#expected-performance) for representative measurements. |
|
||||
| **Cache** | In-process index and metadata caches | Adds a distributed NVMe data cache | LanceDB Embedded caches indexes and metadata in your application's memory. Enterprise also keeps hot table data near compute on NVMe and avoids repeated S3 calls -- see the [Data Page Cache](/enterprise/data-page-cache). |
|
||||
| **Indexing & compaction** | Manual | Platform-managed workflows | LanceDB Embedded requires application-managed maintenance; Enterprise schedules it in the background. See [Indexing in LanceDB](/indexing/). |
|
||||
| **Indexing & compaction** | Manual | Platform-managed workflows and explicit compaction | LanceDB Embedded requires application-managed maintenance; Enterprise schedules it in the background. See [Indexing in LanceDB](/indexing/). |
|
||||
| **Data format** | Lance | Lance | Both use the same open table format. Plan catalog registration, access and transfer when moving existing data. |
|
||||
| **Deployment** | Embedded in your code | BYOC or Managed | Enterprise adds deployment operations and support for shared workloads. |
|
||||
| **SQL analytics** | Not available | Arrow Flight SQL | Enterprise runs joins, grouping, sampling and [curation](/curation) over SQL. See [SQL reference](/sql). |
|
||||
@@ -33,7 +33,7 @@ file format, so moving data from one edition to the other does not require a dat
|
||||
| **Data Ingestion** | [Insert data](/ingestion/insert) | ✅ | ✅ |
|
||||
| | [RTE Write (Upsert)](/ingestion/realtime-write) | ✅ | ✅ |
|
||||
| | [Distributed RTE Write](/enterprise/distributed-real-time-write) | ❌ | ✅ |
|
||||
| | [Attach Database](/ingestion/migrate-from-embedded) | ❌ | ✅ |
|
||||
| | [Attach Database](/ingestion/attach-database) | ❌ | ✅ |
|
||||
| | [Import Datasets](/ingestion/import) | ❌ | ✅ |
|
||||
| | [Distributed Write](/enterprise/distributed-write) | ❌ | ✅ |
|
||||
| **Search** | [Vector search](/search/vector-search) | ✅ | ✅ |
|
||||
@@ -137,15 +137,26 @@ Instead, materialize results through query/search builders, for example
|
||||
|
||||
### 4\. Maintenance lifecycle {#4-maintenance-lifecycle}
|
||||
|
||||
In LanceDB Embedded, you run maintenance yourself: `optimize()` compacts data files, adds new rows to
|
||||
existing indexes, and removes old table versions. In Enterprise, the cluster runs this work -- along with
|
||||
async write and reindexing workflows -- as background jobs, and the SDK's maintenance calls do not trigger
|
||||
it. On an Enterprise table, the synchronous Python `optimize()`, `compact_files()`, and
|
||||
`cleanup_old_versions()` only emit a warning, and the asynchronous Python, TypeScript, and Rust clients
|
||||
reject `optimize()` as not supported.
|
||||
In LanceDB Embedded, `optimize()` compacts data files, adds new rows to existing
|
||||
indexes, and removes old table versions. LanceDB Enterprise schedules that work
|
||||
through separate background jobs and also accepts explicit compaction requests
|
||||
with compatible releases.
|
||||
|
||||
That means maintenance is managed by platform behavior and cluster configuration, not by explicit
|
||||
per-table maintenance calls in your application code.
|
||||
Python sync/async `compact_async()`, TypeScript `compactAsync()`, and Rust
|
||||
`Table::compact_async(CompactionOverrides)` return durable compaction job handles;
|
||||
waiting returns the committed rewrite statistics. Legacy remote `optimize()`
|
||||
and Rust `Table::compact()` return after submission with placeholder counts.
|
||||
Remote optimize does not prune versions or optimize indexes;
|
||||
explicit requests for those unsupported operations are rejected. The synchronous
|
||||
Python `compact_files()` and `cleanup_old_versions()` helpers remain warning-only
|
||||
no-ops in LanceDB Enterprise.
|
||||
|
||||
Manual compaction accepts four invocation options and inherits omitted fields
|
||||
from the selected branch's table tuning, then deployment/built-in defaults.
|
||||
Automatic-compaction enablement gates background scheduling while explicit
|
||||
manual jobs can still run. See
|
||||
[manual Enterprise compaction](/maintenance/compaction#enterprise-manual-compaction)
|
||||
for CLI, SQL, and SDK examples and rollout requirements.
|
||||
|
||||
### 5\. Guardrails and limits {#5-guardrails-and-limits}
|
||||
|
||||
|
||||
+509
-39
@@ -26,52 +26,90 @@ the method returns.
|
||||
<CodeGroup>
|
||||
```python Python icon="python"
|
||||
job = tbl.create_index_async("vector", replace=True)
|
||||
job.checkout_latest()
|
||||
|
||||
print(job.id)
|
||||
print(job.job_type)
|
||||
print(job.status())
|
||||
print(job.id())
|
||||
print(job.job_type())
|
||||
print(job.state())
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
## Cached properties and live calls {#snapshots}
|
||||
## Cached reads and live calls {#snapshots}
|
||||
|
||||
Python job properties describe the last observation; reading them does not
|
||||
contact the server. Submission need not fetch the full registry record, so
|
||||
some properties can initially be `None`.
|
||||
Python job handles expose data through methods. The cached read methods return
|
||||
the last observation without contacting the server. Submission need not fetch
|
||||
the full registry record, so some read methods can initially return `None`.
|
||||
|
||||
Call `job.checkout_latest()` to update the handle's cached lifecycle state and
|
||||
complete registry record together. This updates the values returned by
|
||||
`state()`, `job_type()`, `creation_ms()`, `spec()`, `result()`, and `failure()`
|
||||
from one server observation.
|
||||
It updates the existing handle in place, returns `None`, and does not wait for
|
||||
the job to finish or restart it. For SQL-backed or in-process jobs, it updates
|
||||
the lifecycle state without registry details.
|
||||
|
||||
| Surface | Contract |
|
||||
| --- | --- |
|
||||
| `state` | Last observed lifecycle state. It does not update on its own. |
|
||||
| `job_type`, `creation_ms` | Cached job kind and creation time in epoch milliseconds. |
|
||||
| `spec` | Complete, job-specific submitted specification. Read this separately from the bounded `repr(job)` display. |
|
||||
| `result` | Cached, job-specific reported data; it is not necessarily the typed object returned by `wait()`. |
|
||||
| `failure` | Cached `JobFailureInfo`, when the server reports a terminal failure. |
|
||||
| `id()` | Opaque operation ID, when available. |
|
||||
| `state()` | Last observed lifecycle state. It does not update on its own. |
|
||||
| `job_type()`, `creation_ms()` | Cached job kind and creation time in epoch milliseconds. |
|
||||
| `spec()` | Complete, job-specific submitted specification. Read this separately from the bounded `repr(job)` display. |
|
||||
| `result()` | Cached, job-specific reported data; it is not necessarily the typed object returned by `wait()`. |
|
||||
| `failure()` | Cached `JobFailureInfo`, when the server reports a terminal failure. |
|
||||
| `checkout_latest()` | Fetch and cache the latest lifecycle state and complete registry record together. Failed and cancelled states are cached without raising a job-failure exception; request errors can still raise. |
|
||||
| `status()` | Live lifecycle request. For registry jobs it also caches the full record. A failed state is returned without raising a job-failure exception; request errors can still raise. |
|
||||
| `refresh()` | Fetch and cache the current record without waiting for completion. |
|
||||
| `events(...)` | Separate live request returning a `pyarrow.Table` of recorded events; it does not refresh the properties. |
|
||||
| `refresh()` | Existing method with the same cache-update behavior as `checkout_latest()`. |
|
||||
| `events(...)` | Separate live request returning a `pyarrow.Table` of recorded events; it does not refresh the cached record. |
|
||||
| `wait(...)` | Poll until completion and return the operation's typed result, or raise on failure/cancellation. Refresh afterward when you need the complete final registry record. |
|
||||
|
||||
`status()`, `refresh()`, and `events(...)` remain available. Read `job.state()`
|
||||
after `checkout_latest()` to poll using the same snapshot as `result()` and
|
||||
`failure()`. Event history is a separate live request through `events(...)`
|
||||
and does not refresh the cached record.
|
||||
|
||||
<Note>
|
||||
These examples require a Python SDK release with `checkout_latest()` and the
|
||||
method-based read accessors. Cached reads such as `job.state()` and
|
||||
`job.result()` are synchronous on both `Job` and `AsyncJob`. Async handles use
|
||||
`await job.checkout_latest()` or `await job.refresh()` for the live update.
|
||||
</Note>
|
||||
|
||||
For example, poll a registry handle and then retrieve its final details:
|
||||
|
||||
```python
|
||||
<CodeGroup>
|
||||
```python Synchronous icon="python"
|
||||
import time
|
||||
|
||||
state = job.status()
|
||||
while state == "running":
|
||||
print(job.state)
|
||||
job.checkout_latest()
|
||||
while job.state() == "running":
|
||||
print(job.state(), job.failure())
|
||||
time.sleep(2)
|
||||
state = job.status()
|
||||
job.checkout_latest()
|
||||
|
||||
result = job.wait()
|
||||
job.refresh()
|
||||
job.checkout_latest()
|
||||
print(result)
|
||||
print(job.spec)
|
||||
print(job.spec())
|
||||
```
|
||||
```python Asynchronous icon="python"
|
||||
import asyncio
|
||||
|
||||
The four lifecycle strings below are the usual SDK contract; newer server
|
||||
states may pass through an older client. Do not infer execution progress from
|
||||
`state` alone. Structured progress methods and queue fields require matching
|
||||
SDK/server support; see [refresh admission](/feature-engineering/refresh-column#admission).
|
||||
await job.checkout_latest()
|
||||
while job.state() == "running":
|
||||
print(job.state(), job.failure())
|
||||
await asyncio.sleep(2)
|
||||
await job.checkout_latest()
|
||||
|
||||
result = await job.wait()
|
||||
await job.checkout_latest()
|
||||
print(result, job.spec())
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
`job.state()` reports the last observed lifecycle state, usually `running`,
|
||||
`finished`, `failed`, or `cancelled`. Newer server states may pass through an
|
||||
older client. For execution progress and queue details, use `job.progress()`
|
||||
with a supporting SDK and server. See [refresh admission](/feature-engineering/refresh-column#admission).
|
||||
|
||||
## Submit and wait for a job {#waiting}
|
||||
|
||||
@@ -82,11 +120,12 @@ SDK/server support; see [refresh admission](/feature-engineering/refresh-column#
|
||||
result. If it failed or was cancelled, inspect the failure details and any
|
||||
results it committed before stopping.
|
||||
|
||||
In Python, `job.status()` returns the current state:
|
||||
In Python, `job.status()` reports the current status.
|
||||
|
||||
| State | Meaning |
|
||||
| Status | Meaning |
|
||||
| --- | --- |
|
||||
| `running` | The operation is in progress. |
|
||||
| `waiting_for_capacity` | An Enterprise Function refresh is waiting for execution workers. This status is nonterminal. It returns to `running` when execution resumes. |
|
||||
| `finished` | The operation completed successfully. |
|
||||
| `failed` | The operation failed. |
|
||||
| `cancelled` | The operation was cancelled. |
|
||||
@@ -95,7 +134,7 @@ In Python, `job.status()` returns the current state:
|
||||
It returns `failed` or `cancelled` for unsuccessful jobs.
|
||||
|
||||
Use `job.wait()` to wait for completion and raise if the job fails or is
|
||||
cancelled. Both `Job.wait()` and `AsyncJob.wait()` retry transient connection
|
||||
cancelled. Python's `Job.wait()` and `AsyncJob.wait()` retry transient connection
|
||||
and read errors with capped
|
||||
exponential backoff within the caller's timeout. Without a timeout, retries
|
||||
continue indefinitely.
|
||||
@@ -110,12 +149,12 @@ from datetime import timedelta
|
||||
from lancedb.exceptions import JobFailedError, JobCancelledError
|
||||
|
||||
job = tbl.create_index_async("vector", replace=True)
|
||||
job_id = job.id # Save the ID to reopen an Enterprise registry job later.
|
||||
job_id = job.id() # Save the ID to reopen an Enterprise registry job later.
|
||||
|
||||
try:
|
||||
result = job.wait(timeout=timedelta(minutes=10))
|
||||
except JobFailedError:
|
||||
print(f"job failed: {job.failure}")
|
||||
print(f"job failed: {job.failure()}")
|
||||
except JobCancelledError:
|
||||
print("job was cancelled")
|
||||
except ConnectionError as exc:
|
||||
@@ -123,8 +162,33 @@ except ConnectionError as exc:
|
||||
except TimeoutError:
|
||||
print(f"still running: {job.status()}")
|
||||
```
|
||||
```typescript TypeScript
|
||||
const result = await job.wait({
|
||||
timeoutMs: 600_000,
|
||||
onProgress: progress => console.log(progress),
|
||||
});
|
||||
```
|
||||
```rust Rust
|
||||
use std::time::Duration;
|
||||
use lancedb::job::JobWaitOptions;
|
||||
|
||||
let result = job.wait_with_options(
|
||||
JobWaitOptions::new()
|
||||
.timeout(Duration::from_secs(600))
|
||||
.progress(|description| println!("{}", description.progress_snapshot())),
|
||||
).await?;
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
TypeScript's `timeoutMs` and Rust's `JobWaitOptions::timeout` bound the existing
|
||||
wait poller, including pending status requests and retry/polling delays.
|
||||
Expiry rejects the TypeScript promise or returns Rust's `Error::Timeout`;
|
||||
the operation is not cancelled. Calling `wait()` without options still waits
|
||||
indefinitely. TypeScript's existing `wait(callback)` and Rust's
|
||||
`wait_with_progress(callback)` remain available. A zero timeout only permits
|
||||
an immediately ready result. TypeScript timeouts use nonnegative safe-integer
|
||||
milliseconds; Rust uses `std::time::Duration`.
|
||||
|
||||
After connectivity returns, reopen an Enterprise registry job by its saved ID
|
||||
and continue waiting on the existing operation:
|
||||
|
||||
@@ -154,8 +218,8 @@ work. Treat the ID as an opaque identifier and pass it unchanged to the jobs API
|
||||
<CodeGroup>
|
||||
```python Python icon="python"
|
||||
job = db.open_job(job_id) # raises JobNotFoundError if unknown
|
||||
job.refresh() # pull the latest status from the server
|
||||
print(job.status())
|
||||
job.checkout_latest()
|
||||
print(job.state(), job.result(), job.failure())
|
||||
|
||||
events = job.events(limit=100)
|
||||
print(events.to_pylist())
|
||||
@@ -180,6 +244,90 @@ listing. It is a lazy iterator: iteration performs requests and can raise
|
||||
request errors. Use `list(db.list_jobs(...))` to collect all remaining results;
|
||||
there is no `.to_list()` method.
|
||||
|
||||
{/* Draft for the SDK and Enterprise releases that provide job listing metadata.
|
||||
|
||||
With a server and SDK that provide listing metadata, `JobInfo` also exposes
|
||||
`columns`, `function_name`, `function_version`, `completed_at_millis`,
|
||||
`duration_millis`, and `failure`. Function names include their namespace, joined
|
||||
by `$`, and the version is pinned to the computed column refresh. Duration is
|
||||
creation-to-completion wall time, including queueing and pauses; running jobs
|
||||
have no completed duration. Unknown scalar values and failure summaries stay
|
||||
absent (`None` in Python/Rust, `undefined` in TypeScript), and unavailable or
|
||||
non-column-scoped `columns` are empty. A zero duration is a measured value.
|
||||
Failure summaries include phase, message, and retryability; open the job for
|
||||
full diagnostics.
|
||||
|
||||
<CodeGroup>
|
||||
```python Python icon="python"
|
||||
latest = next(
|
||||
(
|
||||
info
|
||||
for info in db.list_jobs(table="events", job_type="function_refresh")
|
||||
if "embedding" in info.columns
|
||||
),
|
||||
None,
|
||||
)
|
||||
if latest is not None:
|
||||
print(latest.function_name, latest.function_version, latest.duration_millis)
|
||||
if latest.failure is not None:
|
||||
print(latest.failure.message)
|
||||
```
|
||||
|
||||
```rust Rust icon="rust"
|
||||
use futures::TryStreamExt;
|
||||
use lancedb::{database::JobListFilter, listing::ListingOptions, Connection, Result};
|
||||
|
||||
async fn print_latest_refresh(db: &Connection) -> Result<()> {
|
||||
let mut filter = JobListFilter::default();
|
||||
filter.table = Some("events".into());
|
||||
filter.job_types = vec!["function_refresh".into()];
|
||||
let mut jobs = db.list_jobs_filtered(filter, ListingOptions::default());
|
||||
while let Some(info) = jobs.try_next().await? {
|
||||
if info.columns.iter().any(|column| column == "embedding") {
|
||||
println!(
|
||||
"{:?} {:?} {:?}",
|
||||
info.function_name, info.function_version, info.duration_millis
|
||||
);
|
||||
if let Some(failure) = info.failure {
|
||||
println!("{:?}", failure.message);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
```
|
||||
|
||||
```typescript TypeScript icon="js"
|
||||
for await (const info of db.listJobs({ pageLimit: 50 })) {
|
||||
if (
|
||||
info.jobType === "function_refresh" &&
|
||||
info.table === "events" &&
|
||||
info.columns.includes("embedding")
|
||||
) {
|
||||
console.log(info.functionName, info.functionVersion, info.durationMillis);
|
||||
if (info.failure !== undefined) {
|
||||
console.log(info.failure.message);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
Python and Rust support server-side table filtering. TypeScript `listJobs`
|
||||
currently accepts only pagination options, so its example filters rows on the
|
||||
client and may read more pages. The displayed table name has no namespace;
|
||||
use a table name unique within the listed database for this TypeScript example.
|
||||
Use Python, Rust, or SQL for an exact namespaced table listing.
|
||||
|
||||
SQL `SHOW JOBS EXTENDED` and `SHOW JOBS EXTENDED FOR TABLE events` expose the
|
||||
same metadata. Plain `SHOW JOBS` keeps its existing result columns.
|
||||
The extended result returns `columns` as a list and `failure` as nullable JSON
|
||||
text.
|
||||
|
||||
*/}
|
||||
|
||||
<Note>
|
||||
Job filters and synchronous `Listing` indexing, slicing, and `len()` require
|
||||
a Python SDK release that includes these APIs. Older SDKs expose only
|
||||
@@ -238,8 +386,8 @@ For a Function refresh, `wait()` returns a `RefreshColumnResult` such as
|
||||
`rows_assigned`, `rows_failed`, `rows_remaining`, `source_version` and optional
|
||||
`published_version`. Other job types have different results. Do not parse the
|
||||
printed representation to recover a spec, result or progress measurement.
|
||||
For object-shaped registry data, `job.spec` and `job.result` are decoded Python
|
||||
dictionaries: access fields with keys, such as `job.result.get("summary")`
|
||||
For object-shaped registry data, `job.spec()` and `job.result()` are decoded Python
|
||||
dictionaries: access fields with keys, such as `job.result().get("summary")`
|
||||
after refreshing a successful Function job. The separate typed object from
|
||||
`wait()` uses attributes, such as `result.rows_assigned`.
|
||||
|
||||
@@ -251,6 +399,184 @@ history.
|
||||
Draft for the Functions release. Add this section before "Embedded and
|
||||
Enterprise execution":
|
||||
|
||||
### Typed states and attempt identity
|
||||
|
||||
The existing identity and string status APIs keep their behavior. For a detailed
|
||||
state, use Python's `status_typed()`, TypeScript's `statusTyped()`, or Rust's
|
||||
`status_typed()`. Known states are `created`, `queued`, `in_progress`,
|
||||
`succeeded`, `failed`, `canceled`, and `timed_out`. Unknown future states retain
|
||||
their original value and never establish success.
|
||||
|
||||
The detail getters report the last observation. Call `status()` or `refresh()`
|
||||
to populate registry metadata. A handle that follows recovery can select a
|
||||
different attempt during either call while the existing handle ID stays
|
||||
unchanged. Save Python's `job_id()` (`jobId` in TypeScript) after refreshing
|
||||
and use that saved value throughout an exact-attempt diagnostic read;
|
||||
refreshing again may select a later attempt.
|
||||
|
||||
| Python method | Meaning |
|
||||
| --- | --- |
|
||||
| `job_id()` | Identity of one attempt. Embedded identities last for the handle's lifetime and cannot be reopened. |
|
||||
| `operation_id()` | Root of the explicit retry lineage, when reported. |
|
||||
| `attempt()` | One-based attempt ordinal. Worker replacement does not increment it. |
|
||||
| `retry_of()` | Immediate predecessor attempt, when reported. |
|
||||
| `lifecycle_state()` | Detailed cached lifecycle state, including unknown future values. |
|
||||
| `source_table_version()` | Source snapshot pinned for the attempt, when reported. |
|
||||
| `execution_epoch()` | Execution fencing token, when reported. |
|
||||
|
||||
Python data access uses synchronous methods on both handle types.
|
||||
TypeScript exposes the same values as camel-case properties. Older servers
|
||||
may omit lineage and pin metadata; a missing value is unknown.
|
||||
|
||||
### Retry an exact attempt
|
||||
|
||||
`retry()` requires a backend that supports exact-attempt retry. It selects a
|
||||
successor for an unsuccessful attempt, preserving resolved Function inputs,
|
||||
result decoding, and the submitting table's read freshness. Repeated requests
|
||||
for the same predecessor select the same successor. Retry the successor's ID
|
||||
to request another attempt. These guarantees require the supporting server
|
||||
protocol; Embedded handles without a replayable operation specification refuse
|
||||
durable retry.
|
||||
|
||||
<CodeGroup>
|
||||
```python Python
|
||||
from lancedb import JobState
|
||||
|
||||
job = db.open_job(job_id)
|
||||
if job.status_typed() in (JobState.FAILED, JobState.TIMED_OUT):
|
||||
successor = job.retry()
|
||||
result = successor.wait()
|
||||
```
|
||||
|
||||
```typescript TypeScript
|
||||
const state = await job.statusTyped();
|
||||
if (state === "failed" || state === "timed_out") {
|
||||
const successor = await job.retry();
|
||||
await successor.wait();
|
||||
}
|
||||
```
|
||||
|
||||
```rust Rust
|
||||
use lancedb::JobState;
|
||||
|
||||
if matches!(
|
||||
job.status_typed().await?,
|
||||
JobState::Failed | JobState::TimedOut
|
||||
) {
|
||||
let successor = job.retry().await?;
|
||||
let result = successor.wait().await?;
|
||||
}
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
A wait timeout stops waiting without cancelling execution. Keep the handle
|
||||
and wait again; a timeout alone is not a reason to retry the operation.
|
||||
TypeScript and Rust also support wait deadlines:
|
||||
|
||||
<CodeGroup>
|
||||
```python Python
|
||||
from datetime import timedelta
|
||||
|
||||
result = job.wait(timeout=timedelta(minutes=10))
|
||||
```
|
||||
|
||||
```typescript TypeScript
|
||||
await job.wait({ timeoutMs: 10 * 60 * 1000, onProgress: console.log });
|
||||
```
|
||||
|
||||
```rust Rust
|
||||
use std::time::Duration;
|
||||
|
||||
job.wait_with_options(
|
||||
lancedb::job::JobWaitOptions::new().timeout(Duration::from_secs(10 * 60)),
|
||||
).await?;
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
### Retained history and row-error pages
|
||||
|
||||
`events()` returns one retained event page. Pass its opaque continuation to
|
||||
the next call (`page_token` in Python/Rust, `pageToken` in TypeScript).
|
||||
`history()` follows those continuations, including empty pages. Python and
|
||||
TypeScript yield pages; Rust collects the retained batches. Event history
|
||||
requires a registry-backed handle and a supporting server.
|
||||
|
||||
<CodeGroup>
|
||||
```python Python
|
||||
for page in job.history(limit=1000):
|
||||
print(page.to_pylist())
|
||||
```
|
||||
|
||||
```typescript TypeScript
|
||||
for await (const page of job.history({ limit: 1000 })) {
|
||||
console.log(page.toArray());
|
||||
}
|
||||
```
|
||||
|
||||
```rust Rust
|
||||
use lancedb::job::JobEventsRequest;
|
||||
|
||||
for batch in job.history(JobEventsRequest::default().limit(1000)).await? {
|
||||
println!("{batch:?}");
|
||||
}
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
For retained row diagnostics, including repaired rows, opt into paging with an exact `job_id` and an empty
|
||||
`page_token`. Continue until the response omits its token, keeping the table,
|
||||
branch, job, and column filters unchanged. Records and capped-fragment
|
||||
summaries share the page budget. An empty page can still have a continuation.
|
||||
Explicit paging requires a supporting server; a server that truncates without
|
||||
returning a cursor is rejected rather than treated as complete.
|
||||
|
||||
<CodeGroup>
|
||||
```python Python
|
||||
job.refresh()
|
||||
attempt_job_id = job.job_id()
|
||||
token = ""
|
||||
while token is not None:
|
||||
errors = tbl.function_errors(job_id=attempt_job_id, limit=1000, page_token=token)
|
||||
print(errors.records, errors.fragments)
|
||||
token = errors.page_token
|
||||
```
|
||||
|
||||
```typescript TypeScript
|
||||
await job.refresh();
|
||||
const jobId = job.jobId;
|
||||
if (jobId === null) throw new Error("A registry attempt ID is required");
|
||||
let pageToken: string | undefined = "";
|
||||
while (pageToken !== undefined) {
|
||||
const page = await tbl.functionErrors({ jobId, limit: 1000, pageToken });
|
||||
console.log(page.records, page.fragments);
|
||||
pageToken = page.pageToken ?? undefined;
|
||||
}
|
||||
```
|
||||
|
||||
```rust Rust
|
||||
use lancedb::function::FunctionErrorsRequest;
|
||||
|
||||
job.refresh().await?;
|
||||
let job_id = job.job_id().expect("a registry-backed job");
|
||||
let mut token = Some(String::new());
|
||||
while let Some(current) = token {
|
||||
let page = table
|
||||
.function_errors(
|
||||
FunctionErrorsRequest::new()
|
||||
.job_id(job_id.clone())
|
||||
.limit(1000)
|
||||
.page_token(current),
|
||||
)
|
||||
.await?;
|
||||
println!("{:?} {:?}", page.records, page.fragments);
|
||||
token = page.page_token;
|
||||
}
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
Pages from an executing attempt are partial observations. Page a terminal
|
||||
attempt for its complete retained diagnostics; retained diagnostics are not a
|
||||
ledger of every attempted row.
|
||||
|
||||
### Progress snapshots and observers
|
||||
|
||||
Enterprise registry handles expose a structured progress snapshot. This
|
||||
@@ -262,7 +588,8 @@ observations; it does not start another polling loop. It is a synchronous
|
||||
observer and is not awaited. If it throws, `wait()` logs the error and continues
|
||||
waiting; callback exceptions do not reject `wait()`.
|
||||
|
||||
```python
|
||||
<CodeGroup>
|
||||
```python Python
|
||||
def show_progress(progress):
|
||||
print(
|
||||
progress.get("state"),
|
||||
@@ -279,7 +606,7 @@ if snapshot is not None:
|
||||
result = job.wait(progress=show_progress)
|
||||
```
|
||||
|
||||
```typescript
|
||||
```typescript TypeScript
|
||||
const showProgress = (progress: lancedb.JobProgress) => {
|
||||
console.log(
|
||||
progress.state,
|
||||
@@ -298,7 +625,7 @@ if (snapshot !== null) {
|
||||
await job.wait(showProgress);
|
||||
```
|
||||
|
||||
```rust
|
||||
```rust Rust
|
||||
let job = table.refresh_column_async("embedding").await?;
|
||||
if let Some(progress) = job.progress().await? {
|
||||
println!(
|
||||
@@ -321,6 +648,7 @@ let result = job
|
||||
})
|
||||
.await?;
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
Job-type-specific counters are optional. A missing `rows_computed`,
|
||||
`rows_planned`, or `rows_remaining` field means the server did not report that
|
||||
@@ -332,8 +660,150 @@ by the jobs API.
|
||||
`estimated_remaining_time_millis` is a best-effort client-side estimate. It is
|
||||
omitted while a job is initializing, queued, or paused, and when there is no
|
||||
positive progress rate from two compatible samples.
|
||||
|
||||
### Inspect a slow Function worker
|
||||
|
||||
On a supported Enterprise server, Python's `Job.stack(worker_id)` and
|
||||
`await AsyncJob.stack(worker_id)` capture Python thread stacks from a running
|
||||
Function refresh worker. Rust provides `job.stack(worker_id).await?`.
|
||||
TypeScript does not yet expose this method. Stack inspection requires the
|
||||
system operate privilege.
|
||||
|
||||
Select a worker ID from the job's progress warnings or recorded events. For
|
||||
example, inspect a worker named in the current no-progress or slow-split warnings:
|
||||
|
||||
```python
|
||||
job = db.open_job(job_id)
|
||||
snapshot = job.progress() or {}
|
||||
warnings = snapshot.get("warnings", [])
|
||||
if warnings:
|
||||
evidence = job.stack(warnings[0]["worker_id"])
|
||||
print(evidence["status"], evidence["omitted_sessions"])
|
||||
for session in evidence["stacks"]:
|
||||
print(session["status"], session["captured_at_millis"])
|
||||
print(session["stack"], session["truncated"])
|
||||
```
|
||||
|
||||
`unavailable` and `unsupported` are explicit capture statuses; missing frames
|
||||
do not establish that a worker is healthy or finished. Captures are bounded and
|
||||
may reuse a recent sample. They contain Python frames without source text,
|
||||
locals or native frames. Local operations and SQL-backed query handles do not
|
||||
support stack inspection. For a worker that already timed out, inspect the
|
||||
recorded failure events for retained traceback evidence.
|
||||
*/}
|
||||
|
||||
## Profile a Function worker {#profiling}
|
||||
|
||||
On a supporting Enterprise server, request a CPU profile, retained Python
|
||||
allocation profile, or PyTorch CUDA activity trace through the existing Job
|
||||
handle. A capture is a diagnostic operation on that refresh job. It records
|
||||
one selected worker's Python execution session and pins its execution epoch.
|
||||
Choose a worker ID from the job's recorded events or the Console.
|
||||
|
||||
<CodeGroup>
|
||||
```python Synchronous Python icon="python"
|
||||
from datetime import timedelta
|
||||
|
||||
job = db.open_job(refresh_job_id)
|
||||
profile = job.capture_profile(
|
||||
worker_id,
|
||||
kind="cpu",
|
||||
duration=timedelta(seconds=10),
|
||||
session_slot=0,
|
||||
)
|
||||
print(profile.profile_id, profile.status)
|
||||
job.wait_for_profile(
|
||||
profile.profile_id,
|
||||
timeout=timedelta(seconds=60),
|
||||
poll_interval=timedelta(seconds=5),
|
||||
)
|
||||
job.export_profile(profile.profile_id, "cpu.speedscope.json")
|
||||
```
|
||||
|
||||
```python Asynchronous Python icon="python"
|
||||
from datetime import timedelta
|
||||
|
||||
job = await async_db.open_job(refresh_job_id)
|
||||
profile = await job.capture_profile(
|
||||
worker_id, kind="gpu", duration=timedelta(seconds=2)
|
||||
)
|
||||
await job.wait_for_profile(profile.profile_id, timeout=timedelta(seconds=60))
|
||||
await job.export_profile(profile.profile_id, "gpu.trace.json")
|
||||
```
|
||||
|
||||
```typescript TypeScript icon="js"
|
||||
const job = await db.openJob(refreshJobId);
|
||||
const profile = await job.captureProfile(workerId, {
|
||||
kind: "gpu",
|
||||
durationSeconds: 2,
|
||||
sessionSlot: 0,
|
||||
});
|
||||
console.log(profile.profileId, profile.status);
|
||||
await job.waitForProfile(profile.profileId, {
|
||||
timeoutMs: 60_000,
|
||||
pollIntervalMs: 5_000,
|
||||
});
|
||||
await job.exportProfile(profile.profileId, "gpu.trace.json");
|
||||
```
|
||||
|
||||
```rust Rust icon="rust"
|
||||
use std::time::Duration;
|
||||
use lancedb::job::{
|
||||
FunctionProfileKind, FunctionProfileOptions, FunctionProfileWaitOptions,
|
||||
};
|
||||
|
||||
let job = db.open_job(refresh_job_id).await?;
|
||||
let profile = job.capture_profile(
|
||||
worker_id,
|
||||
FunctionProfileOptions::new(FunctionProfileKind::Cpu)
|
||||
.duration(Duration::from_secs(10)),
|
||||
).await?;
|
||||
job.wait_for_profile(
|
||||
&profile.profile_id,
|
||||
FunctionProfileWaitOptions::new()
|
||||
.timeout(Duration::from_secs(60))
|
||||
.poll_interval(Duration::from_secs(5)),
|
||||
).await?;
|
||||
let artifact = job.profile_artifact(&profile.profile_id).await?;
|
||||
std::fs::write("cpu.speedscope.json", serde_json::to_vec(&artifact)?)?;
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
| Kind | Evidence and export | Recording window |
|
||||
| --- | --- | --- |
|
||||
| `cpu` | Python stack samples weighted by thread CPU time; speedscope JSON | 1–30 seconds, default 10 |
|
||||
| `memory` | Python allocations made during capture and retained at its end; tracemalloc JSON | 1–30 seconds, default 10 |
|
||||
| `gpu` | PyTorch CUDA kernels, copies, memset and available CUDA host APIs; Chrome Trace Event JSON | 1–5 seconds, default 5 |
|
||||
|
||||
Captures require System Operate permission and a running Function refresh with
|
||||
an available worker session. Slot zero selects the first Python session.
|
||||
Only one capture per job can be active. The capture window excludes supervisor
|
||||
dispatch delay. CPU sampling needs readable per-thread procfs and is unavailable
|
||||
in dedicated sandboxes. GPU tracing needs already initialized PyTorch CUDA with
|
||||
CUPTI support. Captures add workload-dependent time and memory overhead.
|
||||
|
||||
`wait_for_profile` / `waitForProfile` defaults to a 60-second timeout and two
|
||||
seconds between status requests. Both are configurable. A timeout stops only
|
||||
that client's wait; the capture and parent refresh keep running. Keep the
|
||||
profile ID to wait again. A failed capture raises an error with the server's
|
||||
reason. Use `profile_status` / `profileStatus` to inspect its typed status and
|
||||
failure details independently of the refresh job's status.
|
||||
|
||||
Retrieve a completed capture with `profile_artifact` / `profileArtifact` to get
|
||||
the actual JSON in memory, or export it to a file as above. Files are overwritten
|
||||
only after retrieval succeeds. Retained lookup works after refresh completion:
|
||||
reopen the parent job, then use the saved profile ID. Retention is at most one
|
||||
hour and eight captures per job, until earlier scratch reclamation or archival.
|
||||
Permission, unsupported-session, expired-artifact and unsupported-server errors
|
||||
are surfaced by the normal client error handling.
|
||||
|
||||
Open CPU exports in speedscope and GPU exports in Perfetto. Truncation flags
|
||||
remain in the downloaded JSON. CUDA durations can overlap across streams, so
|
||||
their sum is not elapsed time or GPU utilization. Python operator attribution,
|
||||
GPU allocation stacks, native CPU frames and native allocations are outside
|
||||
these capture formats. Concurrent CUDA profilers in the same Python session
|
||||
are unsupported.
|
||||
|
||||
## Embedded and Enterprise execution {#in-process}
|
||||
|
||||
The following table describes LanceDB Embedded operations and registry jobs on
|
||||
@@ -359,8 +829,8 @@ SQL query engine rather than the job registry:
|
||||
| Secrets | Create, alter, list, describe, drop | Credential values are bound as SQL parameters, never embedded in SQL text or returned in results. `DESCRIBE SECRET` additionally exposes rotation history. |
|
||||
| Views | Create, describe, list, drop | Create returns the stored definition and schema. Drop confirms catalog removal while cleanup continues separately. |
|
||||
|
||||
All of these report `job.job_type` as `"query"`, with `job.id` holding the
|
||||
connection-scoped SQL query UUID -- use `describe_query(job.id)` to inspect
|
||||
All of these report `job.job_type()` as `"query"`, with `job.id()` holding the
|
||||
connection-scoped SQL query UUID -- use `describe_query(job.id())` to inspect
|
||||
one. Unlike registry handles, they don't expose event history, can't be
|
||||
reopened through `open_job()` or reattached after a client restart, and
|
||||
cancellation depends on the SQL server's support for it.
|
||||
|
||||
+48
-1
@@ -80,7 +80,7 @@ endpoint, returning results as Arrow record batches:
|
||||
does not expose a SQL execution method, or from any tool with its own
|
||||
Flight SQL integration. A LanceDB-specific SDK is not required to submit
|
||||
SQL.
|
||||
3. **The LanceDB CLI.** Open an interactive SQL shell, or run a
|
||||
3. **The [LanceDB CLI](/tools/cli).** Open an interactive SQL shell, or run a
|
||||
statement or file, directly from the command line with no code at all.
|
||||
|
||||
The [SQL reference](/sql#connecting) shows a query from Python. See
|
||||
@@ -247,6 +247,53 @@ cancellation. Background operations such as index builds return a
|
||||
[job](/basics/jobs) handle instead. Use the API for the returned handle to
|
||||
check status and retrieve results.
|
||||
|
||||
### Timeouts and cancellation {#query-timeouts}
|
||||
|
||||
Rust and Python SQL executions support per-query limits. Python's synchronous
|
||||
and asynchronous connections accept the same keyword arguments:
|
||||
|
||||
```python
|
||||
from datetime import timedelta
|
||||
|
||||
query = db.execute_query_async(
|
||||
"SELECT frame_id, caption FROM frames",
|
||||
timeout=timedelta(seconds=30),
|
||||
read_timeout=timedelta(seconds=5),
|
||||
cancel_on_drop=True,
|
||||
)
|
||||
# Cancel explicitly if these results are no longer needed.
|
||||
query.cancel()
|
||||
```
|
||||
|
||||
`timeout` starts at submission and covers result consumption, including time
|
||||
before opening a reader. `read_timeout` overrides the connection's limit for each
|
||||
server read. Expiry stops reads and attempts to cancel Flight execution. The
|
||||
execution deadline is also sent to the server on result-streaming RPCs.
|
||||
|
||||
By default, deferred queries can be detached. `cancel_on_drop=True` attempts
|
||||
cancellation when an unread handle or its reader is dropped; it requires the
|
||||
submitting runtime to remain alive. Directly streamed queries always stop on
|
||||
drop. With an asynchronous Python connection, await submission and
|
||||
`query.cancel()`.
|
||||
|
||||
Rust exposes the same controls on the submission builder:
|
||||
|
||||
```rust
|
||||
use std::time::Duration;
|
||||
|
||||
let query = db.execute_query_async("SELECT frame_id, caption FROM frames")
|
||||
.timeout(Duration::from_secs(30))
|
||||
.read_timeout(Duration::from_secs(5))
|
||||
.cancel_on_drop(true)
|
||||
.execute()
|
||||
.await?;
|
||||
query.cancel().await?;
|
||||
```
|
||||
|
||||
These options cancel Flight execution. A durable server-side job can outlive its
|
||||
Flight waiter; cancel it explicitly with `db.cancel_job(query.job_id)` in Python,
|
||||
or `Connection::cancel_job` in Rust.
|
||||
|
||||
## Query plans {#query-plans}
|
||||
|
||||
Use query plans to understand how LanceDB reads data, applies filters and uses
|
||||
|
||||
@@ -144,9 +144,9 @@ same way any other curation Function is registered:
|
||||
|
||||
<CodeGroup>
|
||||
```python Python icon="python"
|
||||
from lancedb import udf
|
||||
from lancedb import function
|
||||
|
||||
@udf
|
||||
@function
|
||||
def caption_quality(caption: str) -> float:
|
||||
... # score the caption, e.g. with a lightweight heuristic or model
|
||||
|
||||
|
||||
@@ -98,10 +98,12 @@ is not a substitute for `lancedb.blob`.
|
||||
|
||||
## Batch: once per call, many rows at a time {#batch}
|
||||
|
||||
A function is called once per batch instead of once per row when its
|
||||
parameters are annotated `pyarrow.Array`, or when it takes a single
|
||||
`pyarrow.RecordBatch` parameter to read more than one column together. The
|
||||
same doubling logic, vectorized over a whole batch at once:
|
||||
A function is called once per batch instead of once per row when all of its
|
||||
parameters are annotated `pyarrow.Array`. Those annotations say that a whole
|
||||
column arrives in one call, but not which Arrow type the column holds, so a
|
||||
batch function also passes `input_schema` and `output_schema`; every field of
|
||||
`input_schema` matches a parameter by name and by order. The same doubling
|
||||
logic, vectorized over a whole batch at once:
|
||||
|
||||
<CodeGroup>
|
||||
```python Python icon="python"
|
||||
@@ -111,6 +113,8 @@ from lancedb import function
|
||||
|
||||
@function(
|
||||
pip=["numpy==2.2.0"],
|
||||
input_schema=pa.schema([pa.field("value", pa.float64(), nullable=False)]),
|
||||
output_schema=pa.float64(),
|
||||
batch_size=32,
|
||||
max_concurrency=4,
|
||||
row_timeout_seconds=90,
|
||||
@@ -120,6 +124,27 @@ def score_batch(value: pa.Array) -> pa.Array:
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
Read several columns in one call by taking one `pa.Array` parameter per
|
||||
column, with one schema field for each:
|
||||
|
||||
```python
|
||||
@function(
|
||||
input_schema=pa.schema([
|
||||
pa.field("value", pa.float64(), nullable=False),
|
||||
pa.field("weight", pa.float64(), nullable=False),
|
||||
]),
|
||||
output_schema=pa.float64(),
|
||||
)
|
||||
def weighted_score(value: pa.Array, weight: pa.Array) -> pa.Array:
|
||||
return pc.multiply(value, weight)
|
||||
```
|
||||
|
||||
A single `pyarrow.RecordBatch` parameter is also a batch function, but it does
|
||||
not read several columns at once: `input_schema` declares one field per
|
||||
parameter, so a `RecordBatch` parameter binds one input column and receives
|
||||
that column as a batch. A schema with more fields than the callable has
|
||||
parameters is rejected at decoration.
|
||||
|
||||
Batching amortizes per-call overhead across many rows, which matters most
|
||||
once a function also does something with real fixed cost per call -- loading
|
||||
a model, opening a connection, making a network round trip.
|
||||
@@ -169,8 +194,9 @@ and remote-API Functions both build on below.
|
||||
`db.list_gpu_classes()` lists the GPU classes configured for the deployment.
|
||||
Each record reports the operator's hardware description and limits; it does
|
||||
not mean a GPU is currently free. Listing requires the System Usage
|
||||
permission. Pass a returned class name to `gpu_class` to fix that placement
|
||||
in the Function version. `gpu=True` remains required:
|
||||
permission. Pass a returned class name to `gpu_class`, such as `gpu=True, gpu_class="a10g", gpu_count=2`,
|
||||
to select a pool; `gpu_count` controls the GPUs allocated together to each worker.
|
||||
`gpu_count` defaults to one. Omitting `gpu` uses CPU workers:
|
||||
|
||||
<CodeGroup>
|
||||
```python Python icon="python"
|
||||
@@ -184,7 +210,10 @@ gpu_class = next(
|
||||
@function(
|
||||
gpu=True,
|
||||
gpu_class=gpu_class,
|
||||
row_timeout_seconds=600,
|
||||
pip=["torch==2.12.0", "sentence-transformers==5.7.0"],
|
||||
input_schema=pa.schema([pa.field("text", pa.string(), nullable=True)]),
|
||||
output_schema=pa.list_(pa.float32(), 384),
|
||||
)
|
||||
class embed_text:
|
||||
def __init__(self, model_name: str = "all-MiniLM-L6-v2"):
|
||||
@@ -204,10 +233,39 @@ table.add_columns({"embedding": version(text=col("caption"))})
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
`row_timeout_seconds` sets the per-call deadline, not the `__init__` budget.
|
||||
Current Enterprise builds default to 300 seconds for both CPU and GPU
|
||||
Functions. Enterprise 1.13.0 through 1.14.1, and 1.15.0 builds before the
|
||||
shared default was restored, reject a GPU refresh unless the Function
|
||||
definition or the refresh request sets a positive value; registration still
|
||||
succeeds. A refresh value overrides the definition. Size the deadline from the
|
||||
longest observed call. The 600 seconds above is one working GPU example, not a
|
||||
universal recommendation.
|
||||
|
||||
Older servers that do not implement `GET /v1/gpu/classes` raise
|
||||
`NotImplementedError`. Without `gpu_class`, the deployment's default GPU
|
||||
class is used. The class is immutable with the Function version; set a
|
||||
per-refresh class or aggregate GPU budget through
|
||||
`NotImplementedError`. With `gpu=True`, omitting `gpu_class` accepts any
|
||||
eligible configured class, equivalent to `gpu_class="any"`. Use
|
||||
`gpu_class="default"` to request the default pool explicitly. Class names
|
||||
must be lowercase. Counts
|
||||
must be positive integers; the deployment must have a node that can supply
|
||||
that many devices together. `max_gpu_count_per_worker` in the class inventory
|
||||
is the operator's cap; an unset cap does not promise unlimited hardware.
|
||||
Use `gpu=True, gpu_class="any", gpu_count=2` when any configured GPU class is acceptable, but each
|
||||
worker needs two devices together. `gpu=True, gpu_class="any"` requests one GPU. The server
|
||||
selects a class that fits the request using operator-configured limits,
|
||||
preferring known multi-GPU limits over unspecified limits. The selected
|
||||
class is fixed for the worker cohort; selection does not reserve capacity
|
||||
until the worker is scheduled. `gpu=True, gpu_count=2` makes the same request
|
||||
as `gpu=True, gpu_class="any", gpu_count=2`. A Function with an `any` request
|
||||
can share a SQL job with a
|
||||
Function pinned to a class; that job uses the pinned class.
|
||||
|
||||
The request is immutable with the Function version. Configure tensor
|
||||
parallelism in the model separately, for example vLLM's
|
||||
`tensor_parallel_size=2` for `gpu=True, gpu_class="a10g", gpu_count=2`.
|
||||
|
||||
The refresh `total_gpu_count` is a separate aggregate budget across workers and
|
||||
must be at least the Function's per-worker count. Set it through
|
||||
[`refresh_column_async`](/feature-engineering/refresh-column#resources).
|
||||
|
||||
The model loads once per worker instance, in `__init__`; `__call__` only
|
||||
@@ -443,3 +501,62 @@ as `bytes`; this feature does not add streamed outputs.
|
||||
Filling the column a Function is bound to, and re-filling it as inputs change.
|
||||
</Card>
|
||||
</CardGroup>
|
||||
|
||||
|
||||
## Default execution budgets
|
||||
|
||||
`total_cpu_millis`, `total_memory_bytes`, and
|
||||
`total_gpu_count` supply execution-wide defaults. CPU is in millicores
|
||||
(1000 = one core), memory is in bytes, and GPU count is a total across workers.
|
||||
All five resource settings use the same names at registration, creation, and
|
||||
refresh. Each resolves independently in this order:
|
||||
|
||||
1. The refresh's value.
|
||||
2. The column or materialized view's value.
|
||||
3. The registered Function's value.
|
||||
4. The deployment default for total budgets and device count; any eligible
|
||||
configured GPU class when no layer specifies one.
|
||||
|
||||
For a materialized view using multiple Functions, the third layer adds the
|
||||
`total_*` budgets across distinct pinned Function versions. Its per-worker GPU
|
||||
count uses the largest Function default, and GPU classes must be compatible
|
||||
unless the declaration or refresh overrides the class. Calling the same version
|
||||
more than once counts it once. Column and view defaults also apply when the
|
||||
service schedules a refresh automatically. Integer overflow or a budget that
|
||||
cannot fit a required worker is rejected.
|
||||
|
||||
```python
|
||||
@function(
|
||||
gpu=True,
|
||||
gpu_class="h100",
|
||||
gpu_count=2,
|
||||
total_cpu_millis=8000,
|
||||
total_memory_bytes=16 * 1024**3,
|
||||
total_gpu_count=4,
|
||||
)
|
||||
def embed(text: str) -> list[float]: ...
|
||||
|
||||
version = db.create_function(embed)
|
||||
table.add_columns(
|
||||
{"embedding": version(text=col("text"))},
|
||||
gpu_class="any",
|
||||
gpu_count=1,
|
||||
total_gpu_count=8,
|
||||
)
|
||||
table.refresh_column("embedding", gpu_class="h100", gpu_count=4, total_gpu_count=8)
|
||||
|
||||
db.create_materialized_view(
|
||||
"embeddings", query="SELECT embed(text) AS embedding FROM documents",
|
||||
total_cpu_millis=16000,
|
||||
gpu_class="any",
|
||||
gpu_count=2,
|
||||
total_gpu_count=8,
|
||||
)
|
||||
```
|
||||
|
||||
`gpu_class` selects the GPU pool and `gpu_count` selects the positive number
|
||||
of devices allocated together to each worker. Both can be overridden at
|
||||
column/MV creation and refresh. An explicit `gpu_class="any"` replaces a
|
||||
registered class with any eligible configured pool. These settings require a
|
||||
GPU Function for computed columns. The `total_*` values are ceilings for the
|
||||
whole worker fleet. CPU and memory can limit the fleet before it reaches its GPU ceiling.
|
||||
|
||||
@@ -24,6 +24,7 @@ records belong, and save the selected data or the rules used to produce it.
|
||||
| [Scope to what changed](/curation/changes) | How to process only the rows added since your last run. |
|
||||
| [Profile a dataset](/curation/aggregate) | Whether coverage, missing values and class balance suit the task. |
|
||||
| [Statistical Sampling](/curation/statistical-sampling) | Which random fraction to inspect or use for an experiment. |
|
||||
| [Semantic Sampling](/curation/semantic-sampling) | How to draw rows from every cluster in an existing IVF vector index. |
|
||||
| [Selective Sampling](/curation/selective-sampling) | How to re-fetch specific rows by ID, address or offset. |
|
||||
| [Join datasets](/curation/join) | How to attach labels, metadata or scores stored elsewhere. |
|
||||
| [Rank and deduplicate](/curation/windowing) | Which records to keep when several share an explicit key. |
|
||||
|
||||
@@ -114,9 +114,9 @@ matched rows, not before. Register `caption_quality` first:
|
||||
|
||||
<CodeGroup>
|
||||
```python Python icon="python"
|
||||
from lancedb import udf
|
||||
from lancedb import function
|
||||
|
||||
@udf
|
||||
@function
|
||||
def caption_quality(caption: str) -> float:
|
||||
... # score the caption, e.g. with a lightweight heuristic or model
|
||||
|
||||
|
||||
@@ -35,6 +35,9 @@ rows = tbl.take_row_ids([1001, 1002, 1005]).to_arrow()
|
||||
|
||||
# By offset -- the full range is always [0, len(tbl))
|
||||
rows = tbl.take_offsets([0, 1, 2]).to_arrow()
|
||||
|
||||
# By offset in input order; missing offsets are omitted
|
||||
rows = tbl.take_offsets([2, 0, 2], preserve_order=True).to_arrow()
|
||||
```
|
||||
|
||||
```typescript TypeScript icon="square-js"
|
||||
@@ -53,6 +56,13 @@ let rows_by_id = tbl.take_row_ids(vec![1001, 1002, 1005]).execute().await?;
|
||||
|
||||
// By offset -- the full range is always [0, tbl.count_rows().await?)
|
||||
let rows_by_offset = tbl.take_offsets(vec![0, 1, 2]).execute().await?;
|
||||
|
||||
// By offset in input order; missing offsets are omitted
|
||||
let rows_by_offset_in_order = tbl
|
||||
.take_offsets(vec![2, 0, 2])
|
||||
.preserve_order()
|
||||
.execute()
|
||||
.await?;
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
@@ -74,19 +84,26 @@ sampling with replacement. In Rust, an explicit nonempty
|
||||
`QueryBase::order_by` list overrides the requested order; limits and offsets
|
||||
apply after restoring repeated rows.
|
||||
|
||||
`take_offsets` also preserves repeated offsets, but does not guarantee
|
||||
input order. It tracks `_rowoffset` internally to restore repeated rows
|
||||
and drops that column from the output unless you explicitly `select` it.
|
||||
Add `_rowoffset` to your selection when you need to align a `take_offsets`
|
||||
result with the input offsets.
|
||||
`take_offsets` preserves repeated offsets. By default, it does not guarantee
|
||||
input order and returns found rows as they arrive. Python sync and async
|
||||
builders accept `preserve_order=True`, and Rust accepts `.preserve_order()`,
|
||||
to return found rows in input order, including repeated offsets. Missing
|
||||
non-negative offsets are omitted; negative offsets are rejected and are not
|
||||
Python-style relative indices. The default unordered path remains the
|
||||
existing incremental behavior.
|
||||
|
||||
The method tracks `_rowoffset` internally to restore repeated rows and drops
|
||||
that column from the output unless you explicitly `select` it. Add
|
||||
`_rowoffset` to your selection when you need to align a `take_offsets` result
|
||||
with the input offsets.
|
||||
|
||||
<Note>
|
||||
Ordered takes by row ID collect all matching batches, combine them into one
|
||||
batch and reorder the rows before returning output batches. Even
|
||||
`to_batches(max_batch_length=1)` only limits the returned batch size; it
|
||||
does not bound working memory. For large requests or rows with large
|
||||
column values, split the input IDs into smaller requests and use
|
||||
`.select(...)` to fetch only the columns you need.
|
||||
Ordered takes by row ID, and ordered offset takes with `preserve_order=True`,
|
||||
collect all matching batches, combine them into one batch and reorder the rows
|
||||
before returning output batches. Even `to_batches(max_batch_length=1)` only
|
||||
limits the returned batch size; it does not bound working memory. For large
|
||||
requests or rows with large column values, split the input IDs or offsets into
|
||||
smaller requests and use `.select(...)` to fetch only the columns you need.
|
||||
</Note>
|
||||
|
||||
Offsets are mostly useful for sampling: the valid range is always
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user