mirror of
https://github.com/lancedb/lancedb.git
synced 2026-11-29 14:03:59 +00:00
Merge remote-tracking branch 'origin/main' into gatekeeper/fix-4842-1
This commit is contained in:
@@ -0,0 +1,63 @@
|
||||
---
|
||||
name: lancedb-vector-dedup
|
||||
description: Plan and run Enterprise IVF vector deduplication with dedupe and duplicate_pairs, including sampling, index coverage, recall and resource limits. Use for near-duplicate embedding or perceptual-hash records; use MinHash guidance for text shingles.
|
||||
---
|
||||
|
||||
# Vector deduplication
|
||||
|
||||
Read the maintained [workflow](../../../docs/web/curation/dedupe.mdx),
|
||||
[DEDUPE reference](../../../docs/web/sql/dql/dedupe.mdx) and
|
||||
[DUPLICATE_PAIRS reference](../../../docs/web/sql/dql/duplicate-pairs.mdx)
|
||||
before constructing SQL. In a source checkout these paths are relative to this
|
||||
skill directory. When using an installed copy without the docs, read
|
||||
`https://docs.lancedb.com/curation/dedupe` and the linked SQL references.
|
||||
|
||||
## Establish the comparison contract
|
||||
|
||||
- Confirm an Enterprise deployment that supports these table functions. Use
|
||||
`dedupe` and `duplicate_pairs`; legacy `vector_dedup` names are rejected.
|
||||
- Inspect the vector type, metric, compatible index, indexed fragments and
|
||||
source version. Wait for index coverage after writes. Do not run a full
|
||||
scan over unindexed fragments or silently change the index to make it run.
|
||||
- Explain that candidates are compared only within physical IVF partitions
|
||||
and segments. Encoded/quantized distances are not an exact raw-vector
|
||||
comparison. L2 thresholds are squared distances; Hamming counts bits.
|
||||
- Use `id_column` on pair queries for business IDs. Retain `dataset_version`,
|
||||
segment and partition identities. Do not decode internal row IDs or assume
|
||||
that representatives stay the same after later data/index changes.
|
||||
|
||||
## Bound the first experiment
|
||||
|
||||
Use a reproducible partition sample before a full scan:
|
||||
|
||||
```sql
|
||||
SELECT id_a, id_b, distance, dataset_version, segment_id, partition_id
|
||||
FROM duplicate_pairs(
|
||||
'frames', 'embedding',
|
||||
distance_threshold => 0.02,
|
||||
id_column => 'frame_id',
|
||||
selection => 'random', count => 10, seed => 42
|
||||
)
|
||||
```
|
||||
|
||||
Adapt the threshold and sample size to the metric and actual partition count.
|
||||
Sampling partitions is not uniform sampling of rows. Inspect known duplicate
|
||||
and distinct examples, pair density, partition skew, memory, spill space and
|
||||
elapsed time. Do not infer global recall or ten-billion-row qualification
|
||||
from a small or unversioned benchmark. Pair work and output can be quadratic
|
||||
within a partition; an outer SQL `LIMIT` is not an upstream work budget.
|
||||
|
||||
## Choose the result
|
||||
|
||||
`dedupe` returns original representative rows and always scans all partitions.
|
||||
Use its default `connected_components` for transitive groups; choose
|
||||
`direct_representative` when chains should not merge transitively. It does not
|
||||
accept `id_column`, `selection`, `count` or `seed`; `duplicate_pairs` does not
|
||||
accept `resolution`.
|
||||
|
||||
Keep pair data on the server when possible; avoid collecting an unbounded
|
||||
edge set in client memory. Persist a new table/view only within the user's
|
||||
authorized scope, preserving source rows unless deletion was requested.
|
||||
Do not register a Python Function or fetch/rewrite Blob payloads to invoke
|
||||
these built-in table functions. For MinHash/text deduplication, follow the
|
||||
separate `https://docs.lancedb.com/enterprise/sql-minhash` workflow.
|
||||
+12
-27
@@ -1,5 +1,5 @@
|
||||
[tool.bumpversion]
|
||||
current_version = "0.42.0-beta.4"
|
||||
current_version = "0.42.0-beta.37"
|
||||
parse = """(?x)
|
||||
(?P<major>0|[1-9]\\d*)\\.
|
||||
(?P<minor>0|[1-9]\\d*)\\.
|
||||
@@ -23,31 +23,6 @@ allow_dirty = true
|
||||
commit = true
|
||||
message = "Bump version: {current_version} → {new_version}"
|
||||
commit_args = ""
|
||||
# bump-my-version >=1.4.0 rejects pre_commit_hooks containing shell syntax unless opted in.
|
||||
allow_shell_hooks = true
|
||||
|
||||
# Java maven files
|
||||
pre_commit_hooks = [
|
||||
"""
|
||||
NEW_VERSION="${BVHOOK_NEW_MAJOR}.${BVHOOK_NEW_MINOR}.${BVHOOK_NEW_PATCH}"
|
||||
if [ ! -z "$BVHOOK_NEW_PRE_L" ] && [ ! -z "$BVHOOK_NEW_PRE_N" ]; then
|
||||
NEW_VERSION="${NEW_VERSION}-${BVHOOK_NEW_PRE_L}.${BVHOOK_NEW_PRE_N}"
|
||||
fi
|
||||
echo "Constructed new version: $NEW_VERSION"
|
||||
cd java && mvn versions:set -DnewVersion=$NEW_VERSION && mvn versions:commit
|
||||
|
||||
# Check for any modified but unstaged pom.xml files
|
||||
MODIFIED_POMS=$(git ls-files -m | grep pom.xml)
|
||||
if [ ! -z "$MODIFIED_POMS" ]; then
|
||||
echo "The following pom.xml files were modified but not staged. Adding them now:"
|
||||
echo "$MODIFIED_POMS" | while read -r file; do
|
||||
git add "$file"
|
||||
echo "Added: $file"
|
||||
done
|
||||
fi
|
||||
""",
|
||||
]
|
||||
|
||||
[tool.bumpversion.parts.pre_l]
|
||||
optional_value = "final"
|
||||
values = ["beta", "final"]
|
||||
@@ -87,7 +62,17 @@ filename = "python/Cargo.toml"
|
||||
replace = "\nversion = \"{new_version}\""
|
||||
search = "\nversion = \"{current_version}\""
|
||||
|
||||
# Java documentation
|
||||
# Java Maven coordinates and documentation
|
||||
[[tool.bumpversion.files]]
|
||||
filename = "java/pom.xml"
|
||||
search = "<artifactId>lancedb-parent</artifactId>\n <version>{current_version}</version>"
|
||||
replace = "<artifactId>lancedb-parent</artifactId>\n <version>{new_version}</version>"
|
||||
|
||||
[[tool.bumpversion.files]]
|
||||
filename = "java/lancedb-core/pom.xml"
|
||||
search = "<artifactId>lancedb-parent</artifactId>\n <version>{current_version}</version>"
|
||||
replace = "<artifactId>lancedb-parent</artifactId>\n <version>{new_version}</version>"
|
||||
|
||||
[[tool.bumpversion.files]]
|
||||
filename = "docs/src/java/java.md"
|
||||
replace = "<version>{new_version}</version>"
|
||||
|
||||
@@ -7,7 +7,10 @@
|
||||
"plugins": [
|
||||
{
|
||||
"name": "lancedb",
|
||||
"source": "./plugins/lancedb",
|
||||
"source": {
|
||||
"source": "github",
|
||||
"repo": "lancedb/lancedb-agent-plugins"
|
||||
},
|
||||
"description": "Write, review, debug, and document LanceDB pipelines in Python and TypeScript that work with both LanceDB Embedded and LanceDB Enterprise.",
|
||||
"version": "0.1.0",
|
||||
"author": {
|
||||
|
||||
+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"
|
||||
|
||||
@@ -12,9 +12,12 @@ inputs:
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Enable long paths for Lance dependencies
|
||||
shell: bash
|
||||
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: |
|
||||
|
||||
@@ -12,6 +12,7 @@ on:
|
||||
- ci/extract_sdk_doc_links.py
|
||||
- ci/build_cli_linux.sh
|
||||
- ci/package_cli.py
|
||||
- ci/update_homebrew_formula.py
|
||||
- .bumpversion.toml
|
||||
- rust/lancedb/cli/Cargo.toml
|
||||
- ci/set_lance_version.py
|
||||
@@ -26,6 +27,7 @@ on:
|
||||
- ci/extract_sdk_doc_links.py
|
||||
- ci/build_cli_linux.sh
|
||||
- ci/package_cli.py
|
||||
- ci/update_homebrew_formula.py
|
||||
- .bumpversion.toml
|
||||
- rust/lancedb/cli/Cargo.toml
|
||||
- ci/set_lance_version.py
|
||||
|
||||
@@ -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
|
||||
@@ -0,0 +1,68 @@
|
||||
name: CLI Python wheels
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- ci/cli_wheel/**
|
||||
- ci/build_cli_wheels.py
|
||||
- ci/package_cli.py
|
||||
- .github/workflows/cli-wheels.yml
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
tag:
|
||||
description: Published CLI release to package
|
||||
required: true
|
||||
default: v0.42.0-beta.30
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
CLI_TAG: ${{ inputs.tag || 'v0.42.0-beta.30' }}
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: actions/setup-python@v6
|
||||
with:
|
||||
python-version: '3.13'
|
||||
- run: python -m pip install wheel==0.48.0
|
||||
- name: Build wheels from published release archives
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
gh release download --repo lancedb/lancedb --dir archives \
|
||||
--pattern 'lancedb-*.tar.gz' --pattern SHA256SUMS -- "$CLI_TAG"
|
||||
python -m ci.build_cli_wheels "$CLI_TAG" archives wheels
|
||||
- uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: lancedb-tools-wheels
|
||||
path: wheels/*.whl
|
||||
if-no-files-found: error
|
||||
compression-level: 0
|
||||
|
||||
install:
|
||||
needs: build
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [macos-15, ubuntu-24.04, ubuntu-24.04-arm]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: actions/setup-python@v6
|
||||
with:
|
||||
python-version: '3.13'
|
||||
- uses: actions/download-artifact@v8
|
||||
with:
|
||||
name: lancedb-tools-wheels
|
||||
path: wheels
|
||||
- run: python -m pip install uv==0.13.9 pipx==1.19.0
|
||||
- name: Install and exercise the native CLI with uvx and pipx
|
||||
run: bash ci/cli_wheel/test_install.sh "$CLI_TAG" "$PWD/wheels"
|
||||
@@ -23,6 +23,8 @@ jobs:
|
||||
- uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1
|
||||
with:
|
||||
components: clippy
|
||||
# Use only the downloads-only cache configured below.
|
||||
cache: false
|
||||
- uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2
|
||||
with:
|
||||
# Restoring compiled targets can exhaust the hosted runner disk.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -27,12 +27,10 @@ env:
|
||||
PIP_EXTRA_INDEX_URL: "https://pypi.fury.io/lance-format/ https://pypi.fury.io/lancedb/"
|
||||
|
||||
jobs:
|
||||
# Single deploy job since we're just deploying
|
||||
build:
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
runs-on: ubuntu-24.04
|
||||
outputs:
|
||||
artifact_name: ${{ steps.artifact-name.outputs.name }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
@@ -44,10 +42,10 @@ jobs:
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v6
|
||||
with:
|
||||
python-version: "3.10"
|
||||
python-version: "3.11"
|
||||
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: |
|
||||
@@ -68,10 +66,28 @@ jobs:
|
||||
PYTHONPATH=. mkdocs build
|
||||
- name: Setup Pages
|
||||
uses: actions/configure-pages@v5
|
||||
- name: Set artifact name
|
||||
id: artifact-name
|
||||
run: echo "name=github-pages-${{ github.run_id }}-${{ github.run_attempt }}" >> "$GITHUB_OUTPUT"
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-pages-artifact@v3
|
||||
with:
|
||||
name: ${{ steps.artifact-name.outputs.name }}
|
||||
path: "docs/site"
|
||||
|
||||
# Deploy from a separate job so the Pages artifact upload has settled before
|
||||
# the deploy action looks it up. The per-run name keeps a full workflow
|
||||
# re-run from accumulating artifacts that share the default name.
|
||||
deploy:
|
||||
name: Deploy to GitHub Pages
|
||||
needs: build
|
||||
runs-on: ubuntu-24.04
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
steps:
|
||||
- name: Deploy to GitHub Pages
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@v4
|
||||
with:
|
||||
artifact_name: ${{ needs.build.outputs.artifact_name }}
|
||||
|
||||
@@ -19,6 +19,8 @@ jobs:
|
||||
gh-release:
|
||||
needs: cli
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
prerelease: ${{ steps.extract_version.outputs.prerelease }}
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
@@ -77,7 +79,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 +87,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.
|
||||
@@ -102,9 +104,58 @@ jobs:
|
||||
fail_on_unmatched_files: true
|
||||
overwrite_files: true
|
||||
|
||||
homebrew:
|
||||
name: Open Homebrew formula PR
|
||||
needs: gh-release
|
||||
if: github.repository == 'lancedb/lancedb' && needs.gh-release.outputs.prerelease == 'false'
|
||||
runs-on: ubuntu-24.04
|
||||
environment: homebrew-tap
|
||||
concurrency: homebrew-tap-${{ github.ref_name }}
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
repository: lancedb/homebrew-tap
|
||||
ref: main
|
||||
path: tap
|
||||
persist-credentials: false
|
||||
- name: Update formula from the published checksums
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
gh release download "$GITHUB_REF_NAME" --repo "$GITHUB_REPOSITORY" \
|
||||
--pattern SHA256SUMS --dir "$RUNNER_TEMP"
|
||||
python3 -m ci.update_homebrew_formula "$GITHUB_REF_NAME" \
|
||||
"$RUNNER_TEMP/SHA256SUMS" tap/Formula/lancedb.rb
|
||||
- name: Create tap installation token
|
||||
id: app
|
||||
uses: actions/create-github-app-token@f418cff399f7aef4c2f0ad47e25ca7a6abbdd6fc # v3.4.0
|
||||
with:
|
||||
client-id: ${{ vars.HOMEBREW_TAP_APP_CLIENT_ID }}
|
||||
private-key: ${{ secrets.HOMEBREW_TAP_APP_PRIVATE_KEY }}
|
||||
owner: lancedb
|
||||
repositories: homebrew-tap
|
||||
permission-contents: write
|
||||
permission-pull-requests: write
|
||||
- name: Open or update the tap PR
|
||||
uses: peter-evans/create-pull-request@3ffccacd46053766916f087ce41d627c0b8cf2d1 # v8.1.3
|
||||
with:
|
||||
path: tap
|
||||
token: ${{ steps.app.outputs.token }}
|
||||
base: main
|
||||
branch: release/lancedb-${{ github.ref_name }}
|
||||
add-paths: Formula/lancedb.rb
|
||||
commit-message: Update LanceDB CLI to ${{ github.ref_name }}
|
||||
title: Update LanceDB CLI to ${{ github.ref_name }}
|
||||
body: |
|
||||
Update the formula to [${{ github.ref_name }}](https://github.com/lancedb/lancedb/releases/tag/${{ github.ref_name }}) using its published SHA256SUMS.
|
||||
Review and merge after the tap's install tests pass.
|
||||
|
||||
report-failure:
|
||||
runs-on: ubuntu-24.04
|
||||
needs: [cli, gh-release]
|
||||
needs: [cli, gh-release, homebrew]
|
||||
if: always() && failure()
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
@@ -39,9 +39,11 @@ jobs:
|
||||
distribution: temurin
|
||||
java-version: 8
|
||||
cache: "maven"
|
||||
server-id: ossrh
|
||||
server-username: SONATYPE_USER
|
||||
server-password: SONATYPE_TOKEN
|
||||
# Betas go to Fury and stable releases to Maven Central, which limits
|
||||
# how many releases an organization may publish each month.
|
||||
server-id: ${{ contains(github.ref, 'beta') && 'fury' || 'ossrh' }}
|
||||
server-username: ${{ contains(github.ref, 'beta') && 'FURY_TOKEN' || 'SONATYPE_USER' }}
|
||||
server-password: ${{ contains(github.ref, 'beta') && 'FURY_PASSWORD' || 'SONATYPE_TOKEN' }}
|
||||
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
|
||||
gpg-passphrase: MAVEN_GPG_PASSPHRASE
|
||||
- name: Set git config
|
||||
@@ -52,8 +54,16 @@ jobs:
|
||||
if: github.event_name == 'pull_request'
|
||||
run: |
|
||||
./mvnw --batch-mode -DskipTests package -pl lancedb-core -am
|
||||
- name: Publish
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
- name: Publish to Fury
|
||||
if: startsWith(github.ref, 'refs/tags/v') && contains(github.ref, 'beta')
|
||||
run: |
|
||||
./mvnw --batch-mode -DskipTests deploy -pl lancedb-core -am -P deploy-to-fury
|
||||
env:
|
||||
FURY_TOKEN: ${{ secrets.FURY_TOKEN }}
|
||||
# Fury authenticates with the token as the username; the password is ignored.
|
||||
FURY_PASSWORD: NOPASS
|
||||
- name: Publish to Maven Central
|
||||
if: startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, 'beta')
|
||||
run: |
|
||||
echo "use-agent" >> ~/.gnupg/gpg.conf
|
||||
echo "pinentry-mode loopback" >> ~/.gnupg/gpg.conf
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -39,7 +39,9 @@ jobs:
|
||||
contents: write
|
||||
steps:
|
||||
- name: Output Inputs
|
||||
run: echo "${{ toJSON(github.event.inputs) }}"
|
||||
env:
|
||||
INPUTS_JSON: ${{ toJSON(github.event.inputs) }}
|
||||
run: echo "$INPUTS_JSON"
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 0
|
||||
@@ -59,9 +61,11 @@ jobs:
|
||||
- name: Bump version
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
RELEASE_TYPE: ${{ inputs.type }}
|
||||
BUMP_MINOR: ${{ inputs.bump-minor }}
|
||||
run: |
|
||||
pip install bump-my-version PyGithub packaging
|
||||
bash ci/bump_version.sh ${{ inputs.type }} ${{ inputs.bump-minor }}
|
||||
bash ci/bump_version.sh "$RELEASE_TYPE" "$BUMP_MINOR"
|
||||
release_tag=$(git describe --tags --exact-match HEAD)
|
||||
bash ci/update_lockfiles.sh --amend
|
||||
# Keep the unpublished tag on the commit that includes the synced lockfile.
|
||||
|
||||
@@ -42,7 +42,13 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0
|
||||
lfs: true
|
||||
- uses: pnpm/action-setup@v6
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v6
|
||||
with:
|
||||
# The workspace-wide Clippy run below builds the PyO3 bindings, whose
|
||||
# minimum supported interpreter is 3.11. Ubuntu 22.04 defaults to 3.10.
|
||||
python-version: "3.11"
|
||||
- uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6.1.1
|
||||
with:
|
||||
version: 11.1.1
|
||||
- uses: actions/setup-node@v6
|
||||
@@ -52,14 +58,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 +104,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 +116,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 +194,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 +202,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
|
||||
@@ -234,7 +240,8 @@ jobs:
|
||||
NODE_OPTIONS: "--experimental-vm-modules"
|
||||
run: node_modules/.bin/jest --verbose
|
||||
macos:
|
||||
timeout-minutes: 30
|
||||
# Cold native builds can take 28 minutes; reserve time for setup and Jest.
|
||||
timeout-minutes: 35
|
||||
# macos-15 ships a newer linker; the older macos-14 linker fails to insert
|
||||
# branch islands when the debug cdylib's __text section exceeds the 128 MB
|
||||
# AArch64 B/BL branch range.
|
||||
@@ -248,7 +255,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
|
||||
@@ -257,8 +264,12 @@ jobs:
|
||||
node-version: 24
|
||||
cache: 'pnpm'
|
||||
cache-dependency-path: nodejs/pnpm-lock.yaml
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
# Use the same pinned compiler for cache selection and the native build.
|
||||
- uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1.17.0
|
||||
with:
|
||||
cache: false
|
||||
rustflags: ""
|
||||
- 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:
|
||||
@@ -66,7 +66,8 @@ jobs:
|
||||
choco install --no-progress protoc
|
||||
rustup target add aarch64-pc-windows-msvc
|
||||
- target: x86_64-unknown-linux-gnu
|
||||
host: ubuntu-latest
|
||||
# Fat LTO reached 15.1 GiB before rustc was killed on the 15 GiB runner.
|
||||
host: ubuntu-2404-8x-x64
|
||||
features: fp16kernels
|
||||
# https://github.com/napi-rs/napi-rs/blob/main/debian.Dockerfile
|
||||
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian
|
||||
@@ -161,8 +162,12 @@ jobs:
|
||||
working-directory: nodejs
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- name: Enable long paths for Windows dependencies
|
||||
if: runner.os == 'Windows'
|
||||
# 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
|
||||
@@ -173,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
|
||||
@@ -189,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
|
||||
@@ -211,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 }}
|
||||
@@ -220,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 }}
|
||||
@@ -321,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
|
||||
@@ -347,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
|
||||
@@ -389,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:
|
||||
@@ -399,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"
|
||||
@@ -36,14 +36,15 @@ concurrency:
|
||||
jobs:
|
||||
linux:
|
||||
name: Python ${{ matrix.config.package_name }} ${{ matrix.config.platform }} manylinux${{ matrix.config.manylinux }}
|
||||
timeout-minutes: 60
|
||||
# ARM64 and compatibility release builds can exceed an hour with cold fat LTO.
|
||||
timeout-minutes: ${{ (matrix.config.platform == 'aarch64' || matrix.config.package_name == 'lancedb-compat') && 120 || 60 }}
|
||||
strategy:
|
||||
matrix:
|
||||
config:
|
||||
- platform: x86_64
|
||||
manylinux: "2_28"
|
||||
extra_args: "--features fp16kernels"
|
||||
runner: ubuntu-22.04
|
||||
runner: ubuntu-2404-8x-x64
|
||||
package_name: "lancedb"
|
||||
rustflags: ""
|
||||
# For successful fat LTO builds, we need a large runner to avoid OOM errors.
|
||||
@@ -63,7 +64,8 @@ jobs:
|
||||
- platform: x86_64
|
||||
manylinux: "2_28"
|
||||
extra_args: ""
|
||||
runner: ubuntu-22.04
|
||||
# Keep fat LTO on the same larger runner as the standard x64 wheel.
|
||||
runner: ubuntu-2404-8x-x64
|
||||
package_name: "lancedb-compat"
|
||||
rustflags: "-Ctarget-cpu=x86-64-v2"
|
||||
runs-on: ${{ matrix.config.runner }}
|
||||
@@ -75,7 +77,7 @@ jobs:
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v6
|
||||
with:
|
||||
python-version: "3.10"
|
||||
python-version: "3.11"
|
||||
- name: Add swap for Arm fat LTO
|
||||
if: matrix.config.platform == 'aarch64'
|
||||
shell: bash
|
||||
@@ -101,7 +103,8 @@ jobs:
|
||||
path: target/wheels/*.whl
|
||||
if-no-files-found: error
|
||||
mac:
|
||||
timeout-minutes: 90
|
||||
# Cold fat LTO was still compiling when the 90-minute limit was reached.
|
||||
timeout-minutes: 150
|
||||
runs-on: ${{ matrix.config.runner }}
|
||||
strategy:
|
||||
matrix:
|
||||
@@ -181,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
|
||||
@@ -308,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
|
||||
@@ -130,10 +130,11 @@ jobs:
|
||||
run: pytest --doctest-modules python/lancedb
|
||||
linux:
|
||||
name: "Linux: python-3.${{ matrix.python-minor-version }}"
|
||||
timeout-minutes: 30
|
||||
# A cold native build plus both test passes can exhaust 30 minutes.
|
||||
timeout-minutes: 60
|
||||
strategy:
|
||||
matrix:
|
||||
python-minor-version: ["10", "13"]
|
||||
python-minor-version: ["11", "13"]
|
||||
runs-on: "ubuntu-24.04"
|
||||
defaults:
|
||||
run:
|
||||
@@ -179,7 +180,8 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
features: ["default", "experimental-functions"]
|
||||
timeout-minutes: 30
|
||||
# A cold native build plus experimental-functions tests can exceed 30 minutes.
|
||||
timeout-minutes: 60
|
||||
runs-on: macos-15
|
||||
defaults:
|
||||
run:
|
||||
@@ -196,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
|
||||
@@ -234,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.
|
||||
@@ -266,10 +268,10 @@ jobs:
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v6
|
||||
with:
|
||||
python-version: "3.10"
|
||||
python-version: "3.11"
|
||||
# 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
|
||||
|
||||
+42
-25
@@ -14,6 +14,9 @@ on:
|
||||
- docs/web-tests/blob-v2/rs/**
|
||||
- nodejs/Cargo.toml
|
||||
- python/Cargo.toml
|
||||
- python/src/**
|
||||
- python/python/lancedb/exceptions.py
|
||||
- python/python/lancedb/remote/errors.py
|
||||
- ci/build_no_lock.py
|
||||
- ci/tests/test_build_no_lock.py
|
||||
- .github/actions/setup-protoc/**
|
||||
@@ -39,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: |
|
||||
@@ -105,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
|
||||
@@ -132,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
|
||||
|
||||
@@ -148,14 +151,16 @@ 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.
|
||||
cache: false
|
||||
# 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
|
||||
@@ -203,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
|
||||
@@ -213,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
|
||||
@@ -237,11 +242,11 @@ jobs:
|
||||
sudo mkswap "$swapfile"
|
||||
sudo swapon "$swapfile"
|
||||
- name: Build
|
||||
run: cargo build --profile ci --all-features --tests --locked --examples
|
||||
run: cargo build --profile ci -p lancedb --all-features --tests --locked --examples
|
||||
- name: Run feature tests
|
||||
run: CARGO_ARGS="--profile ci" make -C ./lancedb feature-tests
|
||||
- name: Run examples
|
||||
run: cargo run --profile ci --all-features --example simple --locked
|
||||
run: cargo run --profile ci -p lancedb --all-features --example simple --locked
|
||||
- name: Run blob v2 docs example
|
||||
# Python and TypeScript blob docs tests install preview packages.
|
||||
# Those builds are not guaranteed to remain available for more than
|
||||
@@ -275,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.
|
||||
@@ -285,17 +290,17 @@ jobs:
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install -y protobuf-compiler libssl-dev
|
||||
- uses: rui314/setup-mold@v1
|
||||
- name: Test the default local Functions gate
|
||||
run: cargo test --profile ci -p lancedb --features remote --test experimental_functions --locked
|
||||
- uses: rui314/setup-mold@339e96b4ff1f3bd865856ba4cbbe8818a7acb038 # v1
|
||||
- name: Run remote tests
|
||||
run: CARGO_ARGS="--profile ci" make -C ./lancedb remote-tests
|
||||
|
||||
macos:
|
||||
name: ${{ matrix.phase == 'tests' && format('macos ({0})', matrix.mac-runner) || format('macos-doc ({0})', matrix.mac-runner) }}
|
||||
timeout-minutes: 60
|
||||
strategy:
|
||||
matrix:
|
||||
mac-runner: ["macos-15", "macos-26"]
|
||||
phase: [tests, doc]
|
||||
runs-on: "${{ matrix.mac-runner }}"
|
||||
defaults:
|
||||
run:
|
||||
@@ -306,10 +311,16 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0
|
||||
lfs: true
|
||||
- uses: actions/setup-python@v6
|
||||
id: python
|
||||
with:
|
||||
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 }}
|
||||
# Restore everywhere, but only save from main. Per-PR saves are
|
||||
# unreadable outside their own branch anyway, since GitHub scopes
|
||||
# caches to the creating ref.
|
||||
@@ -317,16 +328,18 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: brew install protobuf
|
||||
- name: Run tests
|
||||
env:
|
||||
PYO3_PYTHON: ${{ steps.python.outputs.python-path }}
|
||||
CARGO_TEST_TARGETS: ${{ matrix.phase == 'doc' && '--doc' || '--lib --tests' }}
|
||||
run: |
|
||||
# Don't run the s3 integration tests since docker isn't available
|
||||
# on this image.
|
||||
ALL_FEATURES=`cargo metadata --format-version=1 --no-deps \
|
||||
| jq -r '.packages[] | .features | keys | .[]' \
|
||||
| grep -v s3-test | sort | uniq | paste -s -d "," -`
|
||||
# Run doctests before test binaries fill the runner disk. Examples are
|
||||
# already built by the Linux job, so avoid retaining them here.
|
||||
cargo test --profile ci --features $ALL_FEATURES --locked --doc
|
||||
cargo test --profile ci --features $ALL_FEATURES --locked --lib --tests
|
||||
# Separate jobs give each phase its own time and disk budget. Examples
|
||||
# are already built by the Linux job, so avoid retaining them here.
|
||||
cargo test --profile ci --features $ALL_FEATURES --locked $CARGO_TEST_TARGETS
|
||||
|
||||
windows:
|
||||
strategy:
|
||||
@@ -341,9 +354,11 @@ jobs:
|
||||
working-directory: rust/lancedb
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- name: Enable long paths for Lance dependencies
|
||||
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
|
||||
@@ -378,9 +393,11 @@ jobs:
|
||||
working-directory: rust/lancedb
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- name: Enable long paths for Lance dependencies
|
||||
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
|
||||
@@ -406,7 +423,7 @@ jobs:
|
||||
runs-on: ubuntu-24.04
|
||||
strategy:
|
||||
matrix:
|
||||
msrv: ["1.95.0"] # This should match up with rust-version in Cargo.toml
|
||||
msrv: ["1.98.0"] # This should match up with rust-version in Cargo.toml
|
||||
env:
|
||||
# Need up-to-date compilers for kernels
|
||||
CC: clang-18
|
||||
@@ -420,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
+877
-659
File diff suppressed because it is too large
Load Diff
+17
-18
@@ -16,24 +16,24 @@ repository = "https://github.com/lancedb/lancedb"
|
||||
description = "Serverless, low-latency vector database for AI applications"
|
||||
keywords = ["lancedb", "lance", "database", "vector", "search"]
|
||||
categories = ["database-implementations"]
|
||||
rust-version = "1.95.0"
|
||||
rust-version = "1.98.0"
|
||||
|
||||
[workspace.dependencies]
|
||||
lance = { "version" = "=15.0.0-beta.9", default-features = false, "tag" = "v15.0.0-beta.9", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-core = { "version" = "=15.0.0-beta.9", "tag" = "v15.0.0-beta.9", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-datagen = { "version" = "=15.0.0-beta.9", "tag" = "v15.0.0-beta.9", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-file = { "version" = "=15.0.0-beta.9", "tag" = "v15.0.0-beta.9", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-io = { "version" = "=15.0.0-beta.9", default-features = false, "tag" = "v15.0.0-beta.9", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-index = { "version" = "=15.0.0-beta.9", "tag" = "v15.0.0-beta.9", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-jsonb = { "version" = "=15.0.0-beta.9", "tag" = "v15.0.0-beta.9", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-linalg = { "version" = "=15.0.0-beta.9", "tag" = "v15.0.0-beta.9", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-namespace = { "version" = "=15.0.0-beta.9", "tag" = "v15.0.0-beta.9", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-namespace-impls = { "version" = "=15.0.0-beta.9", default-features = false, "tag" = "v15.0.0-beta.9", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-table = { "version" = "=15.0.0-beta.9", "tag" = "v15.0.0-beta.9", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-testing = { "version" = "=15.0.0-beta.9", "tag" = "v15.0.0-beta.9", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-datafusion = { "version" = "=15.0.0-beta.9", "tag" = "v15.0.0-beta.9", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-encoding = { "version" = "=15.0.0-beta.9", "tag" = "v15.0.0-beta.9", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-arrow = { "version" = "=15.0.0-beta.9", "tag" = "v15.0.0-beta.9", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance = { "version" = "=16.0.0-beta.4", default-features = false, "tag" = "v16.0.0-beta.4", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-core = { "version" = "=16.0.0-beta.4", "tag" = "v16.0.0-beta.4", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-datagen = { "version" = "=16.0.0-beta.4", "tag" = "v16.0.0-beta.4", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-file = { "version" = "=16.0.0-beta.4", "tag" = "v16.0.0-beta.4", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-io = { "version" = "=16.0.0-beta.4", default-features = false, "tag" = "v16.0.0-beta.4", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-index = { "version" = "=16.0.0-beta.4", "tag" = "v16.0.0-beta.4", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-jsonb = { "version" = "=16.0.0-beta.4", "tag" = "v16.0.0-beta.4", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-linalg = { "version" = "=16.0.0-beta.4", "tag" = "v16.0.0-beta.4", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-namespace = { "version" = "=16.0.0-beta.4", "tag" = "v16.0.0-beta.4", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-namespace-impls = { "version" = "=16.0.0-beta.4", default-features = false, "tag" = "v16.0.0-beta.4", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-table = { "version" = "=16.0.0-beta.4", "tag" = "v16.0.0-beta.4", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-testing = { "version" = "=16.0.0-beta.4", "tag" = "v16.0.0-beta.4", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-datafusion = { "version" = "=16.0.0-beta.4", "tag" = "v16.0.0-beta.4", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-encoding = { "version" = "=16.0.0-beta.4", "tag" = "v16.0.0-beta.4", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-arrow = { "version" = "=16.0.0-beta.4", "tag" = "v16.0.0-beta.4", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lancedb = { path = "rust/lancedb", default-features = false }
|
||||
ahash = "0.8"
|
||||
anyhow = "1"
|
||||
@@ -49,8 +49,7 @@ arrow-select = "59.2.0"
|
||||
arrow-cast = "59.2.0"
|
||||
arrow-flight = { version = "59.2.0", features = ["flight-sql-experimental"] }
|
||||
async-trait = "0"
|
||||
# Smithy JSON 0.63 requires the pre-1.7 Document representation; allow the MSRV pin.
|
||||
aws-smithy-types = ">=1.3.6, <1.7"
|
||||
aws-smithy-types = "1.9.1"
|
||||
base64 = "0.22"
|
||||
bytes = "1"
|
||||
datafusion = { version = "55.0.0", default-features = false }
|
||||
|
||||
@@ -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,88 @@
|
||||
"""Build lancedb-tools wheels from a complete, checksummed CLI release."""
|
||||
|
||||
import argparse
|
||||
import re
|
||||
import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
import tarfile
|
||||
import tempfile
|
||||
from pathlib import Path
|
||||
|
||||
from ci.package_cli import NOTICES, archive_stem, verify_checksums
|
||||
|
||||
PLATFORMS = {
|
||||
"aarch64-apple-darwin": "macosx_14_0_arm64",
|
||||
"aarch64-unknown-linux-gnu": "manylinux_2_28_aarch64",
|
||||
"x86_64-unknown-linux-gnu": "manylinux_2_28_x86_64",
|
||||
}
|
||||
|
||||
|
||||
def build_wheels(tag: str, archives: Path, output: Path):
|
||||
if not re.fullmatch(r"v[0-9]+\.[0-9]+\.[0-9]+(?:-beta\.[0-9]+)?", tag):
|
||||
raise ValueError(f"Expected a stable or beta CLI release tag, got {tag!r}")
|
||||
version = tag[1:]
|
||||
wheel_version = version.replace("-beta.", "b")
|
||||
verify_checksums(archives, version)
|
||||
output.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
for target, platform in PLATFORMS.items():
|
||||
stem = archive_stem(version, target)
|
||||
with tempfile.TemporaryDirectory(dir=output) as tmp:
|
||||
stage = Path(tmp)
|
||||
with tarfile.open(archives / f"{stem}.tar.gz", "r:gz") as archive:
|
||||
archive.extractall(stage, filter="data")
|
||||
root = stage / "wheel"
|
||||
package = root / "lancedb_tools"
|
||||
package.mkdir(parents=True)
|
||||
(stage / stem / "lancedb").rename(package / "lancedb")
|
||||
shutil.copyfile(
|
||||
Path(__file__).parent / "cli_wheel/launcher.py", package / "__init__.py"
|
||||
)
|
||||
|
||||
info = root / f"lancedb_tools-{wheel_version}.dist-info"
|
||||
licenses = info / "licenses"
|
||||
licenses.mkdir(parents=True)
|
||||
for notice in NOTICES:
|
||||
(stage / stem / notice).rename(licenses / notice)
|
||||
(info / "METADATA").write_text(
|
||||
"Metadata-Version: 2.4\n"
|
||||
"Name: lancedb-tools\n"
|
||||
f"Version: {wheel_version}\n"
|
||||
"Summary: Command-line client for LanceDB SQL, profiles, and authentication\n"
|
||||
"Requires-Python: >=3.8\n"
|
||||
"License-Expression: Apache-2.0\n"
|
||||
+ "".join(f"License-File: {notice}\n" for notice in NOTICES)
|
||||
+ "Project-URL: Source, https://github.com/lancedb/lancedb\n"
|
||||
"Description-Content-Type: text/plain\n\n"
|
||||
"Run LanceDB SQL, manage connection profiles, and authenticate to a deployment.\n"
|
||||
"Use pipx install lancedb-tools or uvx --from lancedb-tools lancedb --help.\n"
|
||||
"Supports Apple Silicon on macOS 14+ and Linux ARM64 or x86-64 with glibc 2.28+.\n"
|
||||
"Linux x86-64 requires AVX2, FMA, and F16C.\n"
|
||||
)
|
||||
(info / "WHEEL").write_text(
|
||||
"Wheel-Version: 1.0\nGenerator: ci.build_cli_wheels\n"
|
||||
f"Root-Is-Purelib: false\nTag: py3-none-{platform}\n"
|
||||
)
|
||||
(info / "entry_points.txt").write_text(
|
||||
"[console_scripts]\nlancedb = lancedb_tools:main\n"
|
||||
)
|
||||
subprocess.run(
|
||||
[sys.executable, "-m", "wheel", "pack", str(root), "-d", str(stage)],
|
||||
check=True,
|
||||
)
|
||||
(wheel,) = stage.glob("*.whl")
|
||||
wheel.replace(output / wheel.name)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
parser = argparse.ArgumentParser(description=__doc__)
|
||||
parser.add_argument("tag")
|
||||
parser.add_argument(
|
||||
"archives",
|
||||
type=Path,
|
||||
help="Directory with the three release archives and SHA256SUMS",
|
||||
)
|
||||
parser.add_argument("output", type=Path)
|
||||
args = parser.parse_args()
|
||||
build_wheels(args.tag, args.archives, args.output)
|
||||
+2
-1
@@ -54,6 +54,7 @@ def main() -> int:
|
||||
["cargo", "metadata", "--format-version=1", "--no-deps", "--all-features"],
|
||||
stdout=subprocess.PIPE,
|
||||
text=True,
|
||||
check=False,
|
||||
)
|
||||
if metadata.returncode:
|
||||
return metadata.returncode
|
||||
@@ -68,7 +69,7 @@ def main() -> int:
|
||||
"--tests",
|
||||
# Bound simultaneous compiler/linker temporary outputs as well as retained files.
|
||||
"--jobs",
|
||||
"1",
|
||||
"2",
|
||||
"--message-format=json,json-diagnostic-rendered-ansi",
|
||||
]
|
||||
cleanup_failed = False
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
"""Console entry point for the bundled LanceDB CLI."""
|
||||
|
||||
import os
|
||||
import platform
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
def main():
|
||||
if sys.platform == "linux" and platform.machine() == "x86_64":
|
||||
# manylinux tags describe glibc and architecture, not CPU extensions.
|
||||
with open("/proc/cpuinfo") as cpuinfo:
|
||||
flags = next(
|
||||
(line.split() for line in cpuinfo if line.startswith("flags")), []
|
||||
)
|
||||
if not {"avx2", "fma", "f16c"}.issubset(flags):
|
||||
sys.exit("The LanceDB Linux x86-64 binary requires AVX2, FMA, and F16C.")
|
||||
|
||||
executable = Path(__file__).with_name("lancedb")
|
||||
os.execv(executable, [str(executable), *sys.argv[1:]])
|
||||
@@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env bash
|
||||
# Exercise resolver platform selection and both tools' installed entry points.
|
||||
set -euo pipefail
|
||||
|
||||
tag=${1:?pass the CLI release tag}
|
||||
wheels=${2:?pass the absolute wheel directory}
|
||||
version=${tag#v}
|
||||
spec="lancedb-tools==${version/-beta./b}"
|
||||
test_env=$(mktemp -d)
|
||||
trap 'rm -rf "$test_env"' EXIT
|
||||
export XDG_CONFIG_HOME="$test_env/config" UV_CACHE_DIR="$test_env/uv"
|
||||
export XDG_STATE_HOME="$test_env/state" XDG_DATA_HOME="$test_env/data"
|
||||
export PIPX_HOME="$test_env/pipx" PIPX_BIN_DIR="$test_env/bin"
|
||||
export PIPX_SHARED_LIBS="$test_env/shared" PIPX_MAN_DIR="$test_env/man"
|
||||
|
||||
check_cli() {
|
||||
"$@" --version | grep -Fx "lancedb $version"
|
||||
"$@" profile list | grep -w local
|
||||
}
|
||||
|
||||
check_cli uvx --no-index --find-links "$wheels" --from "$spec" lancedb
|
||||
python -m pip download --no-index --find-links "$wheels" --dest "$test_env/native" "$spec"
|
||||
pipx install --backend pip "$test_env/native/"*.whl
|
||||
check_cli "$PIPX_BIN_DIR/lancedb"
|
||||
@@ -88,9 +88,11 @@ class BuildNoLockTest(unittest.TestCase):
|
||||
self.assertTrue((target / "fixture_cli").is_file())
|
||||
# Cargo guarantees this binary for test execution, not compile-time reads.
|
||||
subprocess.run([str(target / "fixture_cli")], check=True)
|
||||
self.assertTrue(list((target / "deps").glob("libartifact_fixture*.rlib")))
|
||||
self.assertTrue(list((target / "build").glob("*/build-script-build")))
|
||||
self.assertTrue(list((target / "build").glob("*/out/generated.rs")))
|
||||
# Cargo 1.100 nests compiler inputs in per-unit build directories and
|
||||
# names the build-script executable build_script_build.
|
||||
self.assertTrue(list(target.rglob("libartifact_fixture*.rlib")))
|
||||
self.assertTrue(list((target / "build").rglob("build[-_]script[-_]build")))
|
||||
self.assertTrue(list((target / "build").rglob("out/generated.rs")))
|
||||
|
||||
def test_link_failure_preserves_cargo_status_and_diagnostic(self):
|
||||
with tempfile.TemporaryDirectory(prefix=".no-lock-", dir=SCRIPT.parent) as temp:
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
#!/usr/bin/env bash
|
||||
# Run from the repository root with bump-my-version and packaging installed.
|
||||
set -euo pipefail
|
||||
|
||||
work=$(mktemp -d)
|
||||
trap 'rm -rf "$work"' EXIT
|
||||
mkdir -p "$work/repo" "$work/bin"
|
||||
|
||||
# Release tagging must still include Java's versions when Maven cannot update them.
|
||||
cat > "$work/bin/mvn" <<'MOCK'
|
||||
#!/bin/sh
|
||||
echo "Unable to run Maven versions plugin" >&2
|
||||
exit 1
|
||||
MOCK
|
||||
chmod +x "$work/bin/mvn"
|
||||
export PATH="$work/bin:$PATH"
|
||||
|
||||
git ls-files -z .bumpversion.toml ci/bump_version.sh ci/semver_sort.py \
|
||||
nodejs/package.json 'nodejs/npm/*/package.json' nodejs/Cargo.toml \
|
||||
rust/lancedb/Cargo.toml rust/lancedb/cli/Cargo.toml python/Cargo.toml \
|
||||
docs/src/java/java.md java/pom.xml java/lancedb-core/pom.xml |
|
||||
tar --null -T - -cf - | tar -xf - -C "$work/repo"
|
||||
cd "$work/repo"
|
||||
|
||||
# The breaking-change check needs GitHub access and runs after the release tag is set.
|
||||
printf 'pass\n' > ci/check_breaking_changes.py
|
||||
git init --quiet
|
||||
git config user.name "Release test"
|
||||
git config user.email "release-test@example.com"
|
||||
git add .
|
||||
git commit --quiet --message "Release baseline"
|
||||
git tag v0.0.0
|
||||
|
||||
current_version=$(python -c 'import tomllib; print(tomllib.load(open(".bumpversion.toml", "rb"))["tool"]["bumpversion"]["current_version"])')
|
||||
git tag "v$current_version"
|
||||
|
||||
# Verify the current baseline before bumping; stale Java POMs must fail.
|
||||
python - "$current_version" <<'PY'
|
||||
import sys
|
||||
import xml.etree.ElementTree as ET
|
||||
|
||||
expected = sys.argv[1]
|
||||
ns = {"m": "http://maven.apache.org/POM/4.0.0"}
|
||||
for path, xpath in (
|
||||
("java/pom.xml", "m:version"),
|
||||
("java/lancedb-core/pom.xml", "m:parent/m:version"),
|
||||
):
|
||||
actual = ET.parse(path).getroot().findtext(xpath, namespaces=ns)
|
||||
if actual != expected:
|
||||
raise SystemExit(f"Java baseline mismatch in {path}: expected {expected}, got {actual}")
|
||||
print(f"Java baseline matches {expected} in both POMs")
|
||||
PY
|
||||
|
||||
check_java_release() {
|
||||
local release_type=$1
|
||||
local expected_version=$2
|
||||
bash ci/bump_version.sh "$release_type" false > "$work/bump.log" 2>&1 || {
|
||||
cat "$work/bump.log"
|
||||
return 1
|
||||
}
|
||||
python - "$release_type" "$expected_version" <<'PY'
|
||||
import subprocess
|
||||
import sys
|
||||
import xml.etree.ElementTree as ET
|
||||
|
||||
release_type, expected_version = sys.argv[1:]
|
||||
case = f"test_java_release_version_matches_tag ({release_type})"
|
||||
tag = subprocess.check_output(["git", "describe", "--tags", "--exact-match", "HEAD"], text=True).strip()
|
||||
assert tag == f"v{expected_version}", f"{case}: expected v{expected_version}, got {tag}"
|
||||
namespace = {"m": "http://maven.apache.org/POM/4.0.0"}
|
||||
for path, version_path in (
|
||||
("java/pom.xml", "m:version"),
|
||||
("java/lancedb-core/pom.xml", "m:parent/m:version"),
|
||||
):
|
||||
content = subprocess.check_output(["git", "show", f"{tag}:{path}"])
|
||||
version = ET.fromstring(content).findtext(version_path, namespaces=namespace)
|
||||
assert version == expected_version, f"{case}: {path}: expected {expected_version}, got {version}"
|
||||
print(f"{case}: passed")
|
||||
PY
|
||||
}
|
||||
|
||||
case "$current_version" in
|
||||
*-beta.*)
|
||||
preview_version="${current_version%.*}.$((${current_version##*.} + 1))"
|
||||
;;
|
||||
*)
|
||||
preview_version="${current_version%.*}.$((${current_version##*.} + 1))-beta.0"
|
||||
;;
|
||||
esac
|
||||
check_java_release preview "$preview_version"
|
||||
check_java_release stable "${preview_version%-beta.*}"
|
||||
@@ -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'
|
||||
@@ -27,7 +27,7 @@ class TestExtractSdkDocLinks(unittest.TestCase):
|
||||
urls,
|
||||
)
|
||||
self.assertIn(
|
||||
"https://docs.lancedb.com/enterprise",
|
||||
"https://docs.lancedb.com/basics/embedded-vs-enterprise",
|
||||
urls,
|
||||
)
|
||||
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
import unittest
|
||||
|
||||
from ci.update_homebrew_formula import update_formula
|
||||
|
||||
|
||||
class HomebrewFormulaTest(unittest.TestCase):
|
||||
targets = [
|
||||
"aarch64-apple-darwin",
|
||||
"x86_64-unknown-linux-gnu",
|
||||
"aarch64-unknown-linux-gnu",
|
||||
]
|
||||
tag = "v0.42.10"
|
||||
|
||||
def setUp(self):
|
||||
self.formula = ' version "0.42.10-beta.26"\n'
|
||||
self.manifest = ""
|
||||
for index, target in enumerate(self.targets, start=1):
|
||||
self.formula += f' url "#{{archive}}-{target}.tar.gz"\n'
|
||||
self.formula += f' sha256 "{"0" * 64}"\n'
|
||||
entry = f"{str(index) * 64} lancedb-{self.tag}-{target}.tar.gz\n"
|
||||
self.manifest = entry + self.manifest
|
||||
self.formula += ' desc "Command-line client for LanceDB"\n'
|
||||
|
||||
def test_updates_each_platform_and_preserves_rest_of_formula(self):
|
||||
result = update_formula(self.formula, self.tag, self.manifest)
|
||||
expected = self.formula.replace("0.42.10-beta.26", "0.42.10")
|
||||
for index in range(1, 4):
|
||||
expected = expected.replace("0" * 64, str(index) * 64, 1)
|
||||
self.assertEqual(result, expected)
|
||||
self.assertEqual(update_formula(result, self.tag, self.manifest), result)
|
||||
|
||||
def test_retry_of_older_release_cannot_downgrade_the_tap(self):
|
||||
formula = self.formula.replace("0.42.10-beta.26", "0.43.0")
|
||||
self.assertEqual(update_formula(formula, self.tag, self.manifest), formula)
|
||||
|
||||
def test_rejects_prereleases_and_incomplete_or_ambiguous_inputs(self):
|
||||
with self.assertRaisesRegex(ValueError, "stable CLI release tag"):
|
||||
update_formula(self.formula, "v0.42.10-beta.26", self.manifest)
|
||||
for manifest in (
|
||||
self.manifest.split("\n", 1)[1],
|
||||
self.manifest + self.manifest,
|
||||
self.manifest.replace("v0.42.10", "v0.42.9"),
|
||||
self.manifest.replace("1" * 64, "invalid"),
|
||||
):
|
||||
with self.subTest(manifest=manifest), self.assertRaises(ValueError):
|
||||
update_formula(self.formula, self.tag, manifest)
|
||||
for formula in (
|
||||
self.formula.replace("aarch64-apple-darwin", "unexpected-target"),
|
||||
self.formula + self.formula,
|
||||
):
|
||||
with self.subTest(formula=formula), self.assertRaises(ValueError):
|
||||
update_formula(formula, self.tag, self.manifest)
|
||||
@@ -0,0 +1,65 @@
|
||||
"""Update the tap formula from a stable CLI release's SHA256SUMS."""
|
||||
|
||||
import argparse
|
||||
from pathlib import Path
|
||||
import re
|
||||
|
||||
from ci.package_cli import TARGETS, archive_stem
|
||||
|
||||
|
||||
def update_formula(formula: str, tag: str, manifest: str) -> str:
|
||||
stable_version = r"[0-9]+\.[0-9]+\.[0-9]+"
|
||||
if not re.fullmatch(f"v{stable_version}", tag):
|
||||
raise ValueError(f"Expected a stable CLI release tag, got {tag!r}")
|
||||
version = tag[1:]
|
||||
|
||||
version_line = rf'^ version "({stable_version})(?:-beta\.[0-9]+)?"$'
|
||||
current = re.findall(version_line, formula, re.MULTILINE)
|
||||
if len(current) != 1:
|
||||
raise ValueError("Expected one CLI version declaration in the tap formula")
|
||||
if tuple(map(int, current[0].split("."))) > tuple(map(int, version.split("."))):
|
||||
# A maintainer may be retrying an older release after a newer tap PR merged.
|
||||
return formula
|
||||
|
||||
archives = {}
|
||||
for line in manifest.splitlines():
|
||||
entry = re.fullmatch(r"([0-9a-f]{64}) (\S+)", line)
|
||||
if not entry or entry[2] in archives:
|
||||
raise ValueError(f"Invalid or duplicate entry in SHA256SUMS: {line!r}")
|
||||
archives[entry[2]] = entry[1]
|
||||
|
||||
filenames = {t: f"{archive_stem(version, t)}.tar.gz" for t in TARGETS}
|
||||
if archives.keys() != set(filenames.values()):
|
||||
raise ValueError(f"Expected SHA256SUMS for exactly the CLI archives for {tag}")
|
||||
|
||||
updated = re.sub(
|
||||
version_line, f' version "{version}"', formula, flags=re.MULTILINE
|
||||
)
|
||||
for target, filename in filenames.items():
|
||||
# Match the URL and its following checksum together; platform order can change.
|
||||
url = re.escape(f'url "#{{archive}}-{target}.tar.gz"')
|
||||
pattern = rf'^([ \t]+{url}\n[ \t]+sha256 ")[0-9a-f]{{64}}"$'
|
||||
updated, count = re.subn(
|
||||
pattern, rf'\g<1>{archives[filename]}"', updated, flags=re.MULTILINE
|
||||
)
|
||||
if count != 1:
|
||||
raise ValueError(
|
||||
f"Expected one URL and checksum for {target} in the formula"
|
||||
)
|
||||
return updated
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description=__doc__)
|
||||
parser.add_argument("tag")
|
||||
parser.add_argument("checksums", type=Path)
|
||||
parser.add_argument("formula", type=Path)
|
||||
args = parser.parse_args()
|
||||
original = args.formula.read_text()
|
||||
updated = update_formula(original, args.tag, args.checksums.read_text())
|
||||
if updated != original:
|
||||
args.formula.write_text(updated)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -131,6 +131,32 @@ ignore = [
|
||||
{ id = "RUSTSEC-2026-0391", reason = "zstd 0.13 via arrow-ipc 58; affected with_context API is unused" },
|
||||
{ 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, removed 2026-11-17 after
|
||||
# the lockfile dropped the aws-smithy pins that carried it.
|
||||
# https://rustsec.org/advisories/RUSTSEC-2026-0441
|
||||
|
||||
# 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 */}
|
||||
```
|
||||
+2
-2
@@ -72,11 +72,11 @@ plugins:
|
||||
separate_signature: true
|
||||
filters:
|
||||
- "!^_"
|
||||
import:
|
||||
inventories:
|
||||
# for cross references
|
||||
- https://arrow.apache.org/docs/objects.inv
|
||||
- https://pandas.pydata.org/docs/objects.inv
|
||||
- https://docs.pydantic.dev/latest/objects.inv
|
||||
- https://pydantic.dev/docs/validation/latest/objects.inv
|
||||
- render_swagger:
|
||||
allow_arbitrary_locations: true
|
||||
# - redirects:
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
mkdocs==1.6.1
|
||||
mkdocs-jupyter==0.24.1
|
||||
mkdocs-material==9.6.23
|
||||
mkdocs-autorefs>=0.5,<=1.0
|
||||
mkdocstrings[python]>=0.24,<1.0
|
||||
griffe>=0.40,<1.0
|
||||
mkdocs-material==9.8.2
|
||||
mkdocs-autorefs>=1.4
|
||||
mkdocstrings[python]>=1.0.7,<2
|
||||
pymdown-extensions>=11.0.1
|
||||
mkdocs-render-swagger-plugin>=0.1.0
|
||||
pydantic>=2.7.4,<3
|
||||
mkdocs-redirects>=1.2.0
|
||||
|
||||
@@ -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.4</version>
|
||||
<version>0.42.0-beta.37</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,94 @@ using an underlying bitmap index.
|
||||
#### Returns
|
||||
|
||||
[`Index`](Index.md)
|
||||
|
||||
***
|
||||
|
||||
### plugin()
|
||||
|
||||
```ts
|
||||
static plugin(indexType, params?): Index
|
||||
```
|
||||
|
||||
Create a scalar index of a type recognized by a registered database plugin.
|
||||
|
||||
Use this for index types without a dedicated factory on `Index`.
|
||||
Prefer a dedicated factory when one is available.
|
||||
|
||||
An unknown plugin name or invalid parameters cause `createIndex` to fail.
|
||||
|
||||
#### Parameters
|
||||
|
||||
* **indexType**: `string`
|
||||
The index type, case-insensitive.
|
||||
Surrounding whitespace is ignored. Must not be empty.
|
||||
|
||||
* **params?**: `string` \| `Record`<`string`, `unknown`>
|
||||
The index parameters, as an object or as a string
|
||||
holding a JSON object. They are passed as given. Each plugin defines
|
||||
its parameters and defaults; refer to the plugin's documentation
|
||||
for guidance.
|
||||
|
||||
#### Returns
|
||||
|
||||
[`Index`](Index.md)
|
||||
|
||||
#### Throws
|
||||
|
||||
If `indexType` is empty, or `params` is not a JSON object.
|
||||
|
||||
#### Example
|
||||
|
||||
```ts
|
||||
await table.createIndex("id", {
|
||||
config: Index.plugin("bloomfilter", { number_of_items: 4096 }),
|
||||
});
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### 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)>
|
||||
|
||||
+652
-31
@@ -272,6 +272,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
|
||||
@@ -309,6 +341,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
|
||||
@@ -427,7 +493,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.
|
||||
@@ -448,7 +514,7 @@ account for the replacement caveat described in [Table.createIndex](Table.md#cre
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`Job`](Job.md)>
|
||||
`Promise`<[`Job`](Job.md)<`void`>>
|
||||
|
||||
***
|
||||
|
||||
@@ -490,6 +556,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
|
||||
@@ -623,6 +736,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
|
||||
@@ -654,6 +819,48 @@ tables; no partial handles are returned.
|
||||
|
||||
***
|
||||
|
||||
### fetchBlobRanges()
|
||||
|
||||
```ts
|
||||
abstract fetchBlobRanges(
|
||||
column,
|
||||
requests,
|
||||
options?): Promise<(null | Buffer)[]>
|
||||
```
|
||||
|
||||
Materializes row-specific byte ranges at the table's current checkout.
|
||||
Preserves request order, duplicates, and nulls. Zero length returns an empty
|
||||
buffer for a non-null blob. Invalid ranges or missing rows reject the entire
|
||||
call. See [Table.fetchBlobs](Table.md#fetchblobs) for row-ID validity across versions.
|
||||
|
||||
Remote tables use the batched endpoint when the server advertises support,
|
||||
splitting at 1024 ranges and 64 MiB, including individual larger ranges.
|
||||
Older servers use descriptor queries and BlobFile range reads. Both protocols
|
||||
use one exact branch and version. Errors from an advertised endpoint propagate
|
||||
without switching protocols. All output bytes occupy memory.
|
||||
|
||||
#### Parameters
|
||||
|
||||
* **column**: `string`
|
||||
|
||||
* **requests**: readonly [`BlobRangeRequest`](../type-aliases/BlobRangeRequest.md)[]
|
||||
|
||||
* **options?**: [`BlobReadOptions`](../type-aliases/BlobReadOptions.md)
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<(`null` \| `Buffer`)[]>
|
||||
|
||||
#### Example
|
||||
|
||||
```ts
|
||||
const bytes = await table.fetchBlobRanges("image", [
|
||||
{ rowId: 10n, offset: 0n, length: 1024n },
|
||||
]);
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### fetchBlobs()
|
||||
|
||||
```ts
|
||||
@@ -708,41 +915,122 @@ so this is safe to call repeatedly.
|
||||
|
||||
***
|
||||
|
||||
### functionColumnStatus()
|
||||
|
||||
```ts
|
||||
abstract functionColumnStatus(column): Promise<FunctionColumnStatus>
|
||||
```
|
||||
|
||||
Return exact freshness status for one Function-backed output column.
|
||||
|
||||
#### Parameters
|
||||
|
||||
* **column**: `string`
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`FunctionColumnStatus`](../interfaces/FunctionColumnStatus.md)>
|
||||
|
||||
***
|
||||
|
||||
### functionColumnStatuses()
|
||||
|
||||
```ts
|
||||
abstract functionColumnStatuses(column?): Promise<FunctionColumnStatus[]>
|
||||
```
|
||||
|
||||
Return exact freshness status for Function-backed output columns.
|
||||
|
||||
All results describe one server table version. Omit `column` for every
|
||||
Function output. Rows already failed remain visible and do not prevent
|
||||
`waitFresh` from completing. A handle pinned to an exact version requests
|
||||
that version; a latest handle retains normal read-freshness behavior.
|
||||
|
||||
#### Parameters
|
||||
|
||||
* **column?**: `string`
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`FunctionColumnStatus`](../interfaces/FunctionColumnStatus.md)[]>
|
||||
|
||||
***
|
||||
|
||||
### functionErrorRows()
|
||||
|
||||
```ts
|
||||
functionErrorRows(options?): Promise<FunctionFailedRow[]>
|
||||
```
|
||||
|
||||
Read current failing inputs, one result per error record.
|
||||
Requires a complete LanceDB Enterprise workflow version 1 listing with
|
||||
row identities. Throws if a failed row is no longer addressable in the
|
||||
table's read snapshot. For materialized views, see the source identities
|
||||
on each error record returned by [Table#functionErrors](Table.md#functionerrors).
|
||||
|
||||
#### Parameters
|
||||
|
||||
* **options?**: [`FunctionErrorRowsOptions`](../interfaces/FunctionErrorRowsOptions.md)
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`FunctionFailedRow`](../interfaces/FunctionFailedRow.md)[]>
|
||||
|
||||
***
|
||||
|
||||
### functionErrors()
|
||||
|
||||
```ts
|
||||
abstract functionErrors(options?): Promise<FunctionErrors>
|
||||
```
|
||||
|
||||
The per-row errors Function refreshes recorded on this table.
|
||||
List the per-row errors recorded by Function refreshes on this table.
|
||||
|
||||
A refresh running under a skip policy records each row it skipped with
|
||||
the input that failed and the error. This lists those records, newest
|
||||
job first, plus a summary for any fragment whose per-row detail was
|
||||
capped. LanceDB Enterprise only; reading errors needs read
|
||||
access to the table, since a message carries the value that failed.
|
||||
On LanceDB Enterprise with workflow version 1 or later, the default
|
||||
lists current failures. Set `history: true` to include retained attempts
|
||||
for repaired rows. Older deployments keep their existing default listing.
|
||||
Reading errors requires table read access because messages can include the
|
||||
input that failed. `errorGroups` describes the returned records.
|
||||
|
||||
#### Parameters
|
||||
|
||||
* **options?**: [`FunctionErrorsOptions`](../interfaces/FunctionErrorsOptions.md)
|
||||
Optional filters: `jobId`,
|
||||
`column`, and `limit` (server default 10000, cap 100000).
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`FunctionErrors`](../interfaces/FunctionErrors.md)>
|
||||
|
||||
The records, the capped fragments,
|
||||
and whether the listing stopped at its limit.
|
||||
|
||||
#### Example
|
||||
|
||||
```ts
|
||||
const { records, truncated } = await table.functionErrors({ column: "embedding" });
|
||||
const errors = await table.functionErrors({ column: "embedding" });
|
||||
console.log(errors.records, errors.errorGroups);
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### functionProvenance()
|
||||
|
||||
```ts
|
||||
functionProvenance(_column, _options?): Promise<FunctionProvenance>
|
||||
```
|
||||
|
||||
Read the producing Function version and job for each returned value.
|
||||
Check `truncated` before treating the result as a complete listing.
|
||||
Requires LanceDB Enterprise Function failure workflow version 1 or later.
|
||||
|
||||
#### Parameters
|
||||
|
||||
* **\_column**: `string`
|
||||
|
||||
* **\_options?**: [`FunctionProvenanceOptions`](../interfaces/FunctionProvenanceOptions.md)
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`FunctionProvenance`](../interfaces/FunctionProvenance.md)>
|
||||
|
||||
***
|
||||
|
||||
### getRTESpec()
|
||||
|
||||
```ts
|
||||
@@ -788,6 +1076,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
|
||||
@@ -925,6 +1233,67 @@ rows depending on how they match.
|
||||
|
||||
***
|
||||
|
||||
### openBlobFile()
|
||||
|
||||
```ts
|
||||
openBlobFile(_descriptor, _options?): Promise<null | BlobFile>
|
||||
```
|
||||
|
||||
Opens a lazy handle from a source-bearing SQL `blob_descriptor` result.
|
||||
|
||||
The descriptor's source pins the table version, branch, column and row
|
||||
identity, so opening does not change this table's checkout. Null
|
||||
descriptors return `null`. Payload bytes load only when the returned
|
||||
handle is read. Pass BlobReadOptions.signal to cancel the open.
|
||||
|
||||
#### Parameters
|
||||
|
||||
* **\_descriptor**: `null` \| [`BlobDescriptor`](../interfaces/BlobDescriptor.md)
|
||||
|
||||
* **\_options?**: [`BlobReadOptions`](../type-aliases/BlobReadOptions.md)
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`null` \| [`BlobFile`](BlobFile.md)>
|
||||
|
||||
#### Example
|
||||
|
||||
```ts
|
||||
const rows = await table
|
||||
.query()
|
||||
.select({ video: "blob_descriptor(video)" })
|
||||
.toArray();
|
||||
const handle = await table.openBlobFile(rows[0].video);
|
||||
if (handle) {
|
||||
const header = await handle.readRange(0n, 16n);
|
||||
await handle.close();
|
||||
}
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### openBlobFiles()
|
||||
|
||||
```ts
|
||||
openBlobFiles(descriptors, options?): AsyncGenerator<null | BlobFile, any, unknown>
|
||||
```
|
||||
|
||||
Opens source-bearing descriptors in iteration order, preserving nulls.
|
||||
Handles open lazily as the iterable advances. Close each non-null handle
|
||||
after use.
|
||||
|
||||
#### Parameters
|
||||
|
||||
* **descriptors**: `Iterable`<`null` \| [`BlobDescriptor`](../interfaces/BlobDescriptor.md)>
|
||||
|
||||
* **options?**: [`BlobReadOptions`](../type-aliases/BlobReadOptions.md)
|
||||
|
||||
#### Returns
|
||||
|
||||
`AsyncGenerator`<`null` \| [`BlobFile`](BlobFile.md), `any`, `unknown`>
|
||||
|
||||
***
|
||||
|
||||
### optimize()
|
||||
|
||||
```ts
|
||||
@@ -952,6 +1321,9 @@ supported. Pruning old versions and index optimization are silently
|
||||
skipped there instead of being attempted, so this call resolves
|
||||
successfully, with zeroed pruning statistics, once the compaction job
|
||||
has been submitted; it does not wait for that job to finish.
|
||||
`compactionOptions` can tune the four per-job settings documented in
|
||||
[CompactionOptions](../interfaces/CompactionOptions.md). Older-server errors are propagated without
|
||||
retrying with the settings removed.
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -965,29 +1337,99 @@ has been submitted; it does not wait for that job to finish.
|
||||
|
||||
### 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();
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
@@ -1013,6 +1455,28 @@ Prewarm an index in the table.
|
||||
|
||||
***
|
||||
|
||||
### quarantineFailed()
|
||||
|
||||
```ts
|
||||
quarantineFailed(_column, _options?): Promise<number>
|
||||
```
|
||||
|
||||
Quarantine current failures and return the number of affected rows.
|
||||
Set `quarantined: false` to release them for future refreshes.
|
||||
Requires LanceDB Enterprise Function failure workflow version 1 or later.
|
||||
|
||||
#### Parameters
|
||||
|
||||
* **\_column**: `string`
|
||||
|
||||
* **\_options?**: [`FunctionQuarantineOptions`](../interfaces/FunctionQuarantineOptions.md)
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`number`>
|
||||
|
||||
***
|
||||
|
||||
### query()
|
||||
|
||||
```ts
|
||||
@@ -1086,7 +1550,7 @@ for await (const batch of table.query()) {
|
||||
### refreshColumn()
|
||||
|
||||
```ts
|
||||
abstract refreshColumn(column): Promise<RefreshColumnResult>
|
||||
abstract refreshColumn(column, options?): Promise<RefreshColumnResult>
|
||||
```
|
||||
|
||||
Fill the rows of a computed column that hold no value yet.
|
||||
@@ -1102,6 +1566,10 @@ Enterprise a refresh runs as a server job, through [Table#refreshColumnAsync](Ta
|
||||
* **column**: `string`
|
||||
The name of the computed column to fill.
|
||||
|
||||
* **options?**: [`RefreshColumnOptions`](../interfaces/RefreshColumnOptions.md)
|
||||
Refresh options, all LanceDB
|
||||
Enterprise only; see [Table#refreshColumnAsync](Table.md#refreshcolumnasync).
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`RefreshColumnResult`](../interfaces/RefreshColumnResult.md)>
|
||||
@@ -1114,7 +1582,7 @@ number of rows filled and the new version number of the table.
|
||||
### refreshColumnAsync()
|
||||
|
||||
```ts
|
||||
abstract refreshColumnAsync(column): Promise<Job>
|
||||
abstract refreshColumnAsync(column, options?): Promise<Job<void>>
|
||||
```
|
||||
|
||||
Like [Table#refreshColumn](Table.md#refreshcolumn), but returns a handle to the refresh
|
||||
@@ -1134,20 +1602,68 @@ LanceDB Enterprise it is the server's backfill job.
|
||||
* **column**: `string`
|
||||
The name of the computed column to fill.
|
||||
|
||||
* **options?**: [`RefreshColumnOptions`](../interfaces/RefreshColumnOptions.md)
|
||||
Refresh options, mirroring the SQL
|
||||
`REFRESH COLUMN ... WHERE ... WITH (...)` form: `where` narrows the rows,
|
||||
`errorPolicy`, `maxFailedFraction`, `maxFailedRows`, `rowTimeoutSeconds`
|
||||
and `initTimeoutSeconds` govern failing rows. `batchSize`, `gpuClass`,
|
||||
`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. `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.
|
||||
Omit it for whole-fragment publication. Publications can exceed the
|
||||
threshold, and remaining rows publish at completion.
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`Job`](Job.md)>
|
||||
`Promise`<[`Job`](Job.md)<`void`>>
|
||||
|
||||
#### Example
|
||||
|
||||
```ts
|
||||
const job = await table.refreshColumnAsync("doubled");
|
||||
const job = await table.refreshColumnAsync("embedding", {
|
||||
where: "published_at > '2026-01-01'",
|
||||
totalCpuMillis: 8000,
|
||||
totalMemoryBytes: 16 * 1024 ** 3,
|
||||
maxConcurrency: 4,
|
||||
publicationIntervalRows: 10000,
|
||||
errorPolicy: "skip",
|
||||
maxFailedFraction: 0.01,
|
||||
rowTimeoutSeconds: 30,
|
||||
});
|
||||
await job.wait();
|
||||
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
|
||||
@@ -1171,6 +1687,28 @@ out state and the read_consistency_interval, if any, will apply.
|
||||
|
||||
***
|
||||
|
||||
### retryFailed()
|
||||
|
||||
```ts
|
||||
retryFailed(_column, _options?): Promise<Job<RefreshColumnJobResult>>
|
||||
```
|
||||
|
||||
Start a job to retry exactly the current failures of one Function column.
|
||||
Filters apply on the server. Quarantined rows are excluded by default.
|
||||
Requires LanceDB Enterprise Function failure workflow version 1 or later.
|
||||
|
||||
#### Parameters
|
||||
|
||||
* **\_column**: `string`
|
||||
|
||||
* **\_options?**: [`RetryFailedOptions`](../interfaces/RetryFailedOptions.md)
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`Job`](Job.md)<[`RefreshColumnJobResult`](../interfaces/RefreshColumnJobResult.md)>>
|
||||
|
||||
***
|
||||
|
||||
### schema()
|
||||
|
||||
```ts
|
||||
@@ -1505,6 +2043,66 @@ 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 } },
|
||||
});
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### upgradeColumn()
|
||||
|
||||
```ts
|
||||
upgradeColumn(_column, _options): Promise<Job<RefreshColumnJobResult>>
|
||||
```
|
||||
|
||||
Start an upgrade to an existing immutable Function version and choose
|
||||
which rows to recompute. New and changed inputs use the new version.
|
||||
Requires LanceDB Enterprise Function failure workflow version 1 or later.
|
||||
|
||||
#### Parameters
|
||||
|
||||
* **\_column**: `string`
|
||||
|
||||
* **\_options**: [`UpgradeColumnOptions`](../interfaces/UpgradeColumnOptions.md)
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`Job`](Job.md)<[`RefreshColumnJobResult`](../interfaces/RefreshColumnJobResult.md)>>
|
||||
|
||||
***
|
||||
|
||||
### vectorSearch()
|
||||
|
||||
```ts
|
||||
@@ -1565,3 +2163,26 @@ Waits for asynchronous indexing to complete on the table.
|
||||
#### Returns
|
||||
|
||||
`Promise`<`void`>
|
||||
|
||||
***
|
||||
|
||||
### waitFresh()
|
||||
|
||||
```ts
|
||||
abstract waitFresh(column, timeoutSeconds?): Promise<FunctionColumnStatus>
|
||||
```
|
||||
|
||||
Poll until no stale or never-computed rows remain.
|
||||
|
||||
Only HTTP 503 with the exact finalization-pending error code is retried;
|
||||
every other error propagates. Failed rows do not block completion.
|
||||
|
||||
#### Parameters
|
||||
|
||||
* **column**: `string`
|
||||
|
||||
* **timeoutSeconds?**: `number`
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`FunctionColumnStatus`](../interfaces/FunctionColumnStatus.md)>
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -686,6 +686,11 @@ searchEffort(searchEffort): VectorQuery
|
||||
|
||||
Set the initial IVF search effort to a finite value in [0, 1].
|
||||
|
||||
Efforts 0.1 and 0.25 target empirical mean partition-routing recall of
|
||||
80% and 90% for L2, cosine and dot through k=100000. The probe budget
|
||||
adapts to the metric and k. Hamming and larger k remain uncalibrated;
|
||||
100000 is not an API limit. Remote queries also require server support.
|
||||
|
||||
The default, null, uses Auto (internally 0.5). Zero starts at the caller
|
||||
minimum; one searches all partitions within the caller maximum. Later
|
||||
probing may continue when too few candidates are found.
|
||||
|
||||
@@ -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)
|
||||
@@ -62,6 +63,8 @@
|
||||
- [AddDataOptions](interfaces/AddDataOptions.md)
|
||||
- [AddResult](interfaces/AddResult.md)
|
||||
- [AlterColumnsResult](interfaces/AlterColumnsResult.md)
|
||||
- [BlobDescriptor](interfaces/BlobDescriptor.md)
|
||||
- [BlobDescriptorSource](interfaces/BlobDescriptorSource.md)
|
||||
- [BranchColumnChange](interfaces/BranchColumnChange.md)
|
||||
- [BranchColumnSummary](interfaces/BranchColumnSummary.md)
|
||||
- [BranchDiff](interfaces/BranchDiff.md)
|
||||
@@ -71,12 +74,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)
|
||||
@@ -94,10 +103,27 @@
|
||||
- [FtsToken](interfaces/FtsToken.md)
|
||||
- [FullTextQuery](interfaces/FullTextQuery.md)
|
||||
- [FullTextSearchOptions](interfaces/FullTextSearchOptions.md)
|
||||
- [FunctionColumnAutoRefreshStatus](interfaces/FunctionColumnAutoRefreshStatus.md)
|
||||
- [FunctionColumnLastRefreshJob](interfaces/FunctionColumnLastRefreshJob.md)
|
||||
- [FunctionColumnStatus](interfaces/FunctionColumnStatus.md)
|
||||
- [FunctionColumnVersionStatus](interfaces/FunctionColumnVersionStatus.md)
|
||||
- [FunctionErrorFragment](interfaces/FunctionErrorFragment.md)
|
||||
- [FunctionErrorGroup](interfaces/FunctionErrorGroup.md)
|
||||
- [FunctionErrorRecord](interfaces/FunctionErrorRecord.md)
|
||||
- [FunctionErrorRowsOptions](interfaces/FunctionErrorRowsOptions.md)
|
||||
- [FunctionErrors](interfaces/FunctionErrors.md)
|
||||
- [FunctionErrorsOptions](interfaces/FunctionErrorsOptions.md)
|
||||
- [FunctionFailedRow](interfaces/FunctionFailedRow.md)
|
||||
- [FunctionProfile](interfaces/FunctionProfile.md)
|
||||
- [FunctionProfileOptions](interfaces/FunctionProfileOptions.md)
|
||||
- [FunctionProfileWaitOptions](interfaces/FunctionProfileWaitOptions.md)
|
||||
- [FunctionProvenance](interfaces/FunctionProvenance.md)
|
||||
- [FunctionProvenanceOptions](interfaces/FunctionProvenanceOptions.md)
|
||||
- [FunctionQuarantineOptions](interfaces/FunctionQuarantineOptions.md)
|
||||
- [FunctionRefreshPlanningConfig](interfaces/FunctionRefreshPlanningConfig.md)
|
||||
- [FunctionRefreshPodResources](interfaces/FunctionRefreshPodResources.md)
|
||||
- [FunctionRetryPolicy](interfaces/FunctionRetryPolicy.md)
|
||||
- [FunctionValueProvenance](interfaces/FunctionValueProvenance.md)
|
||||
- [HnswPqOptions](interfaces/HnswPqOptions.md)
|
||||
- [HnswSqOptions](interfaces/HnswSqOptions.md)
|
||||
- [IndexConfig](interfaces/IndexConfig.md)
|
||||
@@ -110,6 +136,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)
|
||||
@@ -119,15 +146,23 @@
|
||||
- [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)
|
||||
- [RefreshColumnJobResult](interfaces/RefreshColumnJobResult.md)
|
||||
- [RefreshColumnOptions](interfaces/RefreshColumnOptions.md)
|
||||
- [RefreshColumnResult](interfaces/RefreshColumnResult.md)
|
||||
- [RefreshMaterializedViewResult](interfaces/RefreshMaterializedViewResult.md)
|
||||
- [RemovalStats](interfaces/RemovalStats.md)
|
||||
- [RenameTableOptions](interfaces/RenameTableOptions.md)
|
||||
- [RestNamespaceConfig](interfaces/RestNamespaceConfig.md)
|
||||
- [RetryConfig](interfaces/RetryConfig.md)
|
||||
- [RetryFailedOptions](interfaces/RetryFailedOptions.md)
|
||||
- [ScannableOptions](interfaces/ScannableOptions.md)
|
||||
- [SessionLogout](interfaces/SessionLogout.md)
|
||||
- [SessionStatus](interfaces/SessionStatus.md)
|
||||
@@ -137,6 +172,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)
|
||||
@@ -148,6 +185,7 @@
|
||||
- [UpdateFieldMetadataResult](interfaces/UpdateFieldMetadataResult.md)
|
||||
- [UpdateOptions](interfaces/UpdateOptions.md)
|
||||
- [UpdateResult](interfaces/UpdateResult.md)
|
||||
- [UpgradeColumnOptions](interfaces/UpgradeColumnOptions.md)
|
||||
- [Version](interfaces/Version.md)
|
||||
- [ViewDescription](interfaces/ViewDescription.md)
|
||||
- [WriteExecutionOptions](interfaces/WriteExecutionOptions.md)
|
||||
@@ -162,18 +200,26 @@
|
||||
- [BlobMode](type-aliases/BlobMode.md)
|
||||
- [BlobOptions](type-aliases/BlobOptions.md)
|
||||
- [BlobRange](type-aliases/BlobRange.md)
|
||||
- [BlobRangeRequest](type-aliases/BlobRangeRequest.md)
|
||||
- [BlobReadOptions](type-aliases/BlobReadOptions.md)
|
||||
- [BlobUri](type-aliases/BlobUri.md)
|
||||
- [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)
|
||||
- [FunctionRecompute](type-aliases/FunctionRecompute.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)
|
||||
|
||||
@@ -71,3 +71,15 @@ await table.add(data, {
|
||||
},
|
||||
});
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### retries?
|
||||
|
||||
```ts
|
||||
optional retries: number;
|
||||
```
|
||||
|
||||
Override the remote retry budget for this call (0 to 255). Zero disables
|
||||
retries, including multipart parts. Ambiguous commits are never replayed.
|
||||
Ignored by LanceDB Embedded.
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
[**@lancedb/lancedb**](../README.md) • **Docs**
|
||||
|
||||
***
|
||||
|
||||
[@lancedb/lancedb](../globals.md) / BlobDescriptor
|
||||
|
||||
# Interface: BlobDescriptor
|
||||
|
||||
A source-bearing Blob V2 descriptor accepted by [Table.openBlobFile](../classes/Table.md#openblobfile).
|
||||
Query results expose these fields as an Arrow struct. The source pins the
|
||||
table version, branch, column and row identity used to open the handle.
|
||||
|
||||
## Properties
|
||||
|
||||
### blob\_id
|
||||
|
||||
```ts
|
||||
blob_id: number;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### blob\_uri
|
||||
|
||||
```ts
|
||||
blob_uri: string;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### kind
|
||||
|
||||
```ts
|
||||
kind: number;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### position
|
||||
|
||||
```ts
|
||||
position: number | bigint;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### size
|
||||
|
||||
```ts
|
||||
size: number | bigint;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### source
|
||||
|
||||
```ts
|
||||
source: BlobDescriptorSource;
|
||||
```
|
||||
@@ -0,0 +1,66 @@
|
||||
[**@lancedb/lancedb**](../README.md) • **Docs**
|
||||
|
||||
***
|
||||
|
||||
[@lancedb/lancedb](../globals.md) / BlobDescriptorSource
|
||||
|
||||
# Interface: BlobDescriptorSource
|
||||
|
||||
A source-bearing Blob V2 descriptor returned by the SQL `blob_descriptor`
|
||||
function. Field names match the descriptor object/Arrow struct shape.
|
||||
|
||||
## Properties
|
||||
|
||||
### branch?
|
||||
|
||||
```ts
|
||||
optional branch: null | string;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### column
|
||||
|
||||
```ts
|
||||
column: string;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### committed\_at\_micros
|
||||
|
||||
```ts
|
||||
committed_at_micros: number | bigint;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### row\_is\_address
|
||||
|
||||
```ts
|
||||
row_is_address: boolean;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### row\_reference
|
||||
|
||||
```ts
|
||||
row_reference: number | bigint;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### uri
|
||||
|
||||
```ts
|
||||
uri: string;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### version
|
||||
|
||||
```ts
|
||||
version: number | bigint;
|
||||
```
|
||||
@@ -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,49 @@
|
||||
[**@lancedb/lancedb**](../README.md) • **Docs**
|
||||
|
||||
***
|
||||
|
||||
[@lancedb/lancedb](../globals.md) / CompactionOptions
|
||||
|
||||
# Interface: CompactionOptions
|
||||
|
||||
Per-invocation compaction settings. Values must be safe integers.
|
||||
|
||||
## Properties
|
||||
|
||||
### batchSize?
|
||||
|
||||
```ts
|
||||
optional batchSize: number;
|
||||
```
|
||||
|
||||
Positive scanner batch size in rows.
|
||||
|
||||
***
|
||||
|
||||
### ioBufferSize?
|
||||
|
||||
```ts
|
||||
optional ioBufferSize: number;
|
||||
```
|
||||
|
||||
Scanner I/O read-ahead budget in bytes; zero disables byte-based I/O backpressure.
|
||||
|
||||
***
|
||||
|
||||
### maxSourceRows?
|
||||
|
||||
```ts
|
||||
optional maxSourceRows: number;
|
||||
```
|
||||
|
||||
Positive live-source-row budget across whole tasks; an oversized first task can produce no work.
|
||||
|
||||
***
|
||||
|
||||
### targetRowsPerFragment?
|
||||
|
||||
```ts
|
||||
optional targetRowsPerFragment: number;
|
||||
```
|
||||
|
||||
Positive target rows per output fragment; also affects candidate selection.
|
||||
@@ -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`.
|
||||
@@ -0,0 +1,98 @@
|
||||
[**@lancedb/lancedb**](../README.md) • **Docs**
|
||||
|
||||
***
|
||||
|
||||
[@lancedb/lancedb](../globals.md) / FunctionColumnAutoRefreshStatus
|
||||
|
||||
# Interface: FunctionColumnAutoRefreshStatus
|
||||
|
||||
Automatic-refresh projection for a Function output.
|
||||
|
||||
## Properties
|
||||
|
||||
### activeJobId?
|
||||
|
||||
```ts
|
||||
optional activeJobId: string;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### blockedReason?
|
||||
|
||||
```ts
|
||||
optional blockedReason:
|
||||
| "cancelled"
|
||||
| "table_has_mem_wal"
|
||||
| "inputs_not_settled"
|
||||
| "dependency_in_flight"
|
||||
| "table_capacity"
|
||||
| "preparation_backoff"
|
||||
| "failure_threshold_reached"
|
||||
| "binding_revision_missing";
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### effectiveCooldownMillis?
|
||||
|
||||
```ts
|
||||
optional effectiveCooldownMillis: bigint;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### enabled
|
||||
|
||||
```ts
|
||||
enabled: boolean;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### failureStreak
|
||||
|
||||
```ts
|
||||
failureStreak: number;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### intervalSeconds?
|
||||
|
||||
```ts
|
||||
optional intervalSeconds: bigint;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### nextRunAtMillis
|
||||
|
||||
```ts
|
||||
nextRunAtMillis: null | bigint;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### nextRunAtReason?
|
||||
|
||||
```ts
|
||||
optional nextRunAtReason: string;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### state
|
||||
|
||||
```ts
|
||||
state:
|
||||
| "queued"
|
||||
| "running"
|
||||
| "disabled"
|
||||
| "ready"
|
||||
| "up_to_date"
|
||||
| "waiting_interval"
|
||||
| "waiting_backoff"
|
||||
| "blocked"
|
||||
| "unobservable";
|
||||
```
|
||||
@@ -0,0 +1,51 @@
|
||||
[**@lancedb/lancedb**](../README.md) • **Docs**
|
||||
|
||||
***
|
||||
|
||||
[@lancedb/lancedb](../globals.md) / FunctionColumnLastRefreshJob
|
||||
|
||||
# Interface: FunctionColumnLastRefreshJob
|
||||
|
||||
Latest matching refresh Job projected for a Function output.
|
||||
|
||||
## Properties
|
||||
|
||||
### automatic?
|
||||
|
||||
```ts
|
||||
optional automatic: boolean;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### completedAtMillis?
|
||||
|
||||
```ts
|
||||
optional completedAtMillis: bigint;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### failure?
|
||||
|
||||
```ts
|
||||
optional failure: JobFailureInfo;
|
||||
```
|
||||
|
||||
Structured failure details for a failed Job.
|
||||
|
||||
***
|
||||
|
||||
### jobId
|
||||
|
||||
```ts
|
||||
jobId: string;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### state
|
||||
|
||||
```ts
|
||||
state: string;
|
||||
```
|
||||
@@ -0,0 +1,108 @@
|
||||
[**@lancedb/lancedb**](../README.md) • **Docs**
|
||||
|
||||
***
|
||||
|
||||
[@lancedb/lancedb](../globals.md) / FunctionColumnStatus
|
||||
|
||||
# Interface: FunctionColumnStatus
|
||||
|
||||
Exact four-way status of one Function output at one table version.
|
||||
|
||||
## Properties
|
||||
|
||||
### autoRefresh
|
||||
|
||||
```ts
|
||||
autoRefresh: FunctionColumnAutoRefreshStatus;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### bindingId
|
||||
|
||||
```ts
|
||||
bindingId: string;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### column
|
||||
|
||||
```ts
|
||||
column: string;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### failed
|
||||
|
||||
```ts
|
||||
failed: bigint;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### fresh
|
||||
|
||||
```ts
|
||||
fresh: bigint;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### function
|
||||
|
||||
```ts
|
||||
function: FunctionColumnVersionStatus;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### lastFailureJob?
|
||||
|
||||
```ts
|
||||
optional lastFailureJob: FunctionColumnLastRefreshJob;
|
||||
```
|
||||
|
||||
Newest failed refresh Job. This remains present when `lastRefreshJob`
|
||||
is a later cancellation.
|
||||
|
||||
***
|
||||
|
||||
### lastRefreshJob?
|
||||
|
||||
```ts
|
||||
optional lastRefreshJob: FunctionColumnLastRefreshJob;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### neverComputed
|
||||
|
||||
```ts
|
||||
neverComputed: bigint;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### rows
|
||||
|
||||
```ts
|
||||
rows: bigint;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### stale
|
||||
|
||||
```ts
|
||||
stale: bigint;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### tableVersion
|
||||
|
||||
```ts
|
||||
tableVersion: bigint;
|
||||
```
|
||||
@@ -0,0 +1,57 @@
|
||||
[**@lancedb/lancedb**](../README.md) • **Docs**
|
||||
|
||||
***
|
||||
|
||||
[@lancedb/lancedb](../globals.md) / FunctionColumnVersionStatus
|
||||
|
||||
# Interface: FunctionColumnVersionStatus
|
||||
|
||||
Exact immutable Function revision attached to a table output.
|
||||
|
||||
## Properties
|
||||
|
||||
### location
|
||||
|
||||
```ts
|
||||
location: string;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### manifestDigest
|
||||
|
||||
```ts
|
||||
manifestDigest: string;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### name
|
||||
|
||||
```ts
|
||||
name: string;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### namespacePath
|
||||
|
||||
```ts
|
||||
namespacePath: string[];
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### objectId
|
||||
|
||||
```ts
|
||||
objectId: string;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### version
|
||||
|
||||
```ts
|
||||
version: string;
|
||||
```
|
||||
@@ -0,0 +1,41 @@
|
||||
[**@lancedb/lancedb**](../README.md) • **Docs**
|
||||
|
||||
***
|
||||
|
||||
[@lancedb/lancedb](../globals.md) / FunctionErrorGroup
|
||||
|
||||
# Interface: FunctionErrorGroup
|
||||
|
||||
One cause among the returned Function errors.
|
||||
|
||||
## Properties
|
||||
|
||||
### column
|
||||
|
||||
```ts
|
||||
column: string;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### errorMessage
|
||||
|
||||
```ts
|
||||
errorMessage: string;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### errorType
|
||||
|
||||
```ts
|
||||
errorType: string;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### rowsFailed
|
||||
|
||||
```ts
|
||||
rowsFailed: bigint;
|
||||
```
|
||||
@@ -10,6 +10,16 @@ One row a Function refresh skipped, as the server recorded it.
|
||||
|
||||
## Properties
|
||||
|
||||
### attempts?
|
||||
|
||||
```ts
|
||||
optional attempts: number;
|
||||
```
|
||||
|
||||
Number of failed invocation attempts, when recorded.
|
||||
|
||||
***
|
||||
|
||||
### column
|
||||
|
||||
```ts
|
||||
@@ -42,6 +52,16 @@ errorType: string;
|
||||
|
||||
***
|
||||
|
||||
### firstSeenAtMillis?
|
||||
|
||||
```ts
|
||||
optional firstSeenAtMillis: number;
|
||||
```
|
||||
|
||||
First failure time for this row, when recorded.
|
||||
|
||||
***
|
||||
|
||||
### fragmentId
|
||||
|
||||
```ts
|
||||
@@ -66,6 +86,16 @@ functionVersion: string;
|
||||
|
||||
***
|
||||
|
||||
### input?
|
||||
|
||||
```ts
|
||||
optional input: unknown;
|
||||
```
|
||||
|
||||
Source identities for a materialized-view Function invocation.
|
||||
|
||||
***
|
||||
|
||||
### jobId
|
||||
|
||||
```ts
|
||||
@@ -74,6 +104,46 @@ jobId: string;
|
||||
|
||||
***
|
||||
|
||||
### lastSeenAtMillis?
|
||||
|
||||
```ts
|
||||
optional lastSeenAtMillis: number;
|
||||
```
|
||||
|
||||
Latest failure time for this row, when recorded.
|
||||
|
||||
***
|
||||
|
||||
### quarantined?
|
||||
|
||||
```ts
|
||||
optional quarantined: boolean;
|
||||
```
|
||||
|
||||
Whether the failure is quarantined. Absent on older listings.
|
||||
|
||||
***
|
||||
|
||||
### rowAddress?
|
||||
|
||||
```ts
|
||||
optional rowAddress: bigint;
|
||||
```
|
||||
|
||||
Physical row address at the recorded version. A rewrite can change it.
|
||||
|
||||
***
|
||||
|
||||
### rowId?
|
||||
|
||||
```ts
|
||||
optional rowId: bigint;
|
||||
```
|
||||
|
||||
Stable row identity when recorded. It survives compaction and rewrite.
|
||||
|
||||
***
|
||||
|
||||
### rowOffset?
|
||||
|
||||
```ts
|
||||
@@ -90,3 +160,13 @@ detail was capped.
|
||||
```ts
|
||||
tableVersion: number;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### traceback?
|
||||
|
||||
```ts
|
||||
optional traceback: string;
|
||||
```
|
||||
|
||||
User-code traceback, possibly truncated by the server.
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
[**@lancedb/lancedb**](../README.md) • **Docs**
|
||||
|
||||
***
|
||||
|
||||
[@lancedb/lancedb](../globals.md) / FunctionErrorRowsOptions
|
||||
|
||||
# Interface: FunctionErrorRowsOptions
|
||||
|
||||
Filters and projection for current failing inputs.
|
||||
|
||||
## Extends
|
||||
|
||||
- `Pick`<[`FunctionErrorsOptions`](FunctionErrorsOptions.md), `"column"` \| `"jobId"` \| `"limit"`>
|
||||
|
||||
## Properties
|
||||
|
||||
### column?
|
||||
|
||||
```ts
|
||||
optional column: string;
|
||||
```
|
||||
|
||||
Only errors on this column.
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Pick.column`
|
||||
|
||||
***
|
||||
|
||||
### columns?
|
||||
|
||||
```ts
|
||||
optional columns: string[];
|
||||
```
|
||||
|
||||
Source columns to return. Defaults to all source columns.
|
||||
|
||||
***
|
||||
|
||||
### jobId?
|
||||
|
||||
```ts
|
||||
optional jobId: string;
|
||||
```
|
||||
|
||||
Only errors recorded by this job.
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Pick.jobId`
|
||||
|
||||
***
|
||||
|
||||
### limit?
|
||||
|
||||
```ts
|
||||
optional limit: number;
|
||||
```
|
||||
|
||||
At most this many records (server default 10000, cap 100000).
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Pick.limit`
|
||||
@@ -10,6 +10,17 @@ A table's per-row Function errors.
|
||||
|
||||
## Properties
|
||||
|
||||
### errorGroups?
|
||||
|
||||
```ts
|
||||
optional errorGroups: FunctionErrorGroup[];
|
||||
```
|
||||
|
||||
Grouped causes over the returned records, if the server supports the workflow.
|
||||
Counts can be incomplete. Check `truncated` and `fragments` before using them as totals.
|
||||
|
||||
***
|
||||
|
||||
### fragments
|
||||
|
||||
```ts
|
||||
@@ -20,6 +31,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 +58,13 @@ truncated: boolean;
|
||||
```
|
||||
|
||||
Whether the listing stopped at its limit.
|
||||
|
||||
***
|
||||
|
||||
### workflowVersion?
|
||||
|
||||
```ts
|
||||
optional workflowVersion: number;
|
||||
```
|
||||
|
||||
Version of the Enterprise row-failure workflow, if advertised by the server.
|
||||
|
||||
@@ -20,6 +20,16 @@ Only errors on this column.
|
||||
|
||||
***
|
||||
|
||||
### history?
|
||||
|
||||
```ts
|
||||
optional history: boolean;
|
||||
```
|
||||
|
||||
Include retained historical attempts, including repaired rows. Requires workflow version 1 or later.
|
||||
|
||||
***
|
||||
|
||||
### jobId?
|
||||
|
||||
```ts
|
||||
@@ -37,3 +47,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,29 @@
|
||||
[**@lancedb/lancedb**](../README.md) • **Docs**
|
||||
|
||||
***
|
||||
|
||||
[@lancedb/lancedb](../globals.md) / FunctionFailedRow
|
||||
|
||||
# Interface: FunctionFailedRow
|
||||
|
||||
A failed Function-column row and its source data at the table's read snapshot.
|
||||
|
||||
## Properties
|
||||
|
||||
### error
|
||||
|
||||
```ts
|
||||
error: FunctionErrorRecord;
|
||||
```
|
||||
|
||||
The failure for this row and Function column.
|
||||
|
||||
***
|
||||
|
||||
### input
|
||||
|
||||
```ts
|
||||
input: Record<string, unknown>;
|
||||
```
|
||||
|
||||
Values of the requested source columns.
|
||||
@@ -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.
|
||||
@@ -0,0 +1,27 @@
|
||||
[**@lancedb/lancedb**](../README.md) • **Docs**
|
||||
|
||||
***
|
||||
|
||||
[@lancedb/lancedb](../globals.md) / FunctionProvenance
|
||||
|
||||
# Interface: FunctionProvenance
|
||||
|
||||
A bounded producing-version listing for a table snapshot.
|
||||
|
||||
## Properties
|
||||
|
||||
### records
|
||||
|
||||
```ts
|
||||
records: FunctionValueProvenance[];
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### truncated
|
||||
|
||||
```ts
|
||||
truncated: boolean;
|
||||
```
|
||||
|
||||
Whether the listing stopped at its limit.
|
||||
@@ -0,0 +1,29 @@
|
||||
[**@lancedb/lancedb**](../README.md) • **Docs**
|
||||
|
||||
***
|
||||
|
||||
[@lancedb/lancedb](../globals.md) / FunctionProvenanceOptions
|
||||
|
||||
# Interface: FunctionProvenanceOptions
|
||||
|
||||
Snapshot and record limit for a producing-version listing.
|
||||
|
||||
## Properties
|
||||
|
||||
### limit?
|
||||
|
||||
```ts
|
||||
optional limit: number;
|
||||
```
|
||||
|
||||
Maximum records to return (server default 10000, cap 100000).
|
||||
|
||||
***
|
||||
|
||||
### version?
|
||||
|
||||
```ts
|
||||
optional version: number | bigint;
|
||||
```
|
||||
|
||||
An exact table version. Defaults to the table handle's read version.
|
||||
@@ -0,0 +1,49 @@
|
||||
[**@lancedb/lancedb**](../README.md) • **Docs**
|
||||
|
||||
***
|
||||
|
||||
[@lancedb/lancedb](../globals.md) / FunctionQuarantineOptions
|
||||
|
||||
# Interface: FunctionQuarantineOptions
|
||||
|
||||
Select current failures to quarantine or release.
|
||||
|
||||
## Properties
|
||||
|
||||
### afterAttempts?
|
||||
|
||||
```ts
|
||||
optional afterAttempts: number;
|
||||
```
|
||||
|
||||
Only failures with at least this many attempts. Defaults to 1.
|
||||
|
||||
***
|
||||
|
||||
### errorType?
|
||||
|
||||
```ts
|
||||
optional errorType: string;
|
||||
```
|
||||
|
||||
Only failures with this exception class.
|
||||
|
||||
***
|
||||
|
||||
### jobId?
|
||||
|
||||
```ts
|
||||
optional jobId: string;
|
||||
```
|
||||
|
||||
Only failures recorded by this job.
|
||||
|
||||
***
|
||||
|
||||
### quarantined?
|
||||
|
||||
```ts
|
||||
optional quarantined: boolean;
|
||||
```
|
||||
|
||||
Quarantine by default. Set false to release failures for later refreshes.
|
||||
@@ -0,0 +1,50 @@
|
||||
[**@lancedb/lancedb**](../README.md) • **Docs**
|
||||
|
||||
***
|
||||
|
||||
[@lancedb/lancedb](../globals.md) / FunctionRefreshPlanningConfig
|
||||
|
||||
# Interface: FunctionRefreshPlanningConfig
|
||||
|
||||
Resources and sizing policy for the planning fleet of one registered
|
||||
Function refresh.
|
||||
|
||||
## Properties
|
||||
|
||||
### fragmentsPerWorker
|
||||
|
||||
```ts
|
||||
fragmentsPerWorker: number;
|
||||
```
|
||||
|
||||
Maximum fragments assigned to one planning worker.
|
||||
|
||||
***
|
||||
|
||||
### maxWorkers
|
||||
|
||||
```ts
|
||||
maxWorkers: number;
|
||||
```
|
||||
|
||||
Maximum number of planning workers.
|
||||
|
||||
***
|
||||
|
||||
### resources
|
||||
|
||||
```ts
|
||||
resources: FunctionRefreshPodResources;
|
||||
```
|
||||
|
||||
CPU, memory, and ephemeral-storage limits for one planning worker.
|
||||
|
||||
***
|
||||
|
||||
### rowsPerWorker
|
||||
|
||||
```ts
|
||||
rowsPerWorker: number;
|
||||
```
|
||||
|
||||
Maximum rows assigned to one planning worker.
|
||||
@@ -0,0 +1,40 @@
|
||||
[**@lancedb/lancedb**](../README.md) • **Docs**
|
||||
|
||||
***
|
||||
|
||||
[@lancedb/lancedb](../globals.md) / FunctionRefreshPodResources
|
||||
|
||||
# Interface: FunctionRefreshPodResources
|
||||
|
||||
CPU, memory, and ephemeral-storage limits for one Function refresh
|
||||
control-plane pod.
|
||||
|
||||
## Properties
|
||||
|
||||
### cpuMillis
|
||||
|
||||
```ts
|
||||
cpuMillis: number;
|
||||
```
|
||||
|
||||
CPU limit in millicores; 1000 is one CPU.
|
||||
|
||||
***
|
||||
|
||||
### ephemeralStorageBytes
|
||||
|
||||
```ts
|
||||
ephemeralStorageBytes: number;
|
||||
```
|
||||
|
||||
Ephemeral storage limit in bytes.
|
||||
|
||||
***
|
||||
|
||||
### memoryBytes
|
||||
|
||||
```ts
|
||||
memoryBytes: number;
|
||||
```
|
||||
|
||||
Memory limit in bytes.
|
||||
@@ -0,0 +1,91 @@
|
||||
[**@lancedb/lancedb**](../README.md) • **Docs**
|
||||
|
||||
***
|
||||
|
||||
[@lancedb/lancedb](../globals.md) / FunctionRetryPolicy
|
||||
|
||||
# Interface: FunctionRetryPolicy
|
||||
|
||||
Overrides retries of failed user-code calls for one refresh. Omitted
|
||||
fields use the Function refresh defaults.
|
||||
|
||||
## Properties
|
||||
|
||||
### errorCodes?
|
||||
|
||||
```ts
|
||||
optional errorCodes: string[];
|
||||
```
|
||||
|
||||
Structured provider error codes or HTTP status codes.
|
||||
|
||||
***
|
||||
|
||||
### exceptionTypes?
|
||||
|
||||
```ts
|
||||
optional exceptionTypes: string[];
|
||||
```
|
||||
|
||||
Exception class names, preferably qualified.
|
||||
|
||||
***
|
||||
|
||||
### honorRetryAfter?
|
||||
|
||||
```ts
|
||||
optional honorRetryAfter: boolean;
|
||||
```
|
||||
|
||||
Honor Retry-After within the configured maximum.
|
||||
|
||||
***
|
||||
|
||||
### initialBackoffSeconds?
|
||||
|
||||
```ts
|
||||
optional initialBackoffSeconds: number;
|
||||
```
|
||||
|
||||
Initial exponential-backoff ceiling, in seconds.
|
||||
|
||||
***
|
||||
|
||||
### maxAttempts?
|
||||
|
||||
```ts
|
||||
optional maxAttempts: number;
|
||||
```
|
||||
|
||||
Total calls, including the first; 1 disables retries, maximum 100.
|
||||
|
||||
***
|
||||
|
||||
### maxBackoffSeconds?
|
||||
|
||||
```ts
|
||||
optional maxBackoffSeconds: number;
|
||||
```
|
||||
|
||||
Maximum backoff, in seconds.
|
||||
|
||||
***
|
||||
|
||||
### messagePattern?
|
||||
|
||||
```ts
|
||||
optional messagePattern: string;
|
||||
```
|
||||
|
||||
Regular expression matched against the exception class and message.
|
||||
|
||||
***
|
||||
|
||||
### transient?
|
||||
|
||||
```ts
|
||||
optional transient: boolean;
|
||||
```
|
||||
|
||||
Match connection/timeouts, HTTP 429/503, SlowDown and
|
||||
ServiceUnavailable.
|
||||
@@ -0,0 +1,73 @@
|
||||
[**@lancedb/lancedb**](../README.md) • **Docs**
|
||||
|
||||
***
|
||||
|
||||
[@lancedb/lancedb](../globals.md) / FunctionValueProvenance
|
||||
|
||||
# Interface: FunctionValueProvenance
|
||||
|
||||
The Function and job that produced one stored value.
|
||||
|
||||
## Properties
|
||||
|
||||
### column
|
||||
|
||||
```ts
|
||||
column: string;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### functionName
|
||||
|
||||
```ts
|
||||
functionName: string;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### functionVersion
|
||||
|
||||
```ts
|
||||
functionVersion: string;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### jobId
|
||||
|
||||
```ts
|
||||
jobId: string;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### publishedVersion
|
||||
|
||||
```ts
|
||||
publishedVersion: bigint;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### rowAddress?
|
||||
|
||||
```ts
|
||||
optional rowAddress: bigint;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### rowId?
|
||||
|
||||
```ts
|
||||
optional rowId: bigint;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### sourceVersion
|
||||
|
||||
```ts
|
||||
sourceVersion: bigint;
|
||||
```
|
||||
@@ -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.
|
||||
|
||||
@@ -31,3 +31,23 @@ optional phase: string;
|
||||
```ts
|
||||
optional retryable: boolean;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### sqlJobId?
|
||||
|
||||
```ts
|
||||
optional sqlJobId: string;
|
||||
```
|
||||
|
||||
Isolated SQL job that raised this failure, when supplied by the server.
|
||||
|
||||
***
|
||||
|
||||
### traceback?
|
||||
|
||||
```ts
|
||||
optional traceback: string;
|
||||
```
|
||||
|
||||
User-code traceback, possibly truncated by the server.
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user