mirror of
https://github.com/lancedb/lancedb.git
synced 2026-11-26 12:33:59 +00:00
7a9afb8a3c60af800ee38d8bb037f95e8fd3cbbf
191
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
147fdb25a0 |
feat(python): add two-phase shuffled reads (2PSR) to elastic dataloader (#5066)
Supersedes #4263, which I can no longer push to. This PR continues the same branch, so the review history is there. ## Summary Adds two-phase shuffled reads (2PSR) to `StreamingDataset`, enabled with `block_size`: 1. **Block shuffle:** contiguous blocks of `block_size` live rows are shuffled and assigned to splits. This replaces 1-phase's per-row take with mostly contiguous range scans, which are much cheaper on object storage. 2. **Bounded row shuffle:** each split shuffles rows over a rolling window of `window_blocks` blocks. `max_shuffle_distance` bounds how far a row can move. The feature also supports `filter` (sparse takes of live rows), `reshuffle_blocks_per_epoch`, resume and checkpointing, background block prefetch, and multi-worker DataLoaders. 2PSR stays opt-in: `block_size=None` keeps today's 1-phase behavior. Since the last review round: - **Fixed worker startup with small blocks.** The pickled dataset no longer grows with the number of blocks; the block order is rebuilt in `__setstate__`. Once that pickle passed the 64 KiB pipe buffer, spawned DataLoader workers started one at a time (~280 s with 128 workers at ≤2,048-row blocks). - **Fixed per-call block copies.** Each loaded block is combined into a single chunk. Before, `take` on a multi-chunk block concatenated the whole block on every call. - **Fixed early eviction.** Blocks are evicted only behind the contiguous prefix of rows already served. With `io_queue_depth > 1`, calls can arrive out of order and previously evicted blocks that were still needed, causing 5–40% extra reads. - **New default:** `window_blocks` now defaults to 8, and the docstring recommends `block_size=512` with DataLoader workers. None of these fixes changes which rows are read or their order. A check across 12 config, epoch and seed combinations on 8 ranks gave identical per-rank order before and after. ## Benchmarks Throughput was measured on EC2 i4i.32xlarge in us-west-2, reading a FineWeb-Edu table of 4,096 B rows. Each number is the median of 3 trials, and each trial is a full pass. 2PSR used 512-row blocks, 256 splits, 128 workers and `io_queue_depth=4`. 1-phase used 32 splits, 8 workers and `io_queue_depth=32`. | Storage | Rows | 2PSR | 1-phase | Speedup | |---|---|---|---|---| | S3 | 8.4M (34 GB) | 16.9 s | 230 s | 13.6× | | S3 | 33.6M (137 GB) | 45.6 s | 781 s | 17.1× | | S3 | 134M (550 GB) | 168 s | 3,098 s | 18.4× | | Local NVMe | 8.4M | 16.4 s | 116 s | 7.1× | On the 8.4M-row S3 table, 2PSR reads 1.5–2.0 GB/s at every block size from 128 to 65,536 rows. A fit across the three S3 sizes gives 2PSR about 7 s fixed cost plus 3.4 GB/s, and 1-phase about 39 s plus 0.18 GB/s. That puts the large-table limit near 19×. Quality was measured by pretraining GPT-2 124M on 2^21 FineWeb-Edu docs for 16 epochs on 8×H100. The table shows final validation loss, mean ± SD over 3 seeds: | Reader | Final val loss | |---|---| | 1-phase | 2.8464 ± 0.0006 | | 2PSR, `block_size=128`, msd 4,096 | 2.8457 ± 0.0011 | | 2PSR, `block_size=512`, msd 4,096 | 2.8457 ± 0.0007 | | 2PSR, `block_size=2048`, msd 32,768 | 2.8466 ± 0.0009 | | No shuffle (1 seed) | 2.8606 | Every 2PSR config is within seed noise of 1-phase. The 95% confidence intervals of the difference all include zero and are at most 13% of the no-shuffle penalty. Training throughput was the same for every reader (3.15–3.18M tok/s, GPU-bound). ## Testing - `test_elastic_dataloader.py` and `test_permutation.py`: all 324 tests pass after merging `main`. The new tests cover: - pickle size independent of block count; - single-chunk blocks; - no re-reads under out-of-order calls; - window defaults; - resume, filter, worker and checkpoint behavior. - `ruff check` and `ruff format --check` are clean. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5 <noreply@anthropic.com> Co-authored-by: Xuanwo <github@xuanwo.io> |
||
|
|
4d9fd358f8 |
feat(nodejs): expose Function failure recovery APIs (#5209)
TypeScript callers can now inspect and recover Function row failures through the native workflow. `functionErrors()` groups returned failures and can show retained attempt history. `functionErrorRows()` looks up current failed inputs using row IDs and physical row addresses represented as `bigint`. Older deployments can continue to use the existing error listing. `retryFailed()` selects the exact failed rows on the server, with optional error type and job filters. `upgradeColumn()` binds an existing immutable Function version and can recompute failed rows, all eligible rows, or no rows. Callers can quarantine and release failures, explicitly include quarantined rows in a retry, and use `functionProvenance()` to see which Function version produced a recorded value. The native operations reuse the existing Rust workflow v1 capability checks. The Function failures guide includes TypeScript examples for inspecting, retrying, upgrading, and quarantining failures. |
||
|
|
757dcc0a6b |
feat(functions): declare multiple bindings in one add_columns call (#5202)
Allow Python callers to pass several registered Function applications to `add_columns`. Rust callers can use `function_bindings` to submit the same atomic declaration. An application can consume another output in the mapping, including one declared later. The SDK checks the Enterprise server's batch-declaration capability before sending the mutation. Single-binding callers continue to use the existing request shape. This change covers declaration only. Coverage includes Python mapping validation, the Rust HTTP request with dependent bindings, and older servers with missing or unknown capability values. Correctness tests run in CI. |
||
|
|
fc6dfca11a |
feat(python): add map() method to Permutation for dict-based transforms (#3264)
### Summary Adds `Permutation.map(fn, *, batched=False)`, a dict-based alternative to `with_transform` so users can write `fn(dict) -> dict` without touching `pyarrow.RecordBatch`. - `batched=False` (default): `fn` receives one row as a dict and returns a dict. - `batched=True`: `fn` receives the batch as `dict[str, list]` and returns the same shape, with one value per input row. - `map` calls can be chained. Callbacks run in order and the returned dict replaces the row, so the next callback only sees what the previous one returned. Unlike HuggingFace's `Dataset.map`, the output is not merged into the row. - A mapped permutation always yields `list[dict]`, whatever `batched` is, so it works with the default `DataLoader` collate. Rows keep their position, including duplicate offsets, and `take_offsets([])` returns `[]`. - `map` cannot be combined with an explicit `with_format` or `with_transform`, in either order. Doing so raises `ValueError` when the chain is built, whether or not the format's optional dependency is installed. - `select_columns`, `remove_columns` and `schema` describe the columns read from the base table, which are the input of the first callback. - The chain is stored in a module-level callable, so a mapped permutation can be pickled into `spawn` `DataLoader` workers as long as the callbacks themselves are picklable. - `with_transform` remains available for direct Arrow access. ### Documentation - Docstrings for `map`, `with_format` and `with_transform` cover the mixing rule, with a `DataLoader` + `collate_fn` example on `map`. - Adds a "Transforming rows with map" section to the Permutation guide. ### Testing - `test_permutation.py`: chaining, mixing errors in both orders, output validation, duplicate and empty offsets, projection and schema, and a pickle round-trip for both `batched` modes. - `test_permutation.py`: the mixing check with `polars` unimportable, with pickles written before the `explicit_transform` flag, and with a transform passed to the constructor. - `test_torch.py`: a map chain read through `DataLoader(..., multiprocessing_context="spawn", num_workers=1)`. Closes [#3246](https://github.com/lancedb/lancedb/issues/3246) |
||
|
|
b3dd2b0392 |
docs(search): clarify Hamming distance without a vector index (#5198)
## Why
The "Configure Distance Metric" section of
`docs/web/search/vector-search.mdx` says `hamming` is supported for
`IVF_FLAT` indexes only. That contradicts the runnable binary-vector
example on the same page, which searches packed binary vectors with
`distance_type("hamming")` and no index. A reader could think they must
build an index before using Hamming distance.
## What changed
- Say that `hamming` works for binary vectors without an index.
- Keep the note that `IVF_FLAT` is the index type for indexed Hamming
search.
## Scope
Docs only: one sentence in the evergreen user guide. The same wording
also appears in the saved Embedded v0.41.0 and Enterprise v1.12.0,
v1.13.0 and v1.14.0 doc editions. I left those alone in case maintainers
handle saved-edition corrections differently.
## Verification
- Ran the website's binary-vector example test and both SDK
binary-vector tests against the published `lancedb==0.41.0` wheel: `3
passed`. They confirm that unindexed Hamming search works.
- `git diff --check` is clean. I did not render the page locally.
This PR was prepared with AI assistance and reviewed before submission.
|
||
|
|
f5d1cd67c7 |
docs: add Homebrew installation to the CLI guide (#5197)
The public CLI guide covers the hosted installer, but users looking for a Homebrew install have to find the tap themselves. This adds the tap's install and upgrade commands alongside the shell installer. The shell example shows how to pin a release to `v0.42.0`. This was accomplished with the following changes: - Add Homebrew installation, version verification, and upgrade commands to `docs/web/tools/cli.mdx`. - Give the shell installer its own subsection under the existing Install heading. ### Testing The shell installer tests passed. Verified that the install instructions match the composed page in [docs#475](https://github.com/lancedb/docs/pull/475). |
||
|
|
27b7a248e4 |
docs: use refresh_column_async with wait on Enterprise pages (#5183)
## The problem
Several Python examples on Enterprise pages start a computed column
refresh with `table.refresh_column(...)`. On a LanceDB Enterprise
connection that call always fails:
```
NotImplementedError: not supported: a remote refresh runs as a server job; use refresh_column_async and wait on the returned handle
```
On Enterprise a refresh runs as a job on the server. Only
`refresh_column_async(...)` works there: it returns a job, and
`job.wait()` blocks until the job finishes. A reader following the
quickstart's Enterprise step, or the secrets or GPU examples, hits the
error. The same fix landed for the Sophon-owned page in
lancedb/sophon#10478.
## What this changes
- **The examples use the job form:** `job =
table.refresh_column_async(...)` then `job.wait()`. This covers
`curation/vend-secret.mdx`, `curation/create-function.mdx` and the
quickstart, plus the sentences that named the blocking call in
`enterprise/auto-refresh.mdx` and
`feature-engineering/add-computed-column.mdx`.
- **The quickstart example now comes from a test.** The
`PyQuickstartAddFeature` snippet is generated from the deployment test
in `docs/web-tests/py/test_quickstart.py`, and the separate
Enterprise-only snippet is folded into it. That test also asserts that
the blocking call raises an error naming `refresh_column_async`.
- **The GPU example only shows arguments the Enterprise table accepts
today.** `gpu_class` and `gpu_count` are dropped from `add_columns`, and
`gpu_count` from the refresh call, with a one-sentence note. See "Python
wrapper gap" below.
## How it was checked
Every Enterprise call the changed pages show was run through the Python
SDK (0.42.0b26, built from this branch) against a local stand-in for an
Enterprise server that returns canned responses:
- `table.refresh_column("embedding")` raises the error above and sends
no request.
- `job = table.refresh_column_async("embedding"); job.wait()` submits a
refresh job and returns its result.
- `table.refresh_column_async("embedding", gpu_class="h100",
total_gpu_count=8).wait()` is accepted, and the server receives both GPU
options.
- The removed forms fail as expected: `gpu_count` on
`refresh_column_async`, and `gpu_class` or `gpu_count` on `add_columns`,
raise `TypeError: unexpected keyword argument`.
Also: the committed quickstart snippet matches what the generator
produces from the test, and the five changed pages render with no
blocking call in a local preview.
**Not run:** the quickstart deployment test itself. It needs a real
Enterprise deployment and is skipped without credentials, which CI does
not have. Registering a Function also needs a real deployment, so that
line of the GPU example was not exercised.
## Python wrapper gap (to be fixed separately)
The Python `RemoteTable.refresh_column_async` and
`RemoteTable.add_columns` do not accept `gpu_count`, and `add_columns`
also does not accept `gpu_class`. The Rust remote table supports these
GPU placement options, so this looks like an oversight in the Python
layer. This PR makes no SDK change. Once the wrapper passes them
through, the GPU example can show them again.
## Risk
Low. Docs and docs tests only.
## Pipeline
Updates from [git push
no-mistakes](https://github.com/kunchenguid/no-mistakes)
<!-- no-mistakes-pipeline-attestation:v1
{"head_sha":"11ac1a260e8825dd406dea4e839f2498309e843b","steps":[{"step":"intent","status":"completed"},{"step":"rebase","status":"completed"},{"step":"review","status":"completed"},{"step":"test","status":"completed"},{"step":"document","status":"completed"},{"step":"lint","status":"completed"},{"step":"push","status":"completed"},{"step":"pr","status":"running"},{"step":"ci","status":"pending"}],"live_validation":{"verdict":"go","live":7,"total":9}}
-->
<details>
<summary>✅ **Intent** - passed</summary>
✅ No issues found.
</details>
<details>
<summary>✅ **Rebase** - passed</summary>
✅ No issues found.
</details>
<details>
<summary>✅ **Review** - passed</summary>
✅ No issues found.
</details>
<details>
<summary>⚠️ **Test** - 2 infos</summary>
- ⚠️ `docs/web/curation/create-function.mdx:546` - Not confirmed live.
The new example calls `table.refresh_column_async("embedding",
gpu_class="h100", gpu_count=4, total_gpu_count=8)`, but
`RemoteTable.refresh_column_async` in
python/python/lancedb/remote/table.py (line 1280) has no `gpu_count`
parameter (only `gpu_class` and `total_gpu_count`), while the abstract
`Table` and `LanceTable` do. If that reading holds, the documented call
raises `TypeError: unexpected keyword argument 'gpu_count'` on
Enterprise. The blocking `RemoteTable.refresh_column` has the same gap,
so this predates the change, but the page still shows a call that may
not run. Decision needed: drop `gpu_count=4` from the example, or add
the parameter to the Enterprise table (an SDK change beyond this docs
change).
- ⚠️ The intent asked whether the docs change can be validated by
running code. In this run it could not: the SDK build did not finish in
the time budget and no Enterprise deployment credentials are available,
so the only test covering the changed quickstart snippet
(`test_quickstart_derived_feature_on_a_deployment`) skips. The prepared
driver script in the evidence directory exercises the three documented
calls against a localhost emulator once the SDK is built.
- ⚠️ live validation verdict: inconclusive (4 of 7 scenarios were driven
live against the product); untested: On an Enterprise connection
(localhost emulator, synthetic responses) the documented `job =
table.refresh_column_async("embedding"); job.wait()` completes,
and the old blocking `table.refresh_column(...)` raises
NotImplementedError naming refresh_column_async, On an Enterprise
connection the create-function.mdx example
`table.refresh_column_async("embedding",
gpu_class="h100", gpu_count=4, total_gpu_count=8)` is accepted
and submits a job, `test_quickstart_derived_feature_on_a_deployment`
passes against a real LanceDB Enterprise deployment
- Live validation: ⚠️ inconclusive - 4 of 7 scenarios driven live
against the product
| Scenario | Result | Live | Evidence |
| --- | --- | --- | --- |
| Reader opens the six changed docs pages in the local Mintlify preview
and sees the job form (`refresh_column_async` + `job.wait()`) with no
blocking `table.refresh_column(` call left | ✅ pass | live |
Rendered-page check output (artifact 'Rendered docs check') and
saved HTML under
~/.no-mistakes/evidence/01M85TWQ599ZJ5NQ0DBASSFT91/rendered |
| Reader follows the new `refresh_column_async` link on the
computed-column page and lands on the 'Run a refresh on
Enterprise' section | ✅ pass | live | Rendered add-computed-column
page links to /feature-engineering/refresh-column#async; the rendered
refresh-column page (HTTP 200) contains an element with
id="async" |
| Quickstart page still renders after the Enterprise-only snippet import
was removed, and its feature step shows the job form | ✅ pass | live |
quickstart returns HTTP 200; page payload contains `job =
table.refresh_column_async("quality_score")\njob.wait()`; no
`PyQuickstartAddFeatureEnterprise` reference remains |
| Regenerating snippets from docs/web-tests/py/test_quickstart.py
reproduces the committed `PyQuickstartAddFeature` snippet | ✅ pass |
live | `mdx_snippets_gen.py` output in
~/.no-mistakes/evidence/01M85TWQ599ZJ5NQ0DBASSFT91/snippets-regen/quickstart.mdx
is identical to docs/web/snippets/quickstart.mdx for that export |
| On an Enterprise connection (localhost emulator, synthetic responses)
the documented `job = table.refresh_column_async("embedding");
job.wait()` completes, and the old blocking `table.refresh_column(.… |
⏸️ untested | no | Needs the Python SDK built from this worktree. `uv
run ... maturin develop` started from a cold cargo cache and was still
compiling after about 18 minutes, so I stopped it to stay inside the
30-minute… |
| On an Enterprise connection the create-function.mdx example
`table.refresh_column_async("embedding",
gpu_class="h100", gpu_count=4, total_gpu_count=8)` is accepted
and submits a job | ⏸️ untested | no | Blocked by the same unfinished
SDK build. The source suggests this call would raise TypeError (see
finding), but that was not executed. |
| `test_quickstart_derived_feature_on_a_deployment` passes against a
real LanceDB Enterprise deployment | ⏸️ untested | no | The test skips
unless LANCEDB_DOCS_TEST_DEPLOYMENT=1 and LANCEDB_URI,
LANCEDB_HOST_OVERRIDE and LANCEDB_API_KEY point at a deployment with a
Function catalog; a localhost emulator cannot stand in for… |
- <code>`cd docs/web && mint dev --port 3391 --no-open`, then
`curl http://localhost:3391/<page>` for quickstart,
curation/vend-secret, curation/create-function, enterprise/auto-refresh,
feature-engineering/add-computed-column,
feature-engineering/refresh-column (all HTTP 200), with a text check of
each rendered page</code>
- <code>`python3 docs/web-tests/mdx_snippets_gen.py -s docs/web-tests/py
-s docs/web-tests/ts -s docs/web-tests/rs -o
<evidence>/snippets-regen`, then diff of `PyQuickstartAddFeature`
against `docs/web/snippets/quickstart.mdx`</code>
- <code>`cd python && uv run --extra tests --extra dev maturin
develop --extras tests,dev` (started, not finished within budget,
stopped; no result)</code>
- <code>`chrome-devtools-axi` screenshots of the rendered pages (failed:
BRIDGE_NOT_READY)</code>
- <code>Source read of `python/python/lancedb/remote/table.py`
`refresh_column_async` signature against the create-function.mdx example
(not live)</code>
🔧 Fix applied.
2 infos still open:
- ℹ️ No screenshots of the rendered docs pages were captured.
`chrome-devtools-axi` failed with "Bridge failed to start within
30s" and headless Google Chrome hung until killed at 60s per page.
The pages were instead fetched as served HTML from a local `mint dev`
preview and saved under rendered-round2/. For the quickstart page the
job-form snippet is present only in the page's hydration payload,
not as rendered text, so its on-screen appearance was not seen.
- ℹ️ `docs/web-tests/py/test_quickstart.py:347` -
`test_quickstart_derived_feature_on_a_deployment`, the only test that
runs the changed quickstart snippet end to end, skips because no
Enterprise deployment credentials exist (LANCEDB_DOCS_TEST_DEPLOYMENT,
LANCEDB_URI, LANCEDB_HOST_OVERRIDE, LANCEDB_API_KEY). The same calls
were driven against a localhost emulator instead, which does not prove
real-deployment behaviour.
- Live validation: ✅ go - 7 of 9 scenarios driven live against the
product
| Scenario | Result | Live | Evidence |
| --- | --- | --- | --- |
| On an Enterprise connection (Python SDK, localhost emulator, synthetic
responses) the documented `job =
table.refresh_column_async("embedding"); job.wait()` submits a
refresh job and returns its resul… | ✅ pass | live |
driver-output-round2.txt: OK -> rows_assigned=3 ...; server received
POST /v1/table/test/backfill_column {'column':
'embedding'} |
| Adversarial: on the same Enterprise connection the old blocking
`table.refresh_column("embedding")` fails with
NotImplementedError naming refresh_column_async and sends no request | ✅
pass | live | driver-output-round2.txt: RAISED NotImplementedError: ...
use refresh_column_async and wait on the returned handle; requests sent:
[] |
| The create-function.mdx refresh example as now written,
`refresh_column_async("embedding", gpu_class="h100",
total_gpu_count=8)` then `job.wait()`, is accepted on Enterprise and
sends both GPU options | ✅ pass | live | driver-output-round2.txt:
server received {'gpu_class': 'h100',
'total_gpu_count': 8, 'column': 'embedding'} |
| The create-function.mdx `table.add_columns({"embedding":
<Function binding>}, total_gpu_count=8)` is accepted on Enterprise
and sends the fleet GPU ceiling | ✅ pass | live |
driver-output-round2.txt: OK -> AddColumnsResult(version=2); POST
/v1/table/test/add_columns/ body carries the Function binding and
'total_gpu_count': 8 |
| Adversarial: the GPU arguments removed from the create-function.mdx
example (`gpu_count` on refresh_column_async; `gpu_class`/`gpu_count` on
add_columns) are rejected by the Enterprise table, matching… | ✅ pass |
live | driver-output-round2.txt: TypeError unexpected keyword argument
'gpu_count' (refresh_column_async) and 'gpu_class'
(add_columns) |
| The committed `PyQuickstartAddFeature` snippet equals what the snippet
generator produces from docs/web-tests/py/test_quickstart.py | ✅ pass |
live | `mdx_snippets_gen.py` output in snippets-regen-round2; `diff -r`
against docs/web/snippets reports no difference for quickstart.mdx |
| A reader opening the five changed pages in a local Mintlify preview
sees the job form and no blocking `table.refresh_column(` call | ✅ pass
| live | rendered-round2-counts.txt and rendered-round2/*.html: all five
pages return 200 with zero blocking calls; job form present on each |
| `test_quickstart_derived_feature_on_a_deployment` passes against a
real LanceDB Enterprise deployment | ⏸️ untested | no | Ran the test; it
skips because no Enterprise deployment credentials exist here. A
localhost emulator cannot stand in: the test registers a Function over
Flight SQL and computes real values. To run it,… |
| `version = db.create_function(embed)` from the create-function.mdx
example registers a Function on Enterprise | ⏸️ untested | no | Tried it
against the emulator; the call goes over Flight SQL to a Function
catalog, which only a real Enterprise deployment provides. This line is
unchanged by the diff. Needs the same deployment cred… |
- <code>`~/.treehouse/lancedb-9ea8c9/1/lancedb/python/.venv/bin/python
drive_enterprise_refresh_v3.py` (lancedb 0.42.0b26 built at
|
||
|
|
5f87e18541 |
feat: create any registered Lance scalar index plugin by name (#5004)
Closes #4933 Adds a generic configuration for creating a scalar index of any type recognized by a registered database plugin, using its type name and optional JSON parameters. Index types without a dedicated SDK configuration can use the same API. - **Rust:** `Index::Plugin(PluginIndexBuilder)`, with JSON-object parameters through `.params(...)` or `.params_json(...)`. - **Python:** `ScalarPlugin(index_type, params=None)`, accepting a dict or JSON-object string. - **TypeScript:** `Index.plugin(indexType, params?)`, accepting an object or JSON-object string. - Type names are case-insensitive and surrounding whitespace is ignored. Empty names and non-object parameters are rejected. - Native index introspection preserves existing built-in types and exposes other registered plugin types through `Custom`. The guide and SDK references describe index creation, parameter ownership, and errors consistently. They recommend a dedicated configuration when one exists and refer readers to the plugin’s documentation for parameter names and defaults. The TypeScript reference is regenerated from its source JSDoc. ## Remote request format Generic requests use `index_type: "PLUGIN"` and a separate upper-cased `plugin_type`. Arbitrary parameters stay nested under `params`, preserving omitted parameters versus an explicit empty object. This separates the generic path from built-in handling and prevents parameters from overwriting request fields. ## Validation - 52 targeted tests passed: 15 Rust, 22 Python, and 15 TypeScript. - Two Rust plugin doctests passed. - Rust Clippy, the Node build and lint, changed-file Python lint, TypeDoc generation, Vale, and the MkDocs SDK-reference build passed. - Request tests cover Python sync/async calls, object and JSON-string inputs, normalization, omitted and empty parameters, and collisions with request metadata. - Repository-wide Ruff reports existing findings in untouched documentation examples. Strict Mintlify validation reports four missing snippet-export warnings, also reproduced on the unmodified commit. ## Follow-ups - Replace the built-in examples with a widely available custom plugin when one is available, as discussed in review. - Remote `list_indices()` and `index_stats()` still parse a fixed set of type names; accepting unrecognized plugin types through a `Custom` fallback remains separate. --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
726a6f77a5 |
feat(embeddings): support Cohere v2 endpoints for Foundry text retrieval (#5193)
Continues #2519 (originally contributed by @1jamesthompson1) to address #2518 for text retrieval with Cohere Embed models deployed on Azure AI Foundry. ## Summary Adds an opt-in native Cohere Embed API v2 (`ClientV2`) path to the existing `cohere` embedding registry entry (`CohereEmbeddingFunction`) for text-only retrieval against custom endpoints such as Azure AI Foundry (`https://<resource>.services.ai.azure.com/providers/cohere`, where the Cohere SDK appends `/v2/embed`). ### Behavior and Defaults - **Opt-in v2 route (`base_url`)**: When `base_url` is set, requests use `cohere.ClientV2` (`POST <base_url>/v2/embed`) with `embedding_types=["float"]`, split inputs into batches of up to 96 texts, disable SDK-level retries, and validate returned vector counts and dimensions. Application retries use `retry_with_exponential_backoff` in `embeddings/utils.py`, which adds an optional `do_not_retry` predicate used only by Cohere v2 so `3xx` redirects fail immediately without backoff while transient failures such as `429` retry only the failed batch. Non-string inputs are rejected; this change covers text retrieval only. - **Fixed retrieval roles**: In `base_url` mode, document embeddings use `search_document` and query embeddings use `search_query`. Setting other `source_input_type` or `query_input_type` values is rejected. - **Explicit endpoint parameters**: Setting `base_url` requires explicit `name` (the deployed model name), `output_dimension` (`> 0`, used for both the Arrow vector column width and the v2 request `output_dimension`), and `api_key`. Setting `output_dimension` or `api_key` without `base_url` is rejected. - **Unchanged hosted path**: When `base_url` is omitted, existing behavior is preserved — `cohere.Client` (`/v1/embed`), `COHERE_API_KEY`, existing default model/role settings, legacy table metadata restoration, and the existing `cohere>=4.0` package floor. - **Runtime SDK requirement**: Opting into `base_url` checks `cohere>=5.15.0` at runtime and raises an `ImportError` on older SDK versions without raising the minimum requirement for hosted users. ### Credentials and Endpoint Trust - `api_key` is declared in `sensitive_keys()` and must be a registry `$var:` reference without an inline fallback default (`$var:<name>` only). Table metadata persists only the variable reference. - `base_url` must be an HTTP(S) URL without embedded credentials, query strings, or fragments, and is exposed through `endpoints()` so reopening a table in a new process requires explicit approval via `registry.allow_endpoint(...)`. - `ClientV2` is cached per embedding function instance (`@cached_property`) with `httpx.Client(follow_redirects=False, timeout=300)` so redirects cannot forward requests or credentials off the approved endpoint. Because Cohere v2 classifies `3xx` responses as non-retryable via `do_not_retry`, a redirected `table.add` or `table.search` call makes one `POST` with zero application backoff and no request to the `Location` target (`table.add` surfaces the `307` inside the existing Arrow/Rust `RuntimeError` wrapper; `table.search` surfaces the Cohere `ApiError`). ## Verification - **Loopback HTTP SDK tests (`test_cohere_embeddings.py`)**: Passed against local loopback HTTP fixtures with real Cohere SDK `5.15.0` (opt-in minimum), `7.0.5`, and `7.3.2`. Verified exact `/providers/cohere/v2/embed` path, bearer auth header, JSON payload, 256-dim vector schema, `table.add`/reopen, fresh-process `UntrustedEmbeddingConfigError` followed by `allow_endpoint(...)`, deterministic role-based ranking, 96-text batching with failed-batch-only `429` retry (single backoff), `307` redirect handling with retries enabled on both `table.add` (wrapped in Arrow/Rust `RuntimeError`) and `table.search` (Cohere `ApiError`) with one `POST`, zero application backoff, and no `Location` request, plus invalid input/dimension rejection. - **Adjacent embedding, retry, and trust suites (`cohere==7.3.2`)**: Passed across embedding, registry, trust (including the SDK-independent Cohere metadata restoration and endpoint authorization test in `test_embeddings_trust.py`), field metadata, NVIDIA embedding, and retry suites (OpenAI-key test skipped without a key). - **No-`cohere` environment**: Cohere config/legacy unit tests and SDK-independent `test_embeddings_trust.py` metadata restoration and endpoint authorization tests passed without `cohere` installed (real-SDK loopback tests skipped). - **Legacy SDK (`cohere==4.57`)**: Loopback wire check confirmed hosted document/query requests continue targeting `/v1/embed` and opt-in `base_url` usage raises `Cohere base_url requires cohere>=5.15.0`. - **Docs & lint**: Offline Foundry schema test (`test_embedding_cohere_foundry`), byte-identical regenerated snippet (`docs/web/snippets/integrations.mdx`), and `python/` Ruff format/lint checks passed. ### Scope of Verification All HTTP request, authentication, redirect, trust, and ranking checks were exercised against local loopback HTTP fixtures modeled on [Cohere's Azure Foundry workshop](https://github.com/cohere-ai/cohere-azure-workshops/tree/ca1c4cb162e2/lab-1-embed) and the [Cohere Embed v2 API reference](https://docs.cohere.com/v2/reference/embed). Acceptance against a live Azure AI Foundry service (real Foundry credentials and specific `output_dimension` overrides) has not been verified. |
||
|
|
d605943e9b |
feat(python): add Bedrock image embeddings (#5190)
Continues #2320. Thank you @qingyuan18 for starting this work! ## Summary Adds the `bedrock-image` (`BedrockImage`) embedding function for AWS Bedrock image embeddings, exports it from `lancedb.embeddings`, updates the AWS Bedrock docs, and extracts shared Bedrock runtime client setup into `_BedrockEmbeddingFunction`. - **Models**: - `amazon.titan-embed-image-v1` (default, 1024 dims): PNG and JPEG source images. - `cohere.embed-v4:0` (1536 dims): PNG, JPEG, WebP, and GIF source images (`search_document` for ingestion, `search_query` for queries). Cohere v3 models remain text-only under `bedrock-text`. - **Input & search**: Source columns accept encoded image `bytes` or local file paths (`str`), with format detected from decoded bytes via Pillow and `None` entries yielding `None` embeddings. Queries accept text (`str`) or `PIL.Image.Image` (converted to RGB PNG); `AsyncTable.search` requires `query_type="vector"` for Pillow image queries. - **Credentials**: `bedrock-image` uses `boto3.Session()`'s default credential chain (e.g., `AWS_PROFILE` or the application's IAM role) and rejects `profile_name`, `assumed_role`, and `role_session_name` on both `create()` and metadata restore. `bedrock-text` retains its released `profile_name`, `assumed_role`, and `role_session_name` settings. ## Validation - Local Python tests cover the public `get_registry()` API, Arrow table creation and ingestion (`bytes` and local path sources), table reopen from persisted Arrow metadata, sync text and `PIL.Image` search, async `query_type="vector"` `PIL.Image` search, credential-option rejection on `bedrock-image` create/restore, and `bedrock-text` credential-setting restoration and Cohere v3 text requests. - SDK requests and payloads were validated at the `boto3`/`botocore` `bedrock-runtime` client boundary using `botocore.stub.Stubber`. No live AWS Bedrock service calls were run, so live IAM/STS credential resolution, region model availability, and Bedrock service-side validation are not covered. |
||
|
|
0fb15fd178 |
docs: add Mastra integration guide (#5189)
## Summary Supersedes #2330 and brings the Mastra integration guide onto the current `docs/web` Mintlify documentation structure with verified LanceDB Embedded examples against the published `@mastra/lance` release. Credit to @vishesh-baghel for authoring the original LanceDB Mastra guide in #2330 and building the merged upstream Mastra storage and vector adapters in mastra-ai/mastra#3324. ### Changes - Add `docs/web/integrations/ai/mastra.mdx` covering LanceDB Embedded usage with `@mastra/lance`: - Node.js 22.13.0+ requirement and `npm install @mastra/lance @mastra/core`. - Runnable local `LanceVectorStore` quickstart (`create`, `createIndex`, `upsert`, `query`, `close`) with verified nearest-neighbor output (`lancedb 1`). - Explanation of the two-step native vector index behavior in `@mastra/lance` (first `createIndex()` initializes an empty table; calling `createIndex()` again after upserting at least 256 rows builds the native index on the `vector` column). - Pointer to `LanceStorage` noting the published three-argument `LanceStorage.create(id, name, uri)` signature and linking upstream Mastra references, without unverified cloud claims. - Register `integrations/ai/mastra` under **AI Platforms & Frameworks** in `docs/web/docs.json`. - Add the TypeScript example snippets to `docs/web-tests/ts/integrations.ts` and regenerate the corresponding exports (`TsFrameworksMastraQuickstart`, `TsFrameworksMastraNativeIndex`) in `docs/web/snippets/integrations.mdx`. ## Verification - Verified against published `@mastra/lance@1.6.1` and `@mastra/core@1.85.0` (resolving `@lancedb/lancedb@0.31.0` and `apache-arrow@18.1.0`): - Two-vector local quickstart returns `lancedb 1`. - Native `IVF_FLAT` index build after upserting 256 rows reports `vector_idx` with 256 indexed rows, 0 unindexed rows, and nearest-neighbor score `1`. - Confirmed `LanceStorage.create(id, name, uri)` succeeds with three arguments while the older two-argument call fails. |
||
|
|
df1d3318df |
feat: add Azure storage account access key support to SDKs (#5177)
Add `azure_storage_account_access_key_secret` to the sync and async
Python storage integration APIs, with a matching Rust constructor. The
SDK sends a Secret reference in SQL and decodes the reference returned
by CREATE and DESCRIBE.
```python
info = db.create_storage_integration(
"blobs", "az://customer-data/raw/",
storage_provider="AZURE",
azure_storage_account="customeraccount",
azure_storage_account_access_key_secret="azure_key",
)
```
Azure requires a storage account and one authentication mode. The
account access key uses a single Secret. Service principal
authentication uses the existing three Secret references.
|
||
|
|
a6cca1efb0 |
feat(python)!: declare streaming Blob outputs for Functions (#5171)
BREAKING CHANGE: Rust callers constructing `lancedb::function::FunctionOutput` with a struct literal now supply `blob_writer_paths`. Use `Vec::new()` for an output without writer-capable fields. LanceDB Functions that generate large Blob v2 values can declare their output with `BlobWriter` and write chunks during a computed column refresh in a compatible LanceDB Enterprise environment. Row-wise and vectorized callables use the same logical Blob schema. Named and nested outputs can mark specific leaves with `BlobWriter.field` while retaining ordinary binary siblings and nullable fields. The SDK preserves writer requirements through native registration and computed column binding. A distinct output kind lets earlier Enterprise versions reject registrations that require a writer. Existing bytes-only registrations retain their wire format and adapter. On SDK commit [`a19e7b87`](https://github.com/lancedb/lancedb/commit/a19e7b873c36aec865f092a368760be8846233ed), a rebuilt extension preserved nested writer paths through Flight SQL registration and version readback. Enterprise 1.14.1 rejected the writer registration before building the Function image. With the compatible runtime candidate, a real Flight SQL refresh published a 2 GiB + 137 byte value in each Blob layout against Moto. Independent reads verified length and SHA-256 before and after cleanup of an older version. The run also confirmed multipart abort and cumulative descriptor accounting. [Runtime evidence](https://linear.app/lancedb/issue/ENT-4209#comment-26e69e0e-faad-4aac-b148-3f4591181182) · [Descriptor accounting](https://linear.app/lancedb/issue/ENT-4209#comment-4d05e27a-8ff2-4003-804a-8af2f29ce2f4) This SDK change is part of the coordinated Enterprise delivery. [ENT-4209](https://linear.app/lancedb/issue/ENT-4209) |
||
|
|
f183fe14c3 |
docs: explain storage reclamation after dropping columns (#5174)
Dropping a column can leave its data in files that the current table still needs. The schema guide now explains how compaction and retention determine when cleanup can reclaim those data files and their ordinary Blob v2 sidecars. |
||
|
|
fe2d2b33fc |
docs: restore setup in standalone Python examples (#4970)
Eight Python examples on the consistency, insert and merge-insert pages are presented as complete programs, but the published snippets started after the imports, temporary directory and connection, so they failed with NameError when run on their own. The snippet start markers had been moved below the setup in the test files. This moves them back above it and regenerates the snippets. |
||
|
|
d9b49e8889 |
feat: report capacity waits in function refresh job status (#5154)
An Enterprise Function refresh can spend time waiting for execution workers. Applications polling `job.status()` currently see `running` during that wait. Return `waiting_for_capacity` when the server reports that phase for an active Function refresh. The next status request reports `running` when execution resumes. Applications can use `job.wait()` to wait through both states until completion. Rust, Python and Node read the phase from the existing job description response. ## Validation Two HTTP regression tests exercise the public job handle. They cover the wait, work resuming, completion after another wait, a stale phase at completion, queued and paused refreshes, other job types, and servers that omit the phase. The Rust CI remote job runs these tests. |
||
|
|
08ddcdb7d7 |
feat: resume a failed Function refresh from its table (#5153)
LanceDB Enterprise users can resume a failed Function refresh from its table with `table.resume_refresh(job_id)`. The synchronous and asynchronous Python APIs return a typed job handle. Waiting on that handle uses the same table freshness tracking as a newly submitted refresh. The request carries the current table identifier and branch to the server. The server decides whether the original attempt can be resumed and supplies the reason when it cannot. The Python refresh methods also accept a positive `max_job_attempts` option for automatic recovery. These features require server support for Function refresh recovery. The PR adds remote request, branch, error propagation, and typed result tests. Python and Rust validation runs in PR CI. |
||
|
|
2b1b2a29dd |
feat!: layer GPU settings and total execution limits (#5146)
BREAKING CHANGE: Resource inputs use the same names at Function
registration, column/MV creation, and refresh. Use total_cpu_millis,
total_memory_bytes, and total_gpu_count for execution-wide worker
budgets, plus gpu_class and positive gpu_count for each worker. Replace
budget dictionary inputs and unprefixed aggregate limits with these
fields. Move existing refresh gpu_count caps to total_gpu_count;
gpu_count now selects devices per worker.
Each setting resolves independently: refresh > column/MV creation >
Function annotation > deployment. Creation settings also apply to
initial MV population and automatic refresh. MVs sum total budgets
across distinct pinned Function versions; per-worker GPU counts use the
largest Function default unless overridden. An unset GPU class resolves
to gpu_class="any" after inheritance; an explicit "any" overrides a
registered concrete class. Use gpu_class="default" to pin the default
pool explicitly.
```python
@function(
gpu=True, gpu_class="h100", gpu_count=2,
total_cpu_millis=8000,
total_memory_bytes=16 * 1024**3,
total_gpu_count=4,
)
def embed(text: str) -> list[float]: ...
version = db.create_function(embed)
table.add_columns(
{"embedding": version(text=col("text"))},
gpu_class="any", gpu_count=1, total_gpu_count=8,
)
table.refresh_column_async(
"embedding", gpu_class="h100", gpu_count=4, total_gpu_count=8,
)
mv = db.create_materialized_view(
"embeddings", query="SELECT embed(text) AS embedding FROM documents",
gpu_class="any", gpu_count=2, total_gpu_count=8,
)
mv.refresh(gpu_count=4, total_gpu_count=8)
```
```mermaid
flowchart TD
R["Refresh settings"] --> E["Effective settings, resolved per field"]
D["Column or MV creation settings"] --> E
F["Function settings"] --> E
C["Deployment defaults"] --> E
E --> W["GPU class and device count per worker"]
E --> T["Total CPU, memory and GPU ceilings"]
```
Pinned Function images retain their identity. Registration GPU counts
are defaults; execution overrides determine worker allocation. Admission
rejects GPU counts below an image's minimum requirement or above the
total budget. Python, Rust, SQL/REST and supported TypeScript operations
use the same resource model.
No local builds or tests, as requested; regression coverage runs in CI.
|
||
|
|
e3e55844bc |
fix: add SQL query timeout and cancellation controls
Add per-query SQL deadlines, read timeouts, and drop cancellation controls for Rust and Python. |
||
|
|
7970d3075c |
docs: install the public CLI from the hosted script (#5139)
Installing the CLI from the guide previously required a repository checkout or a manual download. The installer is available directly from the downloads site. This updates the guide and quickstart for the v0.42.0 stable release. |
||
|
|
564f8f93d4 |
test(python): cover embedded plans over enterprise bases (#5150)
## Summary Clarify in the persistence guide and `persist` docstring that only the plan destination must be Embedded. The base table can be Embedded or Enterprise; an Enterprise base is pinned through the plan's recorded base branch/version. Add a focused loopback regression that persists a plan from a mock remote base into an Embedded database, reopens the plan by destination with `db.open_table`, advances the mock base's latest version to v2, and verifies a fresh remote handle observes v2 while `Permutation` still reads the plan's recorded main/v1 coordinates. Sequential iteration and duplicate/unsorted offsets follow the stored plan order, and the mock records nonempty v1 scan/gather requests. ## Verification - Focused test plus affected remote mock tests: 3 passed. - `ruff format --check` and `ruff check` passed. - `git diff --check` passed. This is a docs/test-only follow-up. It does not add Enterprise-resident plan persistence or change plan ordering. |
||
|
|
0511aed6e9 | feat: profile Enterprise Function workers from official clients | ||
|
|
49dedd4329 |
fix: expose Function metadata in SDK job listings (#5096)
Expose affected columns, pinned Function name/version, completion time,
duration and failure summaries on `JobInfo` in the Rust, Python and
TypeScript SDKs. Values come from the listing response, so callers can
inspect recent computed column refreshes without opening every job.
Older servers keep optional values absent; measured zero durations stay
zero.
```python
latest = next((info for info in db.list_jobs(table="events", job_type="function_refresh") if "embedding" in info.columns), None)
if latest is not None:
print(latest.function_name, latest.function_version, latest.duration_millis)
if latest.failure is not None:
print(latest.failure.message)
```
Duration is creation-to-completion wall time, including queueing and
pauses. Adds listing response coverage across SDKs and documents the
metadata contract, including SQL `SHOW JOBS EXTENDED` for the expanded
listing. Plain `SHOW JOBS` preserves its original columns. Local builds
and tests were skipped as requested.
The dependency advisory check also fails on current main because
`libsais-rs 0.2.0` is yanked ([main
job](https://github.com/lancedb/lancedb/actions/runs/44470513618/job/135378545456));
this PR does not change dependencies.
This changes the public shape of Rust and TypeScript `JobInfo`: callers
constructing summaries must supply the added fields (including
TypeScript `columns`). TypeScript table filtering remains a separate
concern; the guide now shows its client-side selection and namespace
limitation alongside Python and Rust server-side filters.
Refs ENT-3903.
|
||
|
|
6a7a2c4ec0 |
feat(nodejs): add table delta streams (#5149)
Adds the Embedded `Table.delta` API to the Node.js bindings, matching the Rust/Python contract from #5135. `Table.delta(fromVersion, toVersion?)` accepts a positive safe-integer number, a positive lossless u64 `bigint`, or a same-branch tag string. `TableDelta` exposes `beginVersion`/`endVersion` as `bigint`, streaming `insertedRows()`, `updatedRows()`, `upsertedRows()`, `deletedRowIds()`, and `listTransactions()` with `readVersion` as `bigint`. Readers reuse the existing native Arrow IPC iterator adapter. They are lazy, single-use, serialize pulls, capture/cache the schema before polling, and release the native stream on completion, break, or error. Row readers retain the Rust contract: equal endpoints return empty streams with schemas, invalid/reversed/missing endpoints and cross-branch tags are rejected, and Restore or incomplete transaction history fail closed with full-rescan and range-end checkpoint guidance. Enterprise tables remain unsupported through the native Rust default. The abstract `Table` keeps a concrete unsupported `delta` default for custom subclasses; `LocalTable` overrides it. TypeDoc API docs and focused Node tests cover pinned targets, typed bigint values, transaction listing, lazy rejected readers, schema/decode failures, aliasing, and early drop. Refs OSS-2860 |
||
|
|
b44807e4db |
fix!: preserve job attempt lineage, retries, and lifecycle states
BREAKING CHANGE: JobDescription, JobEventsRequest, FunctionErrorsRequest, and FunctionErrors gain optional Rust metadata/cursor fields. Existing struct literals must initialize them; use None when unavailable. Preserve typed attempt state, pinned retry lineage, result decoders and freshness fences, and retained diagnostic paging across SDKs. Keep Python job data access method-only. |
||
|
|
bfb55c72e9 |
feat(python)!: make job data access method-only (#5095)
Make all Python `Job` and `AsyncJob` data access method-only. Cached property accessors are private and underscore-prefixed; public reads use `id()`, `state()`, `job_type()`, `creation_ms()`, `spec()`, `result()` and `failure()`. `checkout_latest()` refreshes the complete cached registry record in place and returns `None`. ```python job.checkout_latest() print(job.state(), job.result(), job.failure()) print(job.id(), job.job_type(), job.creation_ms(), job.spec()) ``` Cached read methods are synchronous on both handle types. Async handles use `await job.checkout_latest()` for the live refresh; event history remains a separate request through `events()`. Update Python SDK callers, tests and guides to use method calls, including progress/timeout handling and bounded repr. Cover method-only visibility and holistic snapshot freshness through both sync and async clients. BREAKING CHANGE: Python job data access now requires method calls, such as `job.state()` instead of `job.state`. No property compatibility aliases remain. Fixes https://linear.app/lancedb/issue/ENT-3902/sdk-make-cached-versus-live-job-accessors-unambiguous |
||
|
|
8b814731c3 |
docs: use function instead of deprecated udf in examples (#5027)
`lancedb.udf` is a deprecated alias of `lancedb.function` and emits a `DeprecationWarning`. This switches the quickstart and the curation examples to `function`, so readers who copy them no longer see the warning. The quickstart snippet is regenerated from its test. |
||
|
|
8dc03bd288 |
feat: add table.delta for version-to-version row changes (#5135)
Adds native `Table::delta(from_version, to_version=None)` and Python
sync/async `table.delta(...)` for version-to-version row changes.
`TableDelta` exposes streaming `inserted_rows()`, `updated_rows()`,
`upserted_rows()`, `deleted_row_ids()`, and `list_transactions()`.
Endpoints are resolved once on independent dataset handles.
`to_version=None` uses the table handle's visible snapshot, and the
handle's checkout is not changed. Only versions `>= 1` and tags on the
current branch are accepted; cross-branch tags, reversed ranges, version
0, and missing endpoints are rejected. Equal valid endpoints return
empty readers with the same schemas.
Row-level readers require stable row ids at both endpoints and report
the `storage_options={"new_table_enable_stable_row_ids": "true"}`
creation guidance when they are absent. `list_transactions()` does not
require stable row ids.
Row-level readers also fail closed when the range contains a `Restore`,
or when transaction history cannot prove the range is restore-free,
because restored rows can retain older row-version metadata that the
delta readers omit. The error directs consumers to a full rescan and
reinitializing the checkpoint at the range end version.
`list_transactions()` remains available for readable history. The
Versioning guide includes Python and Rust checkpoint-delta examples with
stable-row-ID setup and this Embedded limitation.
Embedded `branches.diff()` remains a separate API.
Refs OSS-2860
|
||
|
|
baea02eebd |
feat: add cleanup jobs and previews across SDKs (#5107)
LanceDB SDK users connected to Enterprise had no explicit API to submit durable cleanup or preview its work; Python's existing cleanup helper remained a warning-only no-op. This PR adds the SDK support for [ENT-2687](https://linear.app/lancedb/issue/ENT-2687) through public SQL and Job APIs. It requires a compatible Enterprise release supporting `VACUUM`, JSON preview and result format version 1. Existing cleanup/optimize helpers retain their behavior; the new APIs reject Embedded and historical-version handles. This was accomplished with the following changes: - Add `cleanup_async()` / `cleanupAsync()` and `explain_cleanup()` / `explainCleanup()` in Python sync/async, TypeScript and Rust. - Preserve the handle's namespace/branch and resolve retention as invocation → table/branch TTL → deployment default. Omission inherits, zero is explicit, and malformed options fail rather than being discarded. - Require one nonempty durable SQL receipt, preserving diagnostics without REST fallback, query-ID substitution or automatic resubmission after ambiguous acceptance. - Add versioned `CleanupPlan` estimates and `CleanupResult` measurements. Preview creates no cleanup job or reservation; results preserve known zero, unknown retry/recovery totals and nonfatal failed deletes, excluding auxiliary sweeps. - Retain typed results on reopening and reuse shared status/progress/events/wait/cancel APIs. Timeout leaves work running; cancellation cannot undo deletion or prove storage I/O stopped. - Document Ownership/parent Usage and required coordination at every retention value: disable/drain automatic cleanup and prevent competing cleanup, tag creation/update, branch creation and restore across all clients until completion. The server does not enforce exclusion; concurrent restore can leave the current table unreadable. - Update Python's legacy no-op warning and the maintenance, Python, Rust and generated TypeScript references. | Interface | Submit with seven-day retention | | --- | --- | | SQL | `VACUUM events WITH (min_age_seconds = 604800);` | | CLI | `lancedb admin table cleanup --table events --min-age-seconds 604800 --wait` | | Python | `job = table.cleanup_async(min_age_seconds=604800)` (use `await` with AsyncTable) | | TypeScript | `const job = await table.cleanupAsync({ minAgeSeconds: 604800 });` | | Rust | `let job = table.cleanup_async(CleanupOptions::new().min_age_seconds(604800)).await?;` | ### Testing Added submission/preview, validation, typed-result and reopening tests, and updated the legacy no-op warning assertion. Focused Python cleanup/Job and compaction/prewarm regressions passed, alongside **34 TypeScript** and **46 Rust** tests. **31 end-to-end scenarios** passed against a real Enterprise server, covering CLI/SQL/REST/SDK submission, retention precedence, restart/reopening, timeouts, cancellation and branch/namespace isolation. Local native SDK validation used a separate `libsais-rs 0.2.0` lockfile because the registry could not resolve `0.2.4`; this PR retains main's dependency pins and lockfile. |
||
|
|
8fd1c716d9 |
feat(python): persist permutation plans and reopen pinned snapshots (#5137)
## Summary Add `permutation_builder(base).persist(db, table_name, *, namespace_path=None, mode="create").execute()` for embedded local and object-store destinations. The native create request carries the namespace and create/overwrite mode, with no drop-before-create. The returned table keeps the destination connection context so it can be pickled and reopened directly, including namespaced and manifest-enabled connections. Persisted plans pickle by reference to their own branch and version, so a later overwrite or cross-branch checkout does not change what an existing pickle reads. In-memory plans, old serialized state, and shallow copies keep their existing behavior. `Permutation.base_version` and `base_branch` expose the recorded base snapshot from loaded metadata. Enterprise destinations remain rejected in v1 because reproducible remote plan ordering is follow-up work. ## Verification - `test_permutation.py`: 93 passed. - `test_torch.py`: 23 passed in a compatible torch 2.15 / NumPy 2.2 / PyArrow 26 environment using the abi3 extension. - S3 direct-result persistence/pickle test passed against a disposable loopback Moto server using the existing fixture's fake keys and explicit storage options. - Earlier targeted checks predate the live snapshot pin repair: Rust builder tests 12 passed; Rust check/clippy and Node type-check passed. - The live snapshot pin repair added private PyO3 glue and was verified with a rebuilt extension: `test_permutation.py` 93 passed, `test_torch.py` 23 passed, and one loopback S3 direct-result test passed. - `ruff format --check`, `ruff check`, `pyright`, `git diff --check`: passed. |
||
|
|
87262842e0 |
docs(function): document GPU row deadline guidance (#5144)
Enterprise GPU Functions on 1.13.0 through 1.14.1 and on 1.15.0 builds before the shared 300-second default was restored reject a refresh without an explicit positive `row_timeout_seconds`. The GPU authoring example and the `@function`/`@udf` docstrings now carry the requirement, the definition/request precedence, and sizing guidance. The 600-second value is a working example from the reported workload, not a recommendation. |
||
|
|
668fb1e256 |
feat(python): add tag-based branch creation and default tag versions (#5136)
Python `tags.create()` now defaults `version` to the handle's currently visible version, including checked-out handles. Existing `from_ref` / `from_version` branch selection and explicit tag versions keep their current behavior. `branches.create()` gains keyword-only `from_tag`, so a branch can fork from a tag through the existing `Ref::Tag` path. This preserves the tag's actual branch snapshot; resolving only its numeric version could fork from `main` when both branches share a version number. `from_tag` conflicts with `from_ref` / `from_version` are rejected before `from_ref="main"` normalization. When `from_ref` names a tag instead of a branch, the native missing-branch failure keeps its classification and receives a static `from_tag=` hint without another lookup. A missing version and an ambiguous Enterprise 404 keep their original errors. The Python sync and async APIs, PyO3 binding, stubs and docstrings are updated together, with native Rust coverage for a tag on a branch that shares main's numeric version. Node.js `fromTag` and optional `version` will follow in a separate PR after this one. |
||
|
|
74239973c7 |
docs: describe current Function refresh defaults (#5134)
Several Function pages still said a refresh defaults to `error_policy = 'fail'` and that `skip` writes null outputs. The server now defaults new refreshes to skip with a 5% failed-row ceiling, and skip keeps a row's existing output, leaving only never-filled rows empty. This updates those pages to match. |
||
|
|
a3b6fecfd6 |
feat(python)!: preserve input order for take offsets (#5140)
## Summary Add an opt-in `preserve_order` flag to sync and async `take_offsets`. It exposes the existing Rust `TakeRestoreExec` ordering path and carries the flag through `QueryRequest`, `PyQueryRequest`, and the Python `Query` model. ## Behavior - Default `preserve_order=False` keeps the existing incremental, unspecified-order behavior. - `preserve_order=True` returns found rows in input order, including repeated offsets. - Missing non-negative offsets keep filter semantics and are omitted; negative offsets remain rejected by the existing `u64` contract. - Rust take queries apply `limit`/`offset` after order and repetition are restored. Python take builders and Query conversion do not expose pagination. - An explicit `order_by` conflicts with offset `preserve_order` and raises clearly. `take_row_ids` keeps its existing implicit ordering and explicit-sort behavior. - `__getitems__` is unchanged: it keeps its Python re-alignment and strict missing-offset (`ArrowIndexError`) behavior. ## Remote lookup The remote lookup sends only the deduplicated `_rowoffset IN (...)` filter and restores order/repetition client-side; there is no new wire field or backend extension. Namespace take queries stay on local execution, and RTE/LSM rejects the `_rowoffset` lookup loudly. ## Testing - Old reviewed head reproduced the serialization regression: `test_query_serialization_sync/async` failed because the Query model exposed `False` for an unset field. - Fixed by using `Optional[bool] = None` and mapping Rust `false` to absent in `PyQueryRequest`; explicit `True` still survives the actual round trip. - `python/tests/test_query.py`: 253 passed, 1 skipped. - Rust preserve-order tests: 3 passed; row-id/order-by tests: 27 passed. - Remote ordered Blob bytes, remote permutation, and Blob mode focused cases: 3 passed. - `cargo fmt --check`, `ruff format/check`, `py_compile`, and `git diff --check` passed. ## Migration `lancedb::query::QueryRequest` is a public non-`#[non_exhaustive]` struct. Downstream code that constructs it with an exhaustive struct literal must add `preserve_order: false` or use `..Default::default()`. The field is client-side metadata and is not sent over the remote protocol. Seekable Blob APIs, rollout, and ENT-4059 remain separate work. Refs OSS-2881 (non-closing). |
||
|
|
1658c8d762 |
feat(python)!: support vector columns in permutation torch formats (#5131)
BREAKING CHANGE: `Permutation.with_format("torch_row")` now uses PyTorch
dtype promotion instead of NumPy promotion. Mixed numeric columns can
change dtype, for example int64 and float32 now produce float32 instead
of float64. Cast columns before formatting when the old dtype matters.
Nullable scalar integer and floating columns still produce NaN; nulls in
nested fixed-size-list or tensor columns, and in bfloat16 columns, are
rejected.
## Problem
`Permutation.with_format("torch")`, `"torch_col"`, and `"torch_row"`
fail when the selected columns include a vector (`FixedSizeList`)
column, which is the column training workloads need. The conversion also
has to preserve Arrow slice offsets, logical `FixedShapeTensor` axes,
and visible nested nulls instead of flattening over them.
## Behavior
- Add `with_format("torch_dict")`: a dict of per-column `(B, *S)`
tensors, usable directly with a `DataLoader` identity collate. Tensors
share Arrow storage where the layout allows.
- Extend `torch` per-row dicts to nested `FixedSizeList` and
`FixedShapeTensor`; PyTorch's default collate stacks them back into `(B,
*S)` tensors.
- Preserve `torch_col` as `(C, B, *S)`, including a zero-copy
`unsqueeze(0)` view for one column.
- Preserve `torch_row` as per-row `(C, *S)` tensors, including `(1,)`
for one scalar column, with `torch.promote_types` for mixed numeric
dtypes. Nullable scalar integer and floating columns keep their previous
NaN behavior; nested fixed-size-list and tensor nulls are rejected.
- `torch_col` and `torch_row` reject heterogeneous sample shapes with
the field names, shapes, and guidance to `torch_dict`.
- Support nested fixed-size lists, `FixedShapeTensor` logical axis
permutations, boolean/integer/floating leaves, empty batches, and
nonzero slice offsets. `torch_dict`, `torch`, and `torch_col` reject
visible nulls.
- NumPy still returns one ndarray. Its pandas conversion may copy, may
promote mixed numeric columns to a common numeric dtype (for example
int64 and float32 to float64), and produces an object array for nested
or incompatible columns.
- `lance.bfloat16` is accepted only for a `FixedSizeBinary(2)` leaf
carrying the `ARROW:extension:name` metadata; offsets/length and byte
order are handled before viewing as `torch.bfloat16`. Unmarked binary
columns are rejected.
This is Python-only and does not change persistence, pickling, or public
method signatures.
## Validation
- `pyarrow 26.0.1`, `torch 2.15.0+cu132`, Python 3.12: `test_torch.py`
23 passed; `test_permutation.py` 84 passed.
- Minimum `pyarrow 16.0.0`, `torch 2.0.1+cpu`, Python 3.11: the nullable
scalar, mixed-dtype, null-rejection, and NumPy tests passed (4 focused
tests). The new NumPy test skips without pandas via
`pytest.importorskip`.
- The pre-existing fork DataLoader tests are flaky only when the full
`test_torch.py` file runs on the minimum stack; each passes when run
alone. Their failure is on the default Python format path and does not
exercise the changed format conversions.
- `ruff format`, `ruff check`, and `git diff --check` pass.
|
||
|
|
dcded7fb70 |
feat(python): default StreamingDataLoader workers to forkserver (#5112)
## Problem `StreamingDataLoader` left PyTorch's platform default in place for worker processes, which is `fork` on Linux. Forked workers inherit the parent process's native runtime and connections, which is the failure mode behind the fork-isolation work. ## Behavior When `num_workers > 0` and `multiprocessing_context` is omitted or `None`, workers now use `forkserver` when the platform provides it, otherwise `spawn`. Explicit start-method names and context objects are unchanged. With `num_workers == 0`, no context is selected, preserving PyTorch's single-process handling. Callbacks and worker state must be picklable under the selected start method, following PyTorch's DataLoader rules. Existing `StreamingDataset` serialization is sufficient for the default worker path. This does not change the explicit fork opt-in or the native client reopen path in #3851. |
||
|
|
56638a9e71 |
fix(python): reject Expr inputs on unregistered Function definitions (#5125)
`FunctionDefinition.__call__` ran the decorated Python callable with any
value it was given, so `my_function(value=col("value"))` executed user
code against an `Expr` or silently returned one, with errors such as
`float() argument must be a string or a real number, not 'Expr'`. A
column reference is not a local value: it binds only on a registered
`FunctionVersion`.
An unregistered definition now rejects `Expr` positional and keyword
arguments with `TypeError` before the callable runs, and names the
supported path: `create_function`/`create_function_async`, then
`col(...)` on the returned version. Plain Python and Arrow arguments,
and the class `__init__`/`__call__` lifecycle, are unchanged.
The Function authoring guide's batch example did not register either: a
`pyarrow.Array` annotation carries no element types, so `score_batch`
raised `TypeError` for missing `input_schema` and `output_schema`, and
the page claimed one `pa.RecordBatch` parameter could read several
columns. The example now passes both schemas, shows one `pa.Array`
parameter per input column for multi-column functions, and states that
`input_schema` matches parameters one to one, so a `RecordBatch`
parameter binds one input column. The GPU class example on the same page
had the same missing-schema defect and is fixed too.
Compatibility: code that passed `col(...)` to an unregistered definition
now gets `TypeError` instead of running user code against an `Expr`.
That call was never a supported binding and produced no usable result;
no supported call changes.
|
||
|
|
5e9b17b639 |
feat(python): make native tables and connections picklable (#5114)
## Summary Adds `__getstate__`/`__setstate__` to native `LanceTable` and `LanceDBConnection` so a PyTorch `Dataset` that keeps both can cross `spawn` and `forkserver` worker boundaries. `Permutation` and `StreamingDataset` now delegate to the same table state representation while retaining compatibility with older pickle payloads. ## Pickle contract - Reconnects from the serialized connection and preserves the table name, namespace path, explicit storage overrides, location, index-cache setting, managed versioning and pushdown routing. - Standard mode reopens at latest; `checkout(version)` remains pinned to the resolved branch/version; branch handles preserve their branch. Cross-branch tag checkout records the actual live branch. - `read_consistency_interval=timedelta(0)` remains distinct from `None`. - `memory://` tables keep the existing Arrow snapshot export/rebuild behavior. - `Session` and unreconstructable custom namespace clients fail at `pickle.dumps` with an explicit `TypeError`; declared namespace configurations reconstruct, including an omitted properties map. - Namespace storage options keep caller-only overrides layered over the live provider, with vended values winning conflicts. Caller options survive refresh, refreshed credentials replace old vended values, an explicit provider remains selected on open, and an empty provider response stays empty rather than restoring an expired seed. - Declared Python namespace connections reopen through their connection provider instead of turning the reconstructed client into an explicit table provider. ## Verification - Fresh binding build with `uv run --extra tests --extra dev maturin develop --extras tests,dev`. - End-to-end `DataLoader` holding `self._db` and `self._table`: spawn and forkserver passed. - `test_namespace.py`: 90 passed; `test_table.py` + `test_db.py` + `test_permutation.py`: 700 passed, 17 skipped. - Focused namespace provider/pickle regressions: passed, including caller-only and vended keys after a declared-namespace refresh. - Rust `test_namespace_connection_with_storage_options` and `test_manifest_enabled_vend_input_storage_options`: passed. - `cargo clippy -p lancedb --features remote --tests --examples`, `cargo fmt --check`, exact CI Pyright (0 errors/0 warnings), and Ruff passed. - DataLoader Workers documentation updated; Vale reports 0 findings. ## Scope Does not change the fork hard-error policy, #3851, or direct `LanceNamespaceDBConnection` pickling. It does not claim changes to the existing namespace dir `index_cache_size` behavior. This supersedes the earlier draft #3486, which only moved the table-state portion. |
||
|
|
ae665a4655 |
docs: mark Blob v2 GA for ordinary tables in Enterprise 1.15.0 (#5094)
The Quickstart and table guide describe Blob columns as Early access without naming a product version. Document general availability for ordinary tables starting with LanceDB Enterprise 1.15.0 and make the Realtime Engine and MemWAL scope visible in the table guide. Xuanwo confirmed Enterprise 1.15.0 as the first edition to document GA for ordinary-table Blob v2. Enterprise 1.13.0 and 1.14.0 retain their existing status. The Enterprise 1.15.0 edition must carry this wording when prepared from its release inputs. Earlier saved editions keep their historical guidance. Refs ENT-3556. |
||
|
|
4b428101dd |
feat: expose the RTREE index in the Python and TypeScript SDKs (#4942)
Part of #4554. Supersedes #4555. This exposes Lance's R-tree index in the Python and TypeScript SDKs. Python gets a `lancedb.index.RTree` config with an optional `page_size`, accepted by `create_index(config=...)` on local, async and remote tables. TypeScript gets `Index.rtree({ pageSize })` and `RTreeOptions`. Both map to the Rust crate's existing `Index::RTree`, so remote tables send `index_type: "RTREE"`. The index accelerates `ST_Intersects`, `ST_Contains`, `ST_Within`, `ST_Touches`, `ST_Crosses`, `ST_Overlaps`, `ST_Covers` and `ST_CoveredBy` filters between a GeoArrow column and a constant geometry, in either argument order, including as a prefilter on vector search. The scalar index docs page gets an R-tree section. `geo` is now a default feature of the Python and Node packages. Without it, a local table can neither build the index nor evaluate `ST_*` filters, and because wheels and npm packages are prebuilt, an opt-in Cargo feature would not reach users. pylance already ships with `geo` on. It adds pure-Rust crates under licenses that `deny.toml` already allows. `Cargo.lock` doesn't change, and the third-party license notices are regenerated. The cost is size: the macOS arm64 release wheel grows from 69.4 MB to 71.7 MB (+2.4 MB, +3.4%). The tests pin the constant-first predicate bug that held up #4555, which lance-format/lance#10080 fixed, in queries, `delete()` and `update()`, with and without the index. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
2dd1a6ad25 |
docs: add sidebar icons for Function failures and catalog pagination (#5092)
## Summary Add a warning triangle for Function Failures and a numbered list for Catalog listing pagination in the documentation sidebar. Each page gets one `icon` field in its metadata. ## Verification Assembled the documentation locally and confirmed both icon fields on the generated sidebar pages. |
||
|
|
23f9d5a741 |
feat(sdk): support bound parameters in data prewarm (#5076)
Data prewarm methods accept filter expressions but cannot bind their
values, which forces applications to build literal SQL themselves. This
adds optional positional and named parameters to data-prewarm submission
and typed previews across Rust, Python, and TypeScript. Values use the
existing typed Arrow SQL transport and remain separate from the filter
text. Existing calls and job-handle behavior are preserved;
parameterized filters require a compatible LanceDB Enterprise server.
This was accomplished with the following changes:
- Add `PrewarmDataOptions::parameters(RecordBatch)` and forward the
batch through SQL submission and `EXPLAIN PREWARM` requests.
- Reuse Python's `QueryParameters` conversion for
synchronous/asynchronous, legacy/job-returning, and typed preview
methods.
- Add TypeScript positional-array, named-object, and explicit Arrow
parameter inputs, with safe scalar encoding and native IPC forwarding.
- Keep parameter values out of Rust option debug output and reject
invalid input before submission where possible.
- Add transport and codec regression tests, including injection-shaped
strings, typed Arrow values, legacy method forwarding, and typed preview
bindings.
- Document bound filters in the cache-prewarm guide with Python,
TypeScript, and Rust examples; update generic SQL parameter
documentation.
### Usage and behaviour
```python
job = table.prewarm_data_async(
["payload"], filter="id >= $minimum", parameters={"minimum": 1000}
)
job.wait()
```
```typescript
const job = await table.prewarmDataAsync({
columns: ["payload"], filter: "id >= $1", parameters: [1000],
});
await job.wait();
```
Python accepts a sequence, mapping, or one-row Arrow batch/table.
TypeScript accepts scalar arrays/objects or one-row Arrow input; safe
integers and bigint use Int64, fractional numbers use Float64. Rust
accepts a one-row Arrow batch. Parameters bind filter values, while
table identity, branch, and concurrency keep their existing interfaces.
Submission-only methods also forward bindings and retain their existing
return behavior. Typed preview helpers accept the same parameters
without creating a job.
### Testing
Python prewarm Flight transport tests pass (65 cases), Embedded
compatibility tests pass (6 cases), and focused Node parameter/prewarm
tests pass (45 cases, including ten codec and native-boundary cases).
Earlier matching-server verification passed 57 Python/SQL scenarios, 14
Node scenarios, and Rust SDK checks, covering selective and empty plans,
typed values, authorization, pinned branches, legacy methods, and
injection-shaped strings. A bound job also survives a full runtime
restart. The guide submission examples were also verified in Python,
TypeScript, and Rust; the TypeScript example type-checks. Live-server
checks used filesystem storage.
|
||
|
|
3907a492c0 |
feat(sdk): add typed data prewarm previews (#5075)
LanceDB SDKs can submit data prewarm jobs, but callers have to issue SQL directly to inspect a plan before warming. The existing text response does not provide a typed pruning contract. This adds metadata-only preview helpers across Rust, Python sync/async, and TypeScript, using a compatible Enterprise server’s structured SQL response. This was accomplished with the following changes: - Add `explain_prewarm_data(PrewarmDataOptions)`, Python `explain_prewarm_data(...)`, and TypeScript `explainPrewarmData(options)`. - Expose `PrewarmDataPlan` and `PrewarmPruningSummary`, preserving zero versus unknown counts and future pruning-mode strings. - Reuse submission options, identifier/filter validation, namespace and branch context, and Azure source-account hint handling. - Validate the versioned JSON response without parsing display text, submitting a warming job, polling HTTP job APIs, or falling back to REST. - Add API documentation, Flight SQL transport tests, Python sync/async response tests, and an opt-in live-service integration test. ### Usage and behaviour ```python plan = table.explain_prewarm_data(["payload"], filter="quality > 0.7") print(plan.table_version, plan.pruning.selected_fragments) ``` The helper returns a plan directly. It requires table Select plus database/namespace Usage and a server supporting `EXPLAIN (FORMAT JSON) PREWARM`. It reads metadata without creating a warming job. Selected ranges are conservative physical candidates; unknown counts remain `None`/`null`. A later submission resolves and plans its own snapshot. Historical-version and Embedded table handles are unsupported. |
||
|
|
96c25bd6b9 |
feat(nodejs): add Enterprise table override APIs (#5077)
Add TypeScript `getTableOverrides`, `updateTableOverrides`, and `resetTableOverrides` for LanceDB Enterprise tables, delegating to the shared Rust implementation used by Python. Document that updates perform GET → recursive local merge → full PUT. Unrelated fields are preserved from the read snapshot, but concurrent edits can be overwritten. CLI `set` and REST PUT retain replacement semantics. Fix an empty SDK update to return the current snapshot without a PUT. Live testing found that the previous implementation submitted an empty replacement and failed when no overrides were configured. The fix applies to Python, Rust, and TypeScript. Add mock HTTP/local coverage and an opt-in Enterprise integration suite for namespaces, branch isolation, REST replacement, validation failures, historical handles, and empty updates. |
||
|
|
dd69a2c535 |
feat(cli): install release binaries with a shell script (#5082)
Install the public CLI from GitHub Releases with `sh scripts/install.sh`. The script selects the macOS Apple Silicon or Linux ARM64/x86-64 archive, verifies its SHA-256 and reported version, and installs it under the user's home directory. Set `LANCEDB_VERSION` to pin a release, including a beta. The default resolves GitHub's latest stable tag, which must have CLI assets. If an Enterprise or other `lancedb` is already on PATH, the installer asks for a separate install directory. An existing destination (including a symlink) is always preserved. The installer workflow exercises that same release on all three native targets and checks checksum failures and existing executable handling. |
||
|
|
a6d7d02f71 |
docs: add semantic sampling guide (#5085)
Add a standalone Semantic Sampling guide immediately below Statistical Sampling in Data Curation, with links from the curation overview and SQL sampling reference. Explain per-partition row quotas, repeatability, filtering order, and index requirements. ```sql SELECT id, caption FROM documents TABLESAMPLE IVF (embedding, 100 ROWS) REPEATABLE (42); ``` |
||
|
|
9f58d8aab6 |
docs: add an ordinary Blob v2 photo tutorial (#5087)
The quickstart links to a Blob example that assumes both tables already exist. Replace that gap with a from-empty photo tutorial: generate real PNG files with the standard library, ingest an ordinary Blob v2 table, filter metadata, save and compare exact image bytes, then create and verify a filtered destination through Enterprise SQL or an Embedded materialized copy. Keep Early access and distinguish Enterprise 1.12.0 row-ID fetches from deployment-dependent snapshot-bound reads. Cover source stability, range reads and Function readers for large media, ambiguous write recovery, and the absence of a SQL constructor for uploading client-side files. The executable Embedded workflow passed on Python SDK 0.42.0b17 using disposable local storage. Generated snippets, MDX compilation, combined-site `mint validate`, and `mint broken-links --check-anchors --check-redirects` passed. Enterprise connection/SQL examples were checked against the public API and existing 1.12 documentation but were not executed against an Enterprise deployment; this does not establish SQL copy behavior after source cleanup. No saved editions or publication state change. Fixes [OSS-3102](https://linear.app/lancedb/issue/OSS-3102/walk-users-from-image-files-to-a-filtered-blob-v2-table-copy). |
||
|
|
a653d861ec |
fix(python): allow static diagnostic imports in Functions (#5084)
Functions previously rejected every `sys` or `importlib` import even when the source only used a statically visible diagnostic. Allow exactly `sys.stderr`, `sys.version_info`, and `importlib.metadata.version`, with direct imports, `from` imports, and aliases treated identically whether they appear at module level or inside the function or class body. Every other use of a namespace-access module still fails at decoration. The error now names the rejected operation, such as `sys.modules`, and lists the supported diagnostic operations. Tests package and execute the artifact offline for each import form, and reject unsupported attributes, submodules, dynamic attribute access, and rebinding. ENT-3918. |
||
|
|
4cab7d0b6f |
docs: show how to read and copy filtered blob rows (#5086)
The table guide starts with two tasks using the same `photos` table: read the bytes of filtered images with the LanceDB Python SDK and copy those images into another Enterprise table with `INSERT INTO … SELECT`. The examples distinguish SDK descriptors, independent row-ID fetches, Function readers and Enterprise 1.12.0 SQL results. The Enterprise support page covers SDK, server and proxy compatibility when query-bound reads fail. |
||
|
|
13453ae5f8 |
docs: serve Attach Database at ingestion/attach-database (#5078)
The Attach Database page was renamed in the docs rework but kept its old URL, `ingestion/migrate-from-embedded`. That reads like the wrong page when we share the link. This renames the file to `ingestion/attach-database`, updates its nav entry and the two pages that link to it, and adds a redirect from the old URL so existing links keep working. |