Training samplers can group several batches of offsets into one bounded
Enterprise request. The guide uses `take_offsets(...,
preserve_order=True)` on the sampler's table version and checks the
returned row count before splitting the rows back into the original
training batches. It explains the buffering trade-off and how to apply
the same cardinality check to row-ID lookups.
Related to [OSS-3134](https://linear.app/lancedb/issue/OSS-3134).
Python callers can pass a `pyarrow.RecordBatchReader` to `add()` to
commit multiple batches as one table version. The insert guide shows the
synchronous and asynchronous calls, when to use separate calls for
independently acknowledged flushes, and the server protocol and catalog
requirements for Enterprise multipart uploads.
Both examples advanced the table by one version on the Enterprise 1.16.0
directory and manifest catalogs with Python SDK 0.42.1.
The Attach Database guide now shows how to switch writers to the
Enterprise SDK or SQL and how to request a fresh read. It also shows how
to retain a tagged snapshot for cached row addresses or rebuild a cache
with business keys or stable row IDs that are already enabled on the
target table.
The saved Enterprise 1.12.0, 1.13.0, and 1.14.0 editions omit this
migration guidance. The six Python examples ran with Enterprise 1.16.0
and Python SDK 0.42.1 on both directory and manifest catalogs. With a
configured 60-second weak read interval, a primed reader still saw v1
after a bare URI commit. The zero interval and `checkout_latest()` each
read v2 in independent cases.
Related issues are [OSS-3150](https://linear.app/lancedb/issue/OSS-3150)
and [OSS-3151](https://linear.app/lancedb/issue/OSS-3151).
<!-- lance-gatekeeper-fix:v1 agent=d1262fd0aeb86548a3550f636fffe0cc
generation=1 -->
Embedded RTE queries parse SQL filters in a separate DataFusion context.
Register Lance's SQL functions in that context so a filter such as
`ST_Distance(...) <= radius` resolves as it does in an ordinary Embedded
scan.
The Rust regression checks an inclusive distance filter against rows in
the base table and the active MemTable with the `geo` feature enabled.
This builds on [Gatefixer's original
contribution](https://github.com/lancedb/lancedb/commit/e459892bb5ee611daf53fe5e61d51aeb70e41dd5).
---------
Co-authored-by: Gatefixer <313497061+lancedb-gatefixer[bot]@users.noreply.github.com>
Co-authored-by: Xuanwo <github@xuanwo.io>
The generated JavaScript SDK README still lists Intel Macs after #5244
updated the Node.js README. The stale line causes the Node.js `Check
docs` step to fail on PRs targeting `main`. [Failing
job](https://github.com/lancedb/lancedb/actions/runs/46403162946/job/141808637388)
Regenerate the SDK README so its macOS entry matches the Apple silicon
(`arm64`) binaries published to npm.
## Summary
A vector, full-text, or hybrid search can return rows whose reranking
text column is
ull. AssetFeedReranker._rerank currently forwards None values inside the
JSON documents list to the AssetFeed rerank API, which rejects or
misaligns results when null texts are present, still makes an HTTP
request when every candidate text is
ull, and counts null rows against MAX_DOCUMENTS = 100.
This aligns AssetFeedReranker with the existing null-filtering pattern
in #5283 (Cohere), #5296 (Jina), #5336 (VoyageAI), and #5337
(watsonx.ai):
- Filter out rows where esult_set[self.column] is null before
self._handle_empty_results(result_set) and MAX_DOCUMENTS validation, so
returned AssetFeed result indices select the exact matching rows and
keep all original columns.
- Return an empty loat32-scored result table without calling the
AssetFeed API when all candidate rows have null text.
- Document in AssetFeedReranker that rows with null values in column are
omitted from the reranked results.
## Verification
- Added unit tests in python/python/tests/test_assetfeed_reranker.py:
- est_nullable_documents (["first document", None, "last document"] and
[None, None, None]): verifies only non-null strings are sent, row
IDs/scores/_distance/ loat32 _relevance_score align cleanly, and
all-null inputs skip the HTTP request.
- est_null_documents_excluded_before_max_documents_check: verifies 100
valid documents plus 1 null row pass MAX_DOCUMENTS validation after null
filtering.
- Ran pytest -o addopts="" --noconftest -v
python/python/tests/test_assetfeed_reranker.py on Python 3.11.18 +
PyArrow 26.0.1 (15 passed in 1.16s with lancedb._lancedb stubbed in the
scratch test runner because Windows Application Control on the local
test machine blocks the unsigned native Rust .pyd binary; mocked HTTP
session, no live AssetFeed API calls).
- Verified uff check and uff format --check pass cleanly on both changed
files.
## Summary
- Replace the website's TypeScript full-text filtering examples with a
snippet generated from `docs/web-tests/ts/full_text_search.test.ts`. In
a full-text-only query, `where(...)` filters rows before the search
selects candidates.
- Update the guide and regenerate the Node API reference. Vector and
hybrid queries also prefilter by default and can use
`VectorQuery.postfilter()`. In hybrid search, it filters candidates from
both searches before reranking.
## Root cause
The website's TypeScript examples used the legacy `vectordb` method
`.prefilter(...)`, which is absent from `@lancedb/lancedb`. The Node API
reference left full-text and hybrid filter timing implicit.
## Validation
- Ran `full_text_search.test.ts`, `filtering.test.ts`, and
`search_examples.test.ts` in `docs/web-tests/ts` with the locked npm
SDK. All eight tests passed, as did a targeted TypeScript check of those
files.
- Ran the exact snippet imported by the guide against the locked npm SDK
and the SDK built from this branch. Both runs returned the expected
full-text match and confirmed prefiltering and postfiltering behavior
for vector and hybrid queries.
- Built the Node native binding, compiled the SDK, and regenerated the
TypeDoc reference. Biome passed for the SDK, SDK examples, and the
changed website test. The full website test directory produced the same
existing Biome and TypeScript diagnostics as `main`.
Fixes#2237
<!-- lance-gatekeeper-fix:v1 agent=1e80a282d1024d8eadf8e0ff33d83c9d
generation=1 -->
---------
Co-authored-by: Gatefixer <313497061+lancedb-gatefixer[bot]@users.noreply.github.com>
Co-authored-by: Xuanwo <github@xuanwo.io>
## Summary
- Rust remote connect reads `LANCEDB_API_KEY` when a `db://` connection
has no `api_key` and no `oauth_config`. Python already does this in its
own wrapper; Node and Rust callers did not.
- An explicit API key still wins. An empty `LANCEDB_API_KEY` is treated
as present, matching Python's `is None` check, and the connection sends
no `x-api-key` header.
- OAuth does not read the variable, so an ambient key cannot turn an
OAuth connect into an invalid API-key-plus-OAuth configuration. The
fallback lives in Rust `execute_remote`, so Node does not write the
credential into the caller's options object.
Supersedes #3797, which is stale and conflicting. This addresses the
Gatekeeper requests there: do not apply the environment key when
`oauthConfig` is set, and do not write it into the caller-owned options.
## Test plan
- [x] `cargo test --features remote -p lancedb --lib connection::` (each
env case re-runs the test binary as a child process with
`LANCEDB_API_KEY` set or removed on the child `Command`; no in-process
`set_var`/`remove_var`)
- [x] `cargo clippy -p lancedb --all-targets --features remote -- -D
warnings`
- [x] `cargo fmt --all -- --check`
- [x] `cd nodejs && pnpm build`
- [x] `cd nodejs && pnpm exec jest __test__/remote_api_key_env.test.ts`
(env set only in a child process; missing-key case asserts `connect()`
itself rejects against the loopback endpoint; OAuth case asserts
`x-api-key` is absent)
- [x] `cd nodejs && pnpm lint-ci`; `pnpm run docs` leaves `docs/src/js`
unchanged
Written with Cursor (Grok).
---------
Co-authored-by: Preston Zhao <195942578+canyang25@users.noreply.github.com>
Co-authored-by: Xuanwo <github@xuanwo.io>
## Summary
Function registration uses Flight SQL. If the SDK has no usable SQL URI
or cannot establish a connection, it points to the cluster’s published
Flight SQL URI and the Public SQL or PrivateLink SQL settings. The
diagnostic retains the original exception type, cause text, and request
ID when present.
## Validation
- Built main (`0abc7d48`) and the SDK change (`4bfdbb217`) in the same
isolated Linux VM with the locked Python environment. The final commit
updates only the test assertion for platform-dependent connection
errors.
- Compared 22 calls against a healthy HTTPS REST fixture and Flight
endpoints. The expected five registration failures gained the hint.
After accounting for request IDs, all original errors and successful
results matched.
- New regression tests on main had two expected failures and three
passing controls. The SDK change passed 86 tests with 16 skipped across
registration, Function catalog, SQL, and view creation. Rust formatting
and Ruff passed.
- All 50 GitHub checks passed on `7c2dad8bc`, including the [Python
workflow](https://github.com/lancedb/lancedb/actions/runs/46796061600)
and the [Rust macOS 26
rerun](https://github.com/lancedb/lancedb/actions/runs/46796061943/job/143185732469).
Closes#5340.
Reject `CombinedFields` before sending an FTS query to a LanceDB
Enterprise server older than 0.3.0. The check follows all Boolean
clauses and both sides of a Boost query. The 0.3.0 regression test also
checks that unequal column weights and the `AND` operator reach the
server.
Reproduced with Python SDK 0.42.1 against a mock 0.2.0 server. Both
searches returned HTTP 200. The top-level query lost its weights and
operator, and the nested Boolean query sent an empty string. The same
searches preserved the structured query on 0.3.0.
Fixes#5241
## Summary
Python inferred fixed-size vectors from names such as `text_embedding`,
but the bad-vector sanitizer used a narrower naming rule. Ragged rows
could reach Arrow and fail the cast, and schema inference could accept
an `embedding` row containing NaN.
Use the schema-inference name check when selecting floating-point
vectors for sanitization. When a target schema exists, apply the
expanded naming rule to fixed-size lists so an explicitly
variable-length column such as `embedding_history` keeps its list
semantics. Creation now rejects NaNs in these inferred vectors under the
default `error` policy. The `drop`, `fill`, and `null` policies handle
them during creation, append, and overwrite.
The four streaming bad-vector policy regression cases come from
[#5003](https://github.com/lancedb/lancedb/pull/5003).
Fixes#5241.
## Testing
Tests: `/bin/sh -c 'cd python && PYTHONPATH=python
UV_PROJECT_ENVIRONMENT=/tmp/osscout-lancedb-venv uv run --no-sync pytest
python/tests/test_table.py -k bad_vectors_in_name_inferred_columns -q
--tb=short'`.
Result: Existing related tests on base, cd python && PYTHONPATH=python
UV_PROJECT_ENVIRONMENT=/tmp/osscout-lancedb-venv uv run --no-sync pytest
python/tests/test_table.py -k 'bad_vectors or with_nans or null_elements
or empty_fixed_size_list or integer_embeddings or infer' -q — exit 0, 75
passed, 501 deselected in 1.18s.
Result: Base regression, cd python && PYTHONPATH=python
UV_PROJECT_ENVIRONMENT=/tmp/osscout-lancedb-venv uv run --no-sync pytest
python/tests/test_table.py -k bad_vectors_in_name_inferred_columns -q
--tb=short — exit 1, 19 failed, 9 passed, 576 deselected in 5.29s. The
nine default vector controls passed. Output is in OSSCOUT_BASE.log.
Result: Patched regression, cd python && PYTHONPATH=python
UV_PROJECT_ENVIRONMENT=/tmp/osscout-lancedb-venv uv run --no-sync pytest
python/tests/test_table.py -k bad_vectors_in_name_inferred_columns -q
--tb=short — exit 0, 28 passed, 576 deselected in 0.54s. Output is in
OSSCOUT_PATCHED.log.
Result: Patched affected modules, cd python && PYTHONPATH=python
UV_PROJECT_ENVIRONMENT=/tmp/osscout-lancedb-venv uv run --no-sync pytest
python/tests/test_table.py python/tests/test_util.py
python/tests/test_embeddings.py -m 'not slow and not s3_test' -q
--tb=short — exit 0, 822 passed, 19 skipped, 8 deselected, 32 warnings
in 15.11s.
Result: Patched namespace creation checks, cd python &&
PYTHONPATH=python UV_PROJECT_ENVIRONMENT=/tmp/osscout-lancedb-venv uv
run --no-sync pytest python/tests/test_namespace.py -k create_table -m
'not slow and not s3_test' -q --tb=short — exit 0, 5 passed, 89
deselected, 4 warnings in 0.20s.
Result: From the repository root, /tmp/osscout-lancedb-venv/bin/ruff
format python/python/lancedb/table.py python/python/tests/test_table.py
left both files unchanged. /tmp/osscout-lancedb-venv/bin/ruff check
python passed.
Result: From the repository root, /tmp/osscout-lancedb-venv/bin/ruff
format --check . and /tmp/osscout-lancedb-venv/bin/ruff check .
--output-format concise flagged six files for reformatting and 59 lint
findings, respectively, all under unchanged docs/web-tests paths.
Result: git diff --check passed.
Regression coverage: `python/python/tests/test_table.py`.
<!-- oss-scout-job:job-f4fee21f-9051-4409-b66f-195dad93a5df -->
---------
Signed-off-by: wangshun <96341168+xixi-box@users.noreply.github.com>
Co-authored-by: Xuanwo <github@xuanwo.io>
Co-authored-by: Aditya Gupta <84338325+MaiAditya@users.noreply.github.com>
## Summary
- Use the incoming Arrow schema and metadata for Arrow overwrite input,
even if the previous table had automatic embeddings.
- Preserve current schema conversion for append and row-object
overwrite.
- Resolve the incoming schema's embedding provider only when its vector
column needs generation. Compute missing vectors across every Arrow
batch.
## Validation
- Native regression creates an embedding table, verifies that a row
overwrite computes its vector, then replaces the table with a different
Arrow schema and checks its metadata and stored row. The test fails on
main when the SDK passes a null value to the previous embedding
function.
- Embedding Jest suite with the 0.42.0-beta.38 native binding: 15
passed, 1 skipped (requires an OpenAI key). TypeScript compilation with
`--noEmit` and Biome checks passed.
- Reopened two-batch imports preserve both precomputed vectors with no
provider registered and generate vectors for both rows when inputs are
missing. Both regressions failed before the follow-up. Across
`embedding.test.ts` and `arrow.test.ts`, 511 passed and one OpenAI
integration was skipped. TypeScript and Biome passed.
Fixes https://github.com/lancedb/lancedb/issues/5275
---------
Co-authored-by: Divyam Talwar <DivyamTalwar@users.noreply.github.com>
Co-authored-by: Divyam Talwar <194859478+DivyamTalwar@users.noreply.github.com>
Fixes#5285.
## Summary
- Decode a backtick-quoted SQL column name for the Blob bytes lookup.
Continue passing the original SQL through to query execution.
- Cover direct Blob aliases and a quoted struct containing a nested
Blob, alongside unchanged unquoted projections and SQL string literals.
- Preserve the existing descriptor output in Embedded queries when a
quoted identifier itself contains a dot. A separate projection of the
actual nested Blob still returns its bytes.
## Testing
- Reproduced the descriptor output with the published Node package and
saw the new native Embedded regression fail on main.
- 206 tests passed across the native nested Blob, Blob, expression, and
query suites. Independently reran the new regression.
- TypeScript build, targeted Biome checks, and `git diff --check`
passed. Tests use the release-matched native module.
AI assistance was used to identify, implement, and review the change.
---------
Co-authored-by: Divyam Talwar <152021174+DivyamTalwar@users.noreply.github.com>
Co-authored-by: Divyam Talwar <194859478+DivyamTalwar@users.noreply.github.com>
## Summary
A vector, full-text or hybrid search can return a row whose reranking
text is null. `WatsonxReranker` sent that null in the `inputs` list it
passes to `Rerank.generate`, although watsonx.ai reranks a list of
strings, so one row with missing text broke reranking for every other
row.
Filter rows with null text out of the Arrow table before building the
request, so the indices watsonx.ai returns still select the right rows
and keep their original columns. When every candidate has null text,
return an empty scored table without calling the API. The class
docstring now says that rows with a null `column` value are left out of
the reranked results.
This is the same change as #5283 (Cohere) and #5296 (Jina), applied to
the watsonx.ai reranker.
[watsonx.ai text rerank
API](https://cloud.ibm.com/apidocs/watsonx-ai#text-rerank)
## Verification
- Added `test_watsonx_reranker_nullable_documents`, run through a real
local table and `table.search(...).rerank(...)`, with two cases:
- a null between two valid documents, where the mocked client returns
reordered indices: only the two valid texts are sent, and the result
keeps the correct row IDs, scores, `_distance` column and `float32`
`_relevance_score`;
- all-null input, where the client is never called and an empty typed
result comes back.
- Both cases fail on `main` and pass with this change.
- Ran against LanceDB 0.42.1 with the changed reranker module copied
over the installed one. The installed `watsonx.py` is identical to
`main`. I did not call the live watsonx.ai API.
- Repository Ruff lint and format checks pass.
## Summary
A vector, full-text or hybrid search can return a row whose reranking
text is null. `VoyageAIReranker` sent that null in its `documents` list,
although the Voyage rerank API takes a list of strings, so one row with
missing text broke reranking for every other row.
Filter rows with null text out of the Arrow table before building the
request, so the indices Voyage returns still select the right rows and
keep their original columns. When every candidate has null text, return
an empty scored table without calling the API. The class docstring now
says that rows with a null `column` value are left out of the reranked
results.
This is the same change as #5283 (Cohere) and #5296 (Jina), applied to
the VoyageAI reranker.
[Voyage AI reranker
API](https://docs.voyageai.com/reference/reranker-api)
## Verification
- Added `test_voyageai_reranker_nullable_documents`, run through a real
local table and `table.search(...).rerank(...)`, with two cases:
- a null between two valid documents, where the mocked client returns
reordered indices: only the two valid texts are sent, and the result
keeps the correct row IDs, scores, `_distance` column and `float32`
`_relevance_score`;
- all-null input, where the client is never called and an empty typed
result comes back.
- Both cases fail on `main` and pass with this change.
- Ran against LanceDB 0.42.1 with the changed reranker module copied
over the installed one. The installed `voyageai.py` is identical to
`main`. I did not call the live Voyage API.
- Repository Ruff lint and format checks pass.
The CLI guide covers Homebrew, the shell installer, and manual
downloads. Readers who use Python tools need the PyPI package name
because it differs from the executable name. This adds examples for
running the CLI once and installing it persistently, and clarifies how
maintainers retry a partial PyPI upload.
## Summary
- Import `lancedb` before the Embedded Python connection example uses
it.
- Explain how to use the default RRF reranker when skipping the optional
setup step in Python or TypeScript.
## Testing
- Ran the original walkthrough in fresh Python 3.12 and Node.js 24
processes. The Python connection raised `NameError`, and skipping the
optional reranker setup raised `NameError` in Python and
`ReferenceError` in TypeScript.
- Ran the updated steps with the published LanceDB 0.42.0 Python and
Node SDKs, real Embedded tables and full-text indexes, and deterministic
test embeddings. Both explicit and default RRF returned the same four
rows in the same order and with the same relevance scores in each SDK.
- Checked the edited page with Vale 3.24.0 and checked the staged diff.
AI assistance disclosure. OpenAI Codex reproduced the errors, prepared
the documentation change, and ran the checks.
Both Linux aarch64 wheel variants intermittently lose the final
`lancedb-python` rustc process during fat LTO. The affected runners
reported 31 GiB of RAM and 16 GiB of configured swap, and the logged
Docker invocation supplies no explicit memory cap. The same runner image
has also completed wheel builds, so the historical logs leave the source
of SIGKILL undetermined. [Standard wheel
failure](https://github.com/lancedb/lancedb/actions/runs/46692473826/job/142804749599)
· [Free-threaded release
failure](https://github.com/lancedb/lancedb/actions/runs/46648917509/job/142722631114)
Give the two native ARM wheel builds 32 GiB of swap through their shared
composite action. This keeps fat LTO and one codegen unit, which
preserve release wheel size headroom, and keeps the existing manylinux
platform and ABI tags. Record the build container's memory and swap
peaks and OOM counters on exit, with kernel and systemd-oomd logs on
failed native ARM jobs.
This adds a `.progress()` option to `IndexBuilder` and plumbs it through
`create_index` to the lance `CreateIndexBuilder`.
There was already a progress callback usable with `table.optimize()` via
`OptimizeOptions`, but it was not exposed for `table.create_index()`,
although the underlying lance methods support it.
## Summary
- run the existing MkDocs deployment build in strict mode
- turn documentation warnings, including unresolved references, into CI
failures instead of deploying them
## Why
The docs workflow currently completes when MkDocs emits warnings. Using
MkDocs' built-in strict mode makes the deployment stop on those warnings
and surfaces documentation problems immediately. This addresses the
warning-detection portion of #572 without adding another dependency or
duplicating the docs build.
## Validation
- `git diff --check`
- parsed `.github/workflows/docs.yml` with PyYAML
- full `mkdocs build --strict` was not run locally because MkDocs is not
installed; the existing docs workflow has the required dependencies
---------
Co-authored-by: Will Jones <willjones127@gmail.com>
Co-authored-by: Xuanwo <github@xuanwo.io>
The `lancedb-tools` release contains wheels for Apple Silicon and two
Linux architectures. Users on Intel macOS have no compatible wheel, so
the Python installer has no way to install the CLI. This extends the
release workflow from #5313 to build a source distribution from the same
tag and check the source fallback before the release team approves
publication.
This was accomplished with the following changes:
- Package the tagged Rust CLI, workspace manifests, lockfile, and
licenses with a setuptools-rust binary target.
- Install by package name on a native Intel macOS runner with all four
release files available, then check that pip selected the sdist and
built a working x86-64 executable.
- Upload the tested sdist alongside the wheels and verify its published
SHA-256 digest.
An indexed cosine query with an unindexed tail can lose valid rows when
its distance range has a positive lower bound. Lance now translates the
candidate bounds for exact rescoring. Replanning the ANN branch with
doubled inputs can translate them a second time. A public range of
`[0.10, 0.16)` then reaches the index as `[0.40, 0.64)`.
The SDK checks the candidate bounds on each quantized cosine ANN node.
If Lance already supplied the normalized squared-L2 bounds, the SDK uses
that node. Exact fallback and refinement keep their original range, and
returned distances use the public cosine scale.
The regression compares indexed results against a brute-force scan after
appending an out-of-range vector. It exercises modern and legacy IVF_PQ,
single-query refinement, and modern batched queries with and without
refinement. Rust formatting and whitespace checks passed. Project CI
runs the behavioral tests.
Refs #4371
The link checker flags
`https://docs.lancedb.com/performance#compaction-and-cleanup` because
that section no longer exists. Compaction has its own page now, and its
"When to run it" section (`#when`) covers the warning this link is
attached to: tables with many small fragments.
This points `DocLink::Compaction` at `/maintenance/compaction#when` and
updates the two tests that hard-code the URL. The anchor exists on the
published site and in `docs/web/maintenance/compaction.mdx`, so
`test_all_doc_links_resolve_in_repo_docs` still holds.
Tests: `python -m unittest ci.tests.test_extract_sdk_doc_links` and
`cargo test -p lancedb --lib docs::tests::` pass locally.
Co-authored-by: Xuanwo <github@xuanwo.io>
The Rust core (lancedb::index::scalar::NGramIndexBuilder) and the Python
SDK already support the NGram scalar index, and the Node.js SDK can
create one on Embedded with `Index.plugin("ngram")`. This change adds a
dedicated `Index.ngram()` factory. NGram is a scalar index on a UTF-8
string column that accelerates substring filters such as contains(col,
'needle'), along with some LIKE and regular-expression predicates, by
narrowing a scan to rows that share the query's trigrams.
Add an ngram() napi factory and Index.ngram() in the TypeScript SDK,
mirroring the existing btree and fm scalar index factories, with tests
for both factories. On Embedded, the query plan uses the index and the
exact substring filter excludes rows that only share the query’s
trigrams. On Enterprise, `Index.ngram()` sends `index_type: "NGRAM"`,
while `Index.plugin("ngram")` sends `index_type: "PLUGIN"` with
`plugin_type: "NGRAM"`.
---------
Co-authored-by: Xuanwo <github@xuanwo.io>
Completes #4364 together with #4756, which did the Python side.
## Changes
- `Index.fts()` / `FtsOptions` and `tokenize()` gain `analyzer`
(`"text"` or `"code"`), `splitIdentifiers`, `splitOnNumerics`,
`preserveOriginal` and `indexOperators`. All are optional, so existing
indexes and calls behave as before.
- Validation matches the Python SDK: `analyzer: "code"` with a
`baseTokenizer` other than `"code"` or `"simple"` is rejected,
`analyzer: "text"` with `baseTokenizer: "code"` is rejected, and turning
on a code flag without the code analyzer is rejected. Passing a flag as
`false` is always allowed. The checks live in one helper used by both
`fts` and `tokenize`.
- The option docs state the defaults (`analyzer: "code"` alone keeps
identifiers whole; `splitOnNumerics` and `preserveOriginal` only matter
with `splitIdentifiers: true`) and link the two Lance limitations noted
on #4756 (lance#9674 and lance#9658).
Shared presets can still include extra fields. For example, a preset can
carry the index name for `createIndex()` alongside the analyzer options
used by `Index.fts()` and `tokenize()`.
## Tests
The Node tests check exact tokens from both the named index and
standalone tokenization, whole identifiers, subword matches, shared
presets and invalid combinations of known options. With the rebuilt
native addon, the full local Jest run passed 2,045 tests across 37
suites, with 27 tests skipped. TypeScript checks, lint and API reference
regeneration also passed.
---------
Co-authored-by: Xuanwo <github@xuanwo.io>
`create_table` with `CreateTableMode::ExistOk` treated any successful
`describe_table` as an existing table and tried to open it. A table that
was only declared in the namespace (no data on storage yet) failed with
`TableNotFound ... DatasetNotFound ... _versions`, while `Create` mode
already handles this case.
- Ask `describe_table` for `check_declared`, and only open the table
when `is_only_declared` is not true.
- Otherwise fall through to the normal create path, and handle a declare
conflict for `ExistOk` the same way as for `Create`.
Test: `test_namespace_create_table_exist_ok_after_declare_only` fails on
main with `TableNotFound { name: "declared_only", ... _versions }` and
passes with this change. The existing `exist_ok` tests are unchanged and
pass.
The race between `describe_table` and `declare_table` is unchanged by
this PR.
## Summary
Callers that consume every selected hit can relax the final output order
with `ordered_results(false)` in Rust, `ordered_results(False)` in
Python, or `orderedResults(false)` in TypeScript. Ranked output remains
the default. The option preserves top-k selection, each hit’s score and
projected columns, and the existing rules for ties at the cutoff.
Embedded passes eligible queries to the Lance scanner. Enterprise sends
`"ordered": false` for eligible searches and omits the field by default.
Explicit sorting, positive offsets, batch vector queries and inputs to
hybrid fusion or reranking keep their existing order.
## Validation
A managed Linux preview passed 8 Rust wire cases, 4 Embedded Python
cases, 10 HTTP mock cases and all 52 TypeScript query tests. The preview
used a candidate Lance revision. Project CI on this PR validates the
integration with the official Lance `v16.0.0-beta.6`.
Uses the official Lance dependency from #5327, now merged into `main`.
Several Python tests are skipped on Windows, so the Windows CI job never
runs them. I ran them on Windows and they pass now, so this PR removes
the skips:
- `test_db.py`: the four `namespace_client` tests ("Namespace client
issues")
- `test_table.py`: `test_consistency` ("directory namespace is not
supported on Windows yet")
- `test_namespace_integration.py`:
`test_namespace_create_schema_only_with_provider`
- `docs/test_search.py`: the five FTS tests that pointed at
lancedb/lance#3905, which was closed in June 2025
Two of the `namespace_client` tests still failed on Windows, but only
because of how they checked the root. `namespace_id()` returns a Rust
debug string like `DirectoryNamespace { root: "C:\Users\..." }`, so the
backslashes are escaped and `str(tmp_path) in namespace_id()` was false.
The assertion now escapes them the same way first. On POSIX paths that
is a no-op, so the check is unchanged there.
No library code changes.
### Testing
On Windows 11, Python 3.12, with the `lancedb==0.42.1` wheel:
- The 17 re-enabled test cases pass. I ran them 6 times in a row and
they passed every time, including `test_consistency` with the 0.1 s
interval.
- Full suite (`-m "not slow and not s3_test"`): 4777 passed, 205
skipped, 0 failures.
- `ruff check` and `ruff format --check` pass.
I found this with help from Claude Code (Claude Opus 5.5) while running
the test suite on Windows. I checked each change and ran the tests
myself.
BREAKING CHANGE: Callers that initialize `VectorQueryRequest` with an
exhaustive struct literal must add `query_parallelism: None` to preserve
automatic scheduling.
Expose Lance's existing IVF partition-search concurrency control through
the Rust `VectorQuery::query_parallelism` builder. This lets callers
override the automatic sequential policy used by flat sub-indexes
without changing the probe budget or bypassing LanceDB's query API.
The setting is optional, so existing queries keep their behavior.
Accepted values match Lance: `0` for automatic selection, `-1` for the
CPU pool, `1` for sequential execution, and positive limits for
partition-parallel execution. Values below `-1` are rejected, including
requests constructed directly through public fields.
An ordinary Embedded IVF query applies the setting within each index
segment. Separate segments may run concurrently. If the selected plan
uses shared batch IVF, an explicit value returns `NotSupported` because
its scheduler controls its own load and scoring windows. Leaving it
unset preserves batch execution. Enterprise also returns `NotSupported`
before sending an explicitly configured query because its request
contract does not support this setting. Namespace queries with explicit
settings route locally. The existing ordering, scan-order and RTE checks
remain in effect.
The tests cover single-segment IVF values and result equivalence,
two-vector Embedded batch execution with the option unset and rejected
explicit settings, Enterprise default requests and rejection before HTTP
for explicit settings, direct invalid requests, and namespace/RTE
routing. The Rust API and vector-search guide document the per-segment
scope.
Lance already exposes this control (introduced in
https://github.com/lance-format/lance/pull/6475); this PR exposes it at
the LanceDB Rust layer.
---------
Co-authored-by: Xuanwo <github@xuanwo.io>
`Table.update({ values })` accepts `ArrayBufferLike` in TypeScript, but
passing a `SharedArrayBuffer` to update a binary column throws
`Unsupported value type: object value: ([object SharedArrayBuffer])`. An
ordinary `ArrayBuffer` created in another Node.js VM context also fails
the serializer's `instanceof ArrayBuffer` check.
Use Node's `isAnyArrayBuffer` to recognize both kinds of buffer across
contexts, then pass their bytes through the existing SQL binary literal
encoder.
The table regression writes `00 80 ff` from shared memory and reads the
bytes back on each supported Arrow major (15–21). A separate serializer
test covers an `ArrayBuffer` from another VM context. All eight cases
failed before the fix.
### Validation
- Node 22 on macOS arm64, using the upstream native build from
`0d735c9`: both complete Jest files passed (701 passed, 3 skipped).
- Node SDK Biome checks and strict TypeScript checks for the serializer
and its unit tests passed. The full SDK type check reported the same ten
diagnostics on the base commit and patched tree with this local setup
(optional embedding packages and older native reranker declarations).
Fixes#4849.
**Problem**
- TypeScript SDK: `Branches.list()` returned napi class instances whose
fields live on the prototype, so `console.log`, spread and
`JSON.stringify` showed `{}` (the exact symptom in the docs example).
`create_at` and `metadata`, which Lance already stores for every branch,
were not exposed at all.
- Python SDK: the `Branches.list()` dicts also dropped `create_at` and
`metadata`.
**Change**
- `nodejs/src/table.rs`: `BranchContents` stays a runtime napi class
export and gains `create_at` (Unix seconds) and `metadata`, populated
from the stored Lance branch contents. The `metadata` getter defines
every key as an own enumerable data property (`napi_define_properties`),
so keys like `__proto__` that ordinary map conversion would route to the
prototype setter are preserved.
- `nodejs/lancedb/table.ts`: the `Branches.list()` wrapper promotes all
fields (`parentBranch`, `parentVersion`, `createAt`, `manifestSize`,
`metadata`) to own enumerable properties on each returned instance by
reusing the class getters and setters, so spread and `JSON.stringify`
see them while `instanceof` keeps working. Its return type is
`ListedBranchContents`, which guarantees `createAt` and `metadata`.
- Public typing: the exported `BranchContents` type keeps its released
shape (`parentBranch`/`parentVersion`/`manifestSize` only), so values
and interfaces written against it stay assignable and extendable,
including a view whose `createAt` is a `Date` and an interface that
extends `BranchContents` with its own `metadata`. `ListedBranchContents
extends BranchContents` adds `createAt` and `metadata` as required
fields, and the exported `BranchContents` constructor value has its
`prototype` typed as `BranchContents`, so the class value and
`instanceof` checks are unchanged.
- `python/src/table.rs`: `Branches.list()` dicts now include `create_at`
and `metadata`.
- Docs: regenerated TypeScript API reference for the new shape, and the
branching guide now documents `createAt`/`create_at` (Unix seconds) and
`metadata`.
**Tests**
- `nodejs/__test__/table.test.ts`: a branch whose stored ref file
carries non-empty metadata (including a `__proto__` key) and a known
creation time in Unix seconds is listed with both, as a `BranchContents`
instance with own enumerable fields, surviving spread and a JSON
round-trip with every metadata key intact. A second test covers the
consumer type contracts with `tsc`: a released-shape value with an extra
`createAt: Date` stays assignable to `BranchContents`, an interface
extending `BranchContents` can declare its own `metadata` shape, the
exported constructor's `prototype` is typed as `BranchContents`, and
`branches.list()` results guarantee `createAt` and `metadata`.
- `python/python/tests/test_table.py::test_branches`: same
non-empty-metadata (with `__proto__`) and known-`create_at` coverage.
- Verified locally on Linux x86_64: `tsc -b`, Biome checks, regenerated
docs diff limited to the `BranchContents` pages, node branches suite (34
passed), python `test_branches` (4 passed, 1 skipped).
---------
Co-authored-by: tomwangcn <tomwangcn@users.noreply.github.com>
Add rerank_vector() and rerank_fts() methods to Reranker trait, allowing
rerankers to work with single search modes instead of only hybrid
search.
Implemented for:
- RRFReranker (Rust and Python)
- LinearCombinationReranker (Python)
Resolves TODO at rust/lancedb/src/rerankers.rs:55
Changes:
- Extended Reranker trait with default implementations
- Added unit tests for new methods
- Updated documentation with examples
---------
Co-authored-by: Xuanwo <github@xuanwo.io>
LanceNamespaceDatabase::create_table previously ignored the
OpenTableRequest callback and bypassed schema validation when
CreateTableMode::ExistOk matched an existing table.
- Invoke (callback)(OpenTableRequest) and open via self.open_table(req)
so caller-supplied namespace open options (name, namespace_path,
lance_read_params) are applied.
- Compare the existing table schema against the incoming schema using
lance_core::datatypes::Schema persistence rules (compare_with_options)
and return Error::Schema ("Provided schema does not match existing table
schema") on mismatch.
- Add unit tests in database::namespace::tests covering
callback-selected table opening, FixedSizeList persistence
compatibility, and mismatched schemas for both create_table and
create_empty_table.
Closes https://github.com/lancedb/lancedb/issues/5123
---------
Co-authored-by: Xuanwo <github@xuanwo.io>
An Embedded hybrid query using `RRFReranker(return_score="all")` can
change unrelated result columns. On 0.42.1, a `time64[ns]` value of 1001
ns comes back as 1000 ns with pandas installed. A fixed-shape tensor
created with `FixedShapeTensorArray.from_numpy_ndarray` raises
`NotImplementedError` during the same query. Both columns round-trip
with the default relevance score.
The shared reranker merge converts every result row to a Python object
to combine `_distance` and `_score`. This change looks up row positions
by `_rowid` and takes rows and scores directly from the Arrow columns. A
hit in both searches keeps the vector row and receives the FTS score.
The regression tests run a hybrid search against an in-memory table and
compare the returned Arrow arrays with the inputs.
### Testing
- Both new cases failed before the change and passed after it. Also
verified the fix with pandas uninstalled.
- The two new cases and both existing rank-fusion score tests also
passed with the minimum supported PyArrow 16.0.0.
- Ran the checkout's rerankers with the 0.42.1 SDK and native extension.
`test_rerankers.py` and `test_typesafe_reranker.py` had 158 passes and
17 skips. Including `test_hybrid_query.py` gave 187 passes and 17 skips,
with the same 14 failures seen before this change against the release
SDK.
- Python Ruff checks and formatting for both changed files passed.
## Problem
`cargo clippy --workspace --tests` without the `remote` feature fails
under
`-D warnings`: a handful of items are reachable only from `remote`-gated
modules (or only from tests), so a local-only build reports them as dead
code
and unused imports. `cargo check -p lancedb --no-default-features`
reports the
same warnings.
## Fix
Gate the remote-only and test-only code behind its feature:
- `job.rs`: `TerminalResult::{remote, value, with_value}`, `Job::new`,
and the
in-process query-task constructors (`from_query_task`,
`new_with_cancellation`), which only remote SQL jobs and the job unit
tests
use, plus the `Uuid` import they need.
- `materialized_view.rs`: `RefreshMaterializedViewOptions::sql_clause`,
used
only to build the remote refresh request.
- `query.rs`: `AnalyzePlanDistributedMetrics::as_query_param`.
- `query/wal_fusion.rs`: the PK-fusion refusal memory (`PkFusionMemory`,
`MEMORY_TTL`) and its `Mutex`, `Duration`, and `Instant` imports.
- `table/computed_columns.rs`: the Function declaration planner and its
target/plan types (`FunctionApplication`, `FunctionOutputTarget`,
`FunctionInputTarget`, `FunctionDeclarationPlan`,
`function_input_nullability`, `plan_function_application`).
- `table/rte_stats.rs`: `GetRTEStatsResponse`.
- `utils`: `resolve_arrow_fts_field_path`.
The `TerminalResult::decode` E0599 half this branch originally fixed
(constructing `Error::Http` without `remote`) has since landed on `main`
separately (#4103, #4233), so the rebase drops that change and keeps
only the
remaining gating.
## Verification
- `cargo check -p lancedb --no-default-features`
- `cargo check -p lancedb --features remote`
- `cargo clippy -p lancedb --tests --no-default-features -- -D warnings`
- `cargo clippy --workspace --tests -- -D warnings`
- `cargo fmt --all -- --check`
[](https://github.com/deepseek-ai/deepseek-harness)
Co-authored-by: Xuanwo <github@xuanwo.io>
## Why
Lance stores a fixed-size list of a primitive type without its child
field and reads the child back as a nullable `item`. It also stores
`Utf8View`/`BinaryView` as `Utf8`/`Binary`. A schema such as
`DataType::new_fixed_size_list(DataType::Float32, n, false)` therefore
never equals the stored schema. In Python, Rust and TypeScript,
`exist_ok` fails with "Provided schema does not match existing table
schema" on every run after the first.
Part of #2570. This fixes reopening an existing table with `exist_ok`
and the original schema. The first create still normalizes the child
field, so `table.schema()` returns Lance's schema and the issue's
`assert_eq!(table.schema(), schema)` still differs.
## What changed
- `ListingDatabase::handle_table_exists` keeps the exact comparison. It
also accepts a provided schema that converts through
`lance::datatypes::Schema` to the table's schema, which is the same
conversion `NativeTable::schema` uses. A schema Lance can't convert
still returns `Error::Schema`.
- The reopen now passes the create request's `location` into
`OpenTableRequest` before the `exist_ok` callback runs. It used to open
the default location, so `create_table(..., exist_ok, location)` could
return a different table with the same name.
- Out of scope: the remote client's `exist_ok` fallback (`remote/db.rs`)
has the same strict `!=`. Whether it triggers depends on what the
server's describe returns, so I left it unchanged.
## Verification
- `test_create_table_exist_ok_with_lance_normalized_type` covers an FSL
with a non-null child, an FSL whose child is named `element`, and
`Utf8View`. A real difference (top-level nullability) still fails with
`Error::Schema`.
- `test_create_table_exist_ok_opens_requested_location` puts `id=10` at
the default location and `id=20` at an explicit one. With the original
and with the normalized schema, `exist_ok` with the explicit location
must return that URI and read back `id=20`.
- Each test fails without its fix and passes with it. `cargo test -p
lancedb --lib` (2383 passed), `cargo clippy -p lancedb --tests -- -D
warnings`, `cargo fmt --check` and typos are clean. The Python bindings
are unchanged, and `python/tests/test_db.py` was not run locally.
---------
Co-authored-by: Xuanwo <github@xuanwo.io>
Fixes#5316.
Writing `np.timedelta64(3_000_000, "ns")` to a millisecond duration
column succeeds but stores 3,000,000 ms. NumPy duration scalars also
match the integer serializer, which drops the unit before the update
reaches Arrow.
Give `np.timedelta64` its own serializer. It reads the dtype's unit and
multiplier, then reuses the Arrow duration serializer. Weeks through
minutes are expressed in seconds. Calendar and sub-nanosecond units
raise a conversion error, and `NaT` writes a null.
The regression tests read back Arrow's integer counts to check
cross-unit writes, exact nanoseconds, a negative value with a scaled
dtype, and nulls. They also check that rejected inputs leave the stored
value intact.
### Validation
- Reproduced the incorrect stored value on the published 0.42.1 Python
SDK.
- Ran the checkout's converter with the 0.42.1 SDK and native extension.
Before the fix, seven of the eight new regression cases failed. After
the fix, all 74 update-value tests and 24 related SQL conversion and
update tests passed. Also verified four asynchronous updates against an
Embedded table.
- Ruff lint and formatting checks passed for the Python SDK.
The overflow check and additional NumPy duration conversion tests come
from #5319.
Co-authored-by: tonydzi <194927794+tonydzi@users.noreply.github.com>
---------
Co-authored-by: Xuanwo <github@xuanwo.io>
Co-authored-by: tonydzi <194927794+tonydzi@users.noreply.github.com>
The deferred-result timeout regression intermittently fails in the macOS
SDK SQL job. The test pauses Tokio while opening a loopback DoGet, so
the SDK deadline and the gRPC request timer can compete to finish the
read. [Failure on
main](https://github.com/lancedb/lancedb/actions/runs/46420851203/job/141855322793)
Delay result-request headers so the SDK deadline expires before DoGet
starts. The regression checks that the pending reader returns the
overall timeout and that the Flight server receives cancellation. The
timeout assertion also reports the unexpected result on failure.
Jest now uses SWC to transpile the Node SDK tests, with the same ES2022
target and legacy decorator semantics as the SDK. The Node and Arrow
compatibility jobs run the existing test TypeScript project through `tsc
--noEmit` after building the SDK. Contributors can run that check with
`pnpm run typecheck:tests`.
Closes#2234.
Measured on Windows x64 with Node 22.23.4, Jest 29.7, the default native
features and one Jest process (`--runInBand --silent`). Both runs used
the same 0.42.0-beta.26 Windows native binary. Times below are
wall-clock seconds.
| Workload | ts-jest | SWC |
| --- | ---: | ---: |
| Six suites, empty Jest cache (median of three) | 8.31 | 4.22 |
| Same six suites, populated cache (median of three) | 4.45 | 3.52 |
| Full default suite, empty Jest cache (one run each) | 50.10 | 38.55 |
The six suites were `arrow`, `expr`, `materialized_view`, `package`,
`registry` and `sanitize`. Each pair started with a fresh Jest cache
directory and immediately reused it on the second run. The separate test
type check took 3.39 s, bringing the full SWC run plus type checking to
41.94 s on this machine.
Both full runs passed the same 1,882 tests with 28 skipped. The SDK
TypeScript build, test type check, Biome checks and TypeDoc build also
passed.
---------
Co-authored-by: lipeih <lipeihan@eazytec.com>
The Node binding's Rust tests construct and drop `napi::Error`. Its
cleanup code references Node-API symbols, which Node supplies when it
loads the addon. Standalone Rust test executables have no Node host, so
`lancedb-nodejs` fails at link time. [Linux
`build-no-lock`](https://github.com/lancedb/lancedb/actions/runs/46573309068/job/142389591633)
· [macOS 15 `--locked` test
job](https://github.com/lancedb/lancedb/actions/runs/46574143498/job/142392302720)
Enable napi-rs `dyn-symbols` through the dev dependency. Cargo activates
it when building the existing Rust tests and uses the original linkage
for ordinary addon builds.
On `08911d637`, deleting `Cargo.lock` and running `cargo +stable build
--profile ci --all-features --tests -p lancedb-nodejs --jobs 2`
reproduced the three missing symbols. With the same freshly resolved
dependencies, `cargo +stable test --profile ci --all-features --tests -p
lancedb-nodejs --jobs 2` linked and passed all 10 tests, including the
cause chain and resource metadata assertions.
---------
Signed-off-by: Xuanwo <github@xuanwo.io>
## Summary
The first Python example in the NVIDIA Nemotron guide calls
`lancedb.connect` without importing `lancedb`. Import the module so
readers can run the example in a fresh Python session.
## Test plan
- Ran the first fenced Python example from the guide in a fresh
namespace. The original raised `NameError` at the connection call.
- Reran the changed example with SDK stubs. It reached table creation,
insert, and search without calling a live NVIDIA endpoint.
- Checked that the diff changes only the import.
AI assistance disclosure. OpenAI Codex helped prepare and verify this
documentation change.
Fixes#4754
Add wand_factor support across synchronous and asynchronous FTS and
hybrid query APIs, with finite non-negative value validation, PyO3
propagation, query serialization support, and namespace execution
fallback when a custom factor is configured. Add tests covering default
behavior, custom values, validation, clearing the factor, sync/async
execution, serialization round-trips, and namespace routing.
---------
Co-authored-by: Xuanwo <github@xuanwo.io>
## Summary
The Node SDK now throws typed `LanceError` subclasses instead of one
generic `Error` with an indented `Caused by` string.
Fixes#222
## Before / after
```ts
try {
await db.openTable(\"missing\");
} catch (error) {
if (error instanceof TableNotFoundError) {
error.code; // \"TableNotFound\"
error.tableName; // \"missing\"
error.message; // \"Table 'missing' was not found\"
error.cause; // underlying dataset error
}
}
```
## Changes
- `nodejs/src/error.rs` — map each `lancedb::Error` variant to a
one-line header + `error.cause`
- `nodejs/src/query.rs`, `nodejs/src/merge.rs` — pass errors through
instead of stringifying
- `nodejs/lancedb/errors.ts`, `errors_install.ts` — real subclasses when
the package loads
- Tests + generated API docs under `docs/src/js/`
## Test plan
- [x] Native debug build, `tsc`, Biome, `cargo clippy -p lancedb-nodejs`
- [x] Jest: new error tests, remote retry, connection/query/table (594
passed)
## Notes
Node-API cannot construct a custom `Error` subclass from an async Rust
rejection, so translation happens in JS when `@lancedb/lancedb` loads.
Calling the raw native addon without that entrypoint still shows the
header line.
---------
Signed-off-by: ZYZ666-RGB <1991039819@qq.com>
Signed-off-by: yuzhou <1991039819@qq.com>
Co-authored-by: Xuanwo <github@xuanwo.io>
## Summary
Clarify what the Time-Travel RAG example demonstrates. It retrieves
different top documents with two embedding models. Distances are
measured within each model's embedding space. The text now gives readers
a way to evaluate relevance with the same queries and labeled judgments,
and links to the current embedding guide outside the terminal excerpt.
## Validation
Checked that the revised excerpt preserves the two recorded results and
that `/embedding` resolves to the embedding guide. A small Euclidean
example confirmed that rescaling embeddings can change distances while
preserving the ranking. The diff check passed. Validation covered the
tutorial text, link, and numeric example.
AI disclosure — OpenAI Codex checked the upstream recipe and
documentation, edited the tutorial, and validated the example and link.
Co-authored-by: AlexShen-Oguri <176059206+AlexShen-Oguri@users.noreply.github.com>
Co-authored-by: OpenAI Codex <codex@openai.com>
## Problem
Several Node APIs accept integer-only options but pass JavaScript
numbers straight to integer N-API parameters. Fractional values are
silently truncated, so `checkout(1.5)` checks out version 1,
`tags.create("v1", 1.5)` pins version 1, `limit(2.5)` returns two rows,
and bucket `numBuckets: 2.5` enables two buckets instead of rejecting
the input. Negative or out-of-range values also reach Rust after lossy
conversion.
## Change
- The native `Tags` export is kept: code registering `Tags` as a `new ()
=> Tags` constructor still compiles. Validation for tag versions happens
in `Tags.prototype.create`/`update` wrappers, and #5145's
`tags.create(name)` and `tags.create(name, null)` behavior (tag the
handle's visible version) is preserved and tested.
- `checkout(version)` validates numeric versions as non-negative
integers before conversion.
- `numBuckets` is checked only for the `bucket` write spec and must be
an integer in 1–1024 before native conversion; `identity` and
`unsharded` specs ignore it.
- `limit` on plain and vector queries is checked against the native
`u32` range (0–4294967295) before conversion, covering the upper
boundary; `limit(0)` still returns no rows from plain queries.
- `nprobes`, `minimumNprobes`, `maximumNprobes`, `ef` and `refineFactor`
reject non-integers via the existing `validateNonNegativeInteger`.
Fractional `searchEffort` stays valid and is covered by a positive
regression assertion. Branch APIs are outside this patch.
This does not change the separate `TagContents` serialization fix in
#4915, and is based directly on main rather than stacked on it. This is
not a complete audit of numeric options.
## Validation
- New regression tests: fractional checkout version; non-integer tag
create/update versions plus `create(name)`/`create(name, null)`
preserved; non-integer query options with `searchEffort` positive case;
`limit` u32 upper boundary accepted, one-past rejected, `limit(0)`
returning no rows; `numBuckets` fractional/0/1025 rejected for `bucket`
and ignored by `identity`/`unsharded`.
- All pass locally on Linux x86_64 against a native build from main;
`tsc -b` and Biome checks pass. TypeScript-only change; Rust and Python
sources unchanged.
---------
Co-authored-by: Xuanwo <github@xuanwo.io>