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.
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.
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.
Remote data prewarm used REST even though SQL supported filters and
concurrency, and both maintenance APIs returned after acceptance without
exposing a consistent typed completion handle. Compaction's legacy
statistics therefore could not describe the work committed by its
durable job. This PR adds job-returning compaction and data-prewarm
methods across Rust, Python sync/async and TypeScript, and moves
data-prewarm submission to SQL. Legacy methods retain
return-after-acceptance behavior; data prewarm now requires a compatible
SQL PREWARM server and Flight SQL connectivity. This consolidates #5037,
#5055 and #4906.
This was accomplished with the following changes:
- Added `compact_async()` / `compactAsync()` and `prewarm_data_async()`
/ `prewarmDataAsync()`, retaining the command receipt's durable job ID.
- Added `PrewarmDataOptions` for columns, a metadata-pruning filter and
concurrency; both operations inherit database, namespace and branch from
the table handle.
- Added filter/concurrency arguments to legacy Python `prewarm_data()`
and a TypeScript `prewarmData(options)` overload, preserving the
columns-array form and discarding the handle after acceptance.
- Added typed `CompactionResult` and `PrewarmDataResult` decoding,
including reopened jobs; missing result payloads fail explicitly and
omitted measurements remain unknown.
- Reused the shared Job lifecycle for status, refresh, progress
callbacks, cancellation and events; Python maintenance progress bars
display rewritten rows or completed executors.
- Added TypeScript `wait({ timeoutMs, onProgress })` and Rust
`wait_with_options(JobWaitOptions)`, complementing Python's existing
timeout argument without cancelling the durable job.
- Validated single unambiguous receipts, preserved compaction option
presence/default inheritance, and returned actionable unsupported-server
errors without dropping options or falling back to REST.
- Updated native bindings, API references and maintenance documentation
with job methods, result semantics, tuning and compatibility
requirements.
### Usage and behaviour
**New** = added here; **Enhanced** = existing support extended;
**Existing** = already on main. This table describes remote SDK
behavior; server-side SQL/CLI capabilities are prerequisites, not
additions made by this SDK PR.
| Surface | Capability | Compact | Data prewarm | Assessment |
| --- | --- | --- | --- | --- |
| Rust / Python sync+async / TypeScript | Submission transport |
Existing SQL OPTIMIZE | **New:** REST → SQL PREWARM | Both now submit
through SQL |
| All SDKs | Durable job-returning API | **New:** `compact_async` /
`compactAsync` | **New:** `prewarm_data_async` / `prewarmDataAsync` |
Same lifecycle model |
| All SDKs | Options and target scope | **New handle:** four existing
compaction overrides, with omitted fields inherited | **New options:**
columns/filter/concurrency | Namespace and branch preserved for both |
| Python / TypeScript | Legacy convenience calls | Existing optimize
acceptance behavior preserved | **Enhanced:** legacy methods accept
filter/concurrency and use SQL | Return after acceptance; no completion
wait |
| All SDKs | Typed successful result | **New:** committed rows,
file/fragment changes, partial commit and `more_work` | **New:** pinned
version, fragments and executor outcomes | Different measurements are
intentional |
| All SDKs | Status / refresh / progress | Existing Job APIs reused by
**new** maintenance handle | Existing Job APIs reused by **new**
maintenance handle | HTTP monitoring remains |
| Python / TypeScript | Progress presentation | **Enhanced:** rewrite
rows/groups | **Enhanced:** executor progress | Shared callbacks; Python
bars use operation counters |
| All SDKs | Bounded wait | Python existing; **new** TS/Rust timeout
controls | Same shared timeout support | Timeout stops this wait; job
continues |
| All SDKs | Reopen and await typed outcome | **New:** compaction result
decoding on reopened handle | **New:** prewarm result decoding on
reopened handle | Rust selects the typed result explicitly |
| All SDKs | Cancel / events | Existing shared APIs available on **new**
handle | Same | HTTP underneath; permissions unchanged |
| All SDKs | Typed preview helper | Unavailable | Unavailable | General
SQL where exposed; no helper added |
| Authorization | Submission | Existing table Ownership plus parent
Usage | SQL path uses Select plus parent Usage | Intentional difference
|
| All SDKs | Local / historical handles | New durable API rejects them |
New durable API rejects them | Remote current-branch jobs only |
```python
from datetime import timedelta
# Legacy convenience call: returns None after acceptance.
table.prewarm_data(["payload"], filter="id >= 1000", concurrency=4)
warm = table.prewarm_data_async(["payload"], filter="id >= 1000", concurrency=4)
warmed = warm.wait(timeout=timedelta(minutes=10), progress=print)
print(warmed.table_version, warmed.executors_completed)
compact = table.compact_async(compaction_options={"max_source_rows": 1000000})
committed = compact.wait(timeout=timedelta(minutes=10), progress=print)
print(committed.rows_succeeded, committed.fragments_removed, committed.more_work)
reopened_result = db.open_job(compact.id).wait()
```
```typescript
await table.prewarmData({ columns: ["payload"], filter: "id >= 1000", concurrency: 4 });
const job = await table.prewarmDataAsync({
columns: ["payload"], filter: "id >= 1000", concurrency: 4,
});
const result = await job.wait({ timeoutMs: 600_000, onProgress: console.log });
```
```rust
use std::time::Duration;
use lancedb::job::JobWaitOptions;
let job = table.compact_async(Default::default()).await?;
let result = job.wait_with_options(
JobWaitOptions::new().timeout(Duration::from_secs(600)),
).await?;
```
Python async tables await both submission and Job methods. Rust's legacy
`prewarm_data(columns)` keeps its columns-only signature; use
`PrewarmDataOptions` on the new job-returning method for
filtering/concurrency.
Wait deadlines cover pending status requests and polling delays.
Existing `wait()`, TypeScript `wait(callback)` and Rust
`wait_with_progress(callback)` remain supported.
Status/progress/refresh/cancel/events still use generic HTTP job APIs;
those endpoints and their read/event/cancel permissions must remain
available. Cancelling or timing out does not roll back committed work.
Compaction results describe committed rewrites and include deletion
files in file counts. Prewarm results describe work against a pinned
snapshot, with partial executors included in completed executors;
nonempty byte/range measurements remain unknown. Missing results require
compatible server/worker support rather than placeholder zero
statistics. Filtering uses conservative metadata pruning, not an exact
row-filter scan.
### Testing
Six checked-in live Python sync/async cases pass against matching
server/worker builds for compaction, job-returning prewarm and legacy
filtered submission. Ten additional live Node scenarios pass for
legacy/default/options forms, filters/concurrency, empty plans,
validation, persisted specifications and readback.
Targeted regressions pass: Python remote maintenance (80), shared jobs
(82), local prewarm rejection (4); Node remote (107) and prewarm API
cases (28), plus the previously exercised Rust remote regressions. Tests
cover receipt parsing, typed results, reopening, unknown measurements,
timeouts, and legacy calls returning None/undefined without polling.
Dependency pins are unchanged. Azure account-hint acknowledgment was
verified locally with filesystem storage; real Azure-backed storage
still needs deployment-specific validation.
Function failures currently require callers to assemble row predicates
and manage retry/version/quarantine state themselves. Add exact
failed-row retry and Function upgrades through the Rust and Python
refresh APIs, plus Python helpers for grouped causes, failing input
rows, quarantine, and per-row producing-version metadata.
```python
errors = table.function_errors(column="sharpness")
errors.summary()
errors.rows(columns=["frame_index", "frame"])
table.retry_failed("sharpness", function_version="2").wait()
table.quarantine_failed("sharpness", after_attempts=3)
table.retry_failed("sharpness", include_quarantined=True).wait()
table.function_provenance("sharpness")
```
`upgrade_column(..., recompute="failed" | "all" | "none")` keeps the
column available while selecting the intended work. `history=True` reads
retained past errors. Capability checks reject these operations on
servers that cannot honor the workflow, before any refresh is submitted.
Includes synchronous/asynchronous API and older-server compatibility
coverage. Formatting applied; local builds and tests were not run.
Adds `Job::stack(worker_id)` in Rust and `Job.stack(worker_id)` /
`AsyncJob.stack(worker_id)` in Python for server-side Function jobs. The
response preserves capture availability, timestamps, truncation, and
session details; unsupported local or query handles retain their
existing unsupported-operation behavior. Refresh wrappers forward the
request to their tracked server job.
```python
evidence = job.stack("worker-id")
for session in evidence["stacks"]:
print(session["status"], session["stack"])
```
Requires a server implementing `/v1/jobs/stack` and system operate
privilege. The API propagates authorization and transport errors without
waiting for job completion. Existing progress snapshots already preserve
server warning fields.
Includes mocked request/response and synchronous/asynchronous Python
coverage. Local builds and tests were intentionally skipped as
requested.
Update the Rust workspace, Java core dependency and Python test
dependency to [Lance
v15.0.0-beta.25](https://github.com/lance-format/lance/releases/tag/v15.0.0-beta.25).
Mark computed-column refresh replacements as data changes using Lance's
new explicit flag so refreshed values retain the existing index
invalidation and row-update behavior.
Rust API compatibility: the re-exported `CompactionOptions` adds
`max_data_files_per_fragment` and `scope`. Callers using exhaustive
struct literals must include the new fields or use
`..Default::default()`.
Configure macOS Rust tests with an explicit Python 3.13 interpreter and
runner/Python-specific caches so doctests do not link against an absent
Python framework.
Function source packaging inlined only scalar literals and tuples of
them. A module-level PyArrow type shared by `output_schema=` and the
Function body, a label map, or a small NumPy weight vector failed at
decoration with an "unsupported global value" error and had to be
redefined inside the body. These globals are now captured:
```python
import numpy as np
import pyarrow as pa
from lancedb import function
OUT_TYPE = pa.struct([pa.field("label", pa.string()), pa.field("score", pa.int32())])
LABELS = {"pick": 0, "place": 1}
WEIGHTS = np.array([0.25, 0.75])
@function(
input_schema=pa.schema([pa.field("x", pa.int64(), nullable=False)]),
output_schema=pa.field("out", OUT_TYPE, nullable=False),
pip=["numpy"],
)
def judge(x: pa.Array) -> pa.Array:
score = int(WEIGHTS.sum() * 10)
rows = [{"label": "pick", "score": LABELS["pick"] + score}] * len(x)
return pa.array(rows, type=OUT_TYPE)
```
| Captured global | Rebuilt in the artifact as |
| --- | --- |
| `None`, `bool`, `int`, `str`, `bytes`, finite `float` | a literal
(unchanged) |
| tuple, list, dict, set, frozenset of supported values | a literal;
dicts keep insertion order, set elements are sorted by their source |
| PyArrow `DataType`, `Field`, `Schema` | `pa.ipc.read_schema` over the
value's IPC schema bytes, which keeps nullability, metadata, and nested
fields |
| NumPy array or scalar of a bool, integer, float16, float32, or float64
dtype | `np.array(<elements>, dtype=<dtype.str>)` or
`np.dtype(<dtype.str>).type(<item>)` |
- Each value is a copy taken when the decorator runs and rebuilt per
worker process, so values that share an object become separate copies.
Packaging does not depend on hash randomization.
- Each value is limited to 1 MiB of source and 32 levels of nesting.
Cycles and Python-defined Arrow extension types are rejected. The size
limit also applies to the existing literal captures.
- Unsupported values keep the error that names the global, its type, the
supported captures, and the remedy.
- `pyarrow` and `numpy` are imported under private aliases ahead of the
captured globals. The builtins used for empty sets and frozensets are
claimed, so a module that rebinds them fails packaging instead of
silently shadowing them.
Empty NumPy arrays are encoded directly from dtype and shape, so even
`(500_000, 0)` stays compact without expanding nested Python lists.
Updates the Rust workspace and Java Lance dependencies to
[v15.0.0-beta.23](https://github.com/lance-format/lance/releases/tag/v15.0.0-beta.23),
with the matching Python `pylance==15.0.0b23` test pin and refreshed
Cargo and uv lockfiles. No source compatibility fixes were needed.
Validation: workspace Clippy with all features and warnings denied, Rust
formatting, all 35 CI-script tests, Python dependency guards, Python
formatting/lint, and uv lock consistency checks passed; the root-wide
Ruff check has 59 pre-existing diagnostics, confirmed unchanged from
HEAD.
The descriptor-copy error only named the missing `data`/`uri` child. It
now says that this shape is an SDK blob descriptor rather than payload
bytes, and points to `blob_mode="bytes"` for supported materialization,
`blob_mode="descriptions"` for inspection, and the row-id plus
`fetch_blobs`/`fetch_blob_files` copy path while the source stays
unchanged.
This reuses the merged guidance from #4940 and the
direct-materialization contract from #4973. Ray integration remains out
of scope for ENT-3556.
Refs ENT-3556
Test: `python/tests/test_blob.py` (210 passed, 39 skipped), including a
regression that writes default lazy descriptor rows into a blob-schema
table, checks the guidance, and confirms no target is created.
`python/tests/test_util.py -k blob` (12 passed, 2 skipped).
Update Rust and Java Lance dependencies to
[v15.0.0-beta.22](https://github.com/lance-format/lance/releases/tag/v15.0.0-beta.22),
synchronize the Python test pin to `pylance==15.0.0b22`, and refresh the
lockfiles with all published platform wheels.
Preserve Function freshness only when an UPDATE changes rows, so
beta.22's no-match updates cannot mark previously invalidated outputs as
fresh. Extend the existing regression cases to cover no-match updates
after input and output changes, including unchanged table versions.
Rust formatting passed. CI validates the compatibility fix; no local
builds or tests were run.
---------
Co-authored-by: Jack Ye <yezhaoqin@gmail.com>
Report registration lifecycle and client elapsed time through existing job handles, and provide concise image inspection. Preserve quiet wait behavior, environment-lock forwarding, failure diagnostics and timeout recovery.
String full-text searches now accept `operator="AND"` or
`operator="OR"`, preserving the existing OR default. Sync and async FTS
builders expose `count_rows()` to count every match satisfying the
filter, independently of pagination, projection, ordering, and
reranking. Counting streams matching scores without reading document
columns; it can scan all matches.
```python
query = table.search("gripper closed", query_type="fts", operator="AND")
query = query.where("active = true")
matching_rows = query.count_rows()
page = query.limit(20).to_list()
query = await async_table.search("gripper closed", query_type="fts", operator="AND")
matching_rows = await query.where("active = true").count_rows()
```
Phrase searches keep the existing index default and now explain how to
rebuild an index with `FTS(with_position=True)`. AND requests retain
their operator through namespace pushdown and fail explicitly on older
remote servers that cannot represent it. Regression coverage includes
indexed and unindexed queries, filtered counts above the default limit,
pagination preservation, remote serialization, and phrase indexes with
and without positions.
Migrates SQL-backed catalog listing APIs to `LIMIT ... FROM
'<page-token>'` and server-issued Arrow continuation metadata.
Namespace-specific APIs send an explicit `IN` schema clause, including
`IN "public"` for root, so raw SQL can default to all namespaces.
```sql
SHOW VIEWS LIMIT 100;
SHOW VIEWS IN team$ml LIMIT 100;
SHOW VIEWS IN team$ml LIMIT 100 FROM '<page-token>';
SHOW VIEWS IN other_db.team$ml LIMIT 100;
```
SDK clients forward opaque tokens unchanged, preserve empty
continuations, and decode identifier columns by name. Removes legacy
cursor reconstruction and updates the SQL reference and Python Flight
fixture. Public docs cover optional direct schema paths, all-namespace
defaults, and the shared pagination syntax across every catalog listing.
Python and Node callers could not disable precommit retries for one
merge without changing the connection. Add `execute(..., retries=0)` for
Python sync/async and `execute(data, { retries: 0 })` for TypeScript,
forwarding into the existing Rust control without persisting the
override. Ambiguous 5xx outcomes remain non-replayable; permitted merge
retries now log status and attempt at WARN, and the API docs explain
retry budgets and timeout boundaries.
Validation at `6001300` passed 70 Python HTTP cases, 36 Node HTTP cases,
14 local merge regressions per binding, and 34 scoped Rust tests, with
rebuilt native extensions, TypeScript compilation, Clippy, scoped
formatting/lint, and generated API docs. The public API and feature diff
are unchanged after integrating main and the reviewed ingestion guide;
that binding evidence is retained. Focused merged-tree validation
additionally passed 267 Rust merge/retry/provenance cases and the CI
fixtures. Existing root Ruff issues in docs/web-tests remain; local
fixtures do not establish live proxy/server cancellation behavior.
Refs #4256 and OSS-2370.
Python Function declarations reject Arrow map and decimal types before
registration. Accept `dict[str, T]`, nullable map values, explicit Arrow
maps, and `Annotated[Decimal, pa.decimal128/256(...)]` using the
existing canonical JSON representation. Preserve map key/value
nullability and decimal precision/scale; reject unsupported map keys,
sorted maps, nested Blob values, and a bare Decimal without
precision/scale.
This is the SDK map/decimal portion of ENT-3414. Server validation and
SQL support are separate changes; older servers can still reject these
signatures. Nullable scalar output support remains separate in #5030.
Validation: 129 Function signature tests passed; 30 documentation tests
passed with one existing skip. Ruff format/lint and diff checks passed.
Python tests used the existing Python 3.13 environment and prebuilt
native extension with this Python source overlaid; no Rust build or
remote-server execution was performed.
Function registration clients cannot request fresh dependency resolution
or inspect the measured environment returned by the server. Add
`refresh_lock=True` to Python registration and preserve the requested
runtime and measured environments in Rust/Python Function version
readback. Registration forwards both `exist_ok` and `refresh_lock`;
defaults remain unchanged.
Single-platform versions retain `resolved_environment`.
Multiarchitecture versions expose `resolved_environments`, keyed by OCI
`os/architecture`, and the Python `environment_report` alias. Platforms
are never flattened: absent entries mean unknown measurements, while
measured empty package lists remain present. Registration waits emit
scalar and per-platform server warnings once per Job; catalog reads do
not repeat them.
Requires matching server support, including Sophon #10344 for
per-platform publication. Nine focused Python source-overlay tests and
29 documentation tests passed for the additive map change; one
documentation test requiring a newer native `exist_ok` binding was
excluded. These checks reuse a prebuilt extension and do not establish
current native integration. PR CI exercises the Rust transport/readback
and Python bindings. Live multiarchitecture registration and GPU
acceptance remain separate.
Function declarations currently reject exact timestamp and duration
types. Preserve their Arrow units and timezones in canonical signature
JSON, including fixed-offset timezones and nested fields. Bare
`datetime` and microsecond/no-timezone declarations keep their existing
representation; `timedelta` requires an explicit unit.
Compound temporal signatures require the Lance Namespace decoder in
https://github.com/lance-format/lance/pull/11059 and corresponding
server validation support. Older readers reject these signatures; this
change does not upgrade server support or dependency pins.
Validation: 128 Python signature tests and 30 documentation tests passed
(one skipped), using the changed Python source with an existing native
extension. No Rust rebuild or end-to-end Function registration/refresh
was performed.
Function-column declarations now preserve constants such as
`fn(video=col("mp4"), num_frames=lit(16))` without changing its Function
version. Constants travel in the application inputs; column bindings,
request input schemas, and dependency tracking contain only columns.
Changing a constant uses a new column binding rather than rebaking the
Function.
Persisted bindings with literals use metadata version 2, which older
readers reject. Column-only bindings retain version 1. Python preserves
scalar literal identity, including null and unsigned integers, and
rejects composed expressions or values outside the canonical literal
domain.
This SDK change requires matching server declaration and execution
support, after a dedicated SDK dependency update. Native validation
passed 48 Rust metadata tests, four request-transport cases and 57
rebuilt Python tests on `a42d680`; 32 pre-existing experimental tests
remained ignored. The test-assertion correction passed its exact
regression and strict Clippy on `53ff80a2`. On `993fae7d`, the three
remote metadata compatibility regressions, native Python public-export
test and strict Clippy passed. These review corrections use v3 for
unknown-version rejection, cover existing v2 literal bindings through
remote mutation guards, and export `LiteralInputBinding`. The unchanged
native implementation and verified extension are reused. Matching server
execution and original-workload acceptance are not established by this
PR.
Refs ENT-3667.
## Problem
ENT-3267 still lacks typed refresh controls for `supervisor_resources`
and `planning_workers` in Python, Rust, and Node, and Node has no
`retry_policy` refresh option. Callers must drop to SQL for those
controls.
## Change
- Add canonical Rust `FunctionRefreshPodResources` and
`FunctionRefreshPlanningConfig`, and serialize them through
`RefreshColumnOptions`.
- Expose both options in the Python sync/async wrappers and PyO3
binding.
- Expose both options in the Node NAPI object and add a Node
`retryPolicy` object backed by the existing Rust `FunctionRetryPolicy`.
- Omitted options stay omitted; branch targeting continues through the
table handle. No server, dependency, or pin changes are included.
Client-side checks only reject non-positive structural values.
Deployment resource limits and column-kind validation remain
server-side.
## Validation
`cargo fmt --all -- --check`, `python3 -m py_compile`, and `git diff
--check` pass. No native build was run locally; CI compiles and tests
the change. Generated JS API pages are unchanged.
Function declarations currently reject nullable scalar returns. Accept
`Optional[T]`, `T | None`, and explicit nullable Arrow fields,
preserving `nullable: true` in registration signatures, JSON round
trips, and remote `add_columns` requests.
The Rust planner accepts nullable scalar outputs, and binding readback
recognizes the server-owned assignment marker for a single nullable
scalar result. Clients do not allocate that marker. Non-nullable whole
results, whole structs, and Blob v2 retain their existing assignment
restrictions.
Validated with 127 Python tests, 30 documentation tests (1 skipped), and
seven focused Rust tests covering planning, binding readback, rejection
boundaries, and the remote request body. The final condition-collapse
change addresses strict Clippy; its delta check and CI are pending.
Python tests use a source overlay on a retained native extension, and
Rust remote coverage uses HTTP mocks.
Server support and end-to-end validation remain separate. This PR does
not claim that server publication distinguishes computed NULL values
from pending rows.
A failed remote Function job loses its persisted build identity when
converted into the exception from `job.wait()`. Append
`result.terminal_server` to that error using the existing server-build
format, preserving its message, row location, traceback and job ID. Do
not substitute the responding query node's version for the writer of the
saved terminal result; missing or malformed historical identity leaves
the error unchanged.
The reported failure was independently reproduced against a deployed
server with a real Function job. The new exact Rust regression
reproduces the missing terminal identity on the unpatched code. At
`59c1f3e`, all 10 remote Job Rust tests and five tests using the
matching native Python extension passed, including sync/async waits with
known or unknown terminal identity. These transport tests use mocked
HTTP responses; the original deployed Function job remains with
independent acceptance for recheck after delivery. This change does not
establish whole-ticket acceptance.
Upgrade the Rust Lance family from beta.18 to the published
v15.0.0-beta.21 tag, and align Python test wheels and Java artifacts.
This includes the explicit-empty-segment FTS fix in
lance-format/lance#11063 needed by lancedb/sophon#10314. Enable Windows
Git long paths so Cargo can check out Lance fixtures in the Rust, NPM
and Python wheel builds.
Beta.21 also contains lance-format/lance#9858: new NGram, RTree and
MinHash LSH indexes use row addresses. Legacy row-ID segments remain
readable, but index maintenance on stable-row-ID tables can require a
rebuild. The NGram documentation now explains the consolidation
requirement; NGram/RTree tables without stable row IDs retain their
earlier format. The Python lock revision and unrelated dependency
entries are unchanged.
Validation:
- The official Lance release and internal mirror match
80bc45a195279befdec42853dac8d15a37e0504d. The seven official Fury wheels
and Maven POM/JAR were verified.
- Exact executable/dependency state 7846a15e completed the full Rust,
Python, Node, Java and CLI CI, including platform builds and package
publication dry runs. Xuanwo approved that head; Gatekeeper recommended
approve with a non-blocking qualification risk.
- Follow-up a289cb2c only adds the requested seven-line NGram upgrade
note. Static whitespace checks passed; new-head CI is running. No local
correctness tests or test builds were run by this task owner.
- Broader IVF/encoding/Blob/cache workload performance and the beta.21
Sophon composition remain separately qualified. Earlier Blob
cancellation and DynamoDB failures on #4967 are retained in their
original evidence; this PR does not count those historical failures as
fixed.
Current-head CI, full feedback and required review still gate merge. SDK
publication is a separate action. Sophon adoption follows a published
SDK release and mirror through its own dependency PR; its distributed
performance acceptance remains in #10314.
Expose `Job::stats()` in Rust and synchronous/asynchronous Python jobs.
It reads `POST /v1/jobs/stats` and returns the canonical server-rendered
report verbatim, or `None` for a running job or one without a readable
durable profile. It does not wait for completion or recompute
measurements.
On `cc25005525671756b5cf5ebd96492b792e9aa1cb`, all three Rust transport
tests and six Python tests passed against the matching rebuilt native
extension; strict SDK Clippy also passed. These tests cover optional
reports, exact text preservation, fresh reads, errors, and the HTTP
boundary with a controlled server. Against the actual Phalanx HTTP route
from [Sophon #10247](https://github.com/lancedb/sophon/pull/10247)
(`5be3236`), the same native extension also completed two sync and two
async reads after durable registry archival, preserving the exact
canonical report. This is an HTTP/registry integration fixture, not a
Function workload or shared-cluster acceptance. The private runner's
JSON field-order collector failed after the successful probe; all raw
evidence was retained and hash-verified, and the original receipt was
recovered with the corrected parser without rerunning the probe.
The follow-up `ad36f66` only corrects the synchronous Python
API-reference link to the asynchronous method. Ruff checks and
formatting passed; runtime evidence above remains applicable. The actual
Phalanx/native-SDK probe covers archived reports; running-job null
availability is covered by separate backend and SDK transport tests, not
that end-to-end probe.
Part of ENT-3501.
Adds `exist_ok=False` to Python table cloning and `.exist_ok(true)` to
the Rust clone builder. An existing target is returned with its data and
version history unchanged; strict duplicate errors remain the default.
```python
snapshot = db.clone_table("snapshot", source_uri, exist_ok=True)
```
Embedded cloning skips source reads for an existing target and handles
typed creation conflicts. Remote cloning forwards the option to the
server. Includes sync/async preservation and remote request coverage,
plus SQL syntax documentation for `CREATE TABLE IF NOT EXISTS target
CLONE source`. Requires a server supporting the option for remote
clones.
BREAKING CHANGE: Rust `CloneTableRequest` struct literals must
initialize the new `exist_ok` field; `CloneTableRequest::new` remains
compatible.
No local builds or tests were run, as requested.
Adds `exist_ok=False` to sync and async Python storage integration
creation. `exist_ok=True` sends `CREATE STORAGE INTEGRATION IF NOT
EXISTS` and returns the server's stored configuration, preserving the
prefix, credentials and external ID.
```python
integration = db.create_storage_integration(
"raw", storage_provider="S3", storage_prefix="s3://customer-bucket/raw/",
aws_role_arn="arn:aws:iam::123456789012:role/access", exist_ok=True,
)
```
The non-exhaustive Rust request also supports `.exist_ok(true)` for
every provider. Requires a SQL server supporting this syntax. Includes
protocol and provider SQL coverage. No local builds or tests were run,
as requested.
Adds `exist_ok=False` to Python Function creation and job submission.
`exist_ok=True` sends `CREATE FUNCTION IF NOT EXISTS` and returns the
stored immutable version, preserving its code, credentials and execution
settings. The default retains the current version-creation behavior.
```python
version = db.create_function(analyze_caption, exist_ok=True)
```
The option also exists on the Rust registration request and is kept out
of the canonical Function definition payload. Includes
sync/async/background protocol and stored-version coverage. Requires
matching SQL server support.
BREAKING CHANGE: Rust `FunctionRegistrationRequest` struct literals must
initialize `exist_ok`; legacy serialized requests default to false.
No local builds or tests were run, as requested.
Add `exist_ok=False` to synchronous and asynchronous Python view
creation. Passing `True` sends `CREATE VIEW IF NOT EXISTS` and returns
the existing view's stored query and schema unchanged; the default
continues to fail on an existing name.
```python
view = db.create_view("recent_orders", query, exist_ok=True)
view = await async_db.create_view("recent_orders", query, exist_ok=True)
```
Requires a SQL server supporting `CREATE VIEW IF NOT EXISTS`. Rust gains
an awaitable builder with `.exist_ok(true)`. Existing
`.create_view(...).await` calls continue to work; callers requiring
`Future` must convert the builder, and custom `Database` implementations
must accept the new `exist_ok` argument. Includes Python round-trip
coverage and Rust coverage for direct/deferred results and metadata
preservation.
A package shipped through `code=` currently loses its non-Python files.
This breaks vendored packages that read JSON configuration, manifests,
prompts, or binary resources after deployment. Include regular package
resources in a separate base64-encoded `python_bundle.resources` map,
preserving exact bytes and relative paths. Both source and resources
contribute to the artifact digest. UTF-8 Python source bytes retain
their original line endings as well, so manifests that hash vendor code
continue to match.
For example, `@function(code=[my_package])` can use
`importlib.resources.files("my_package").joinpath("models.json").read_text()`
on the worker. Hidden files and caches are excluded; symlinks and unsafe
paths warn instead of following files outside the package. Source-only
bundles retain their existing wire form. Resource bundles require
matching server support.
Adds an isolated-import regression with a vendored subpackage, JSON
metadata, binary data, SHA256 verification, preserved CRLF bytes, and
resource-only version changes. Local builds and tests are disabled by
request. Ruff formatting and linting run locally; CI runs the tests.
Python materialized-view creation now accepts a complete defining SQL
query across sync, async, remote, and namespace connections, including
creation jobs:
```python
view = db.create_materialized_view(
"events_by_kind",
query="SELECT kind, count(*) AS n FROM events GROUP BY kind",
)
```
`query` is mutually exclusive with `source`, `select`, `where`, and
`limit`. Existing source-based calls remain supported.
Adds Rust `Connection::create_materialized_view_from_query`: embedded
connections plan through `MaterializedViewDefinition::from_sql`, while
remote connections submit the full query for server-side parsing.
Includes regression coverage for grouping, UNNEST, query forwarding,
creation jobs, and argument validation.
Remote callers can use `db.server_info()` in Rust and Python, including
synchronous and asynchronous Python connections, to identify the
responding server without submitting a query or Job. Typed results
describe the query-node build, component versions, Function protocol and
configured images. Older servers without the endpoint return an explicit
unsupported error.
REST and Flight errors retain the reported build in diagnostic text and
Rust `RemoteErrorMetadata.server`. Typed table/job-not-found errors
preserve their HTTP source and classification, including the
schema-cache path; masked REST errors can obtain provenance from the
response header. Unknown build information stays absent.
The matching native Python SDK was exercised against a real localhost
server (`8829b074` client / `43920fa` server): sync/async discovery,
both SQL version forms and actual REST/Flight error provenance passed.
The product files match this branch; private validation drivers are
excluded. Focused coverage includes typed 404 errors, masked errors, and
the public schema-cache regression. Deployment and published-package
acceptance remain separate.
Server counterpart: https://github.com/lancedb/sophon/pull/10234.
Related: ENT-3565.
Existing Rust and Python blob range calls must keep working when only
the SDK is upgraded. Add negotiated batched range reads across Rust,
Python sync/async and TypeScript, preserving ordered NULLs, duplicates
and branch/version reads with splitting and reassembly at 1,024 ranges
or 64 MiB per request.
Only a successful describe response advertising `x-lancedb-blob-ranges:
1` selects the batched endpoint. Missing or unknown capability values
select the existing descriptor-query plus BlobFile Range GET route
before the operation. Endpoint failures never switch protocols. HTTP 400
preserves the server message and request ID as Rust `InvalidInput` /
Python `ValueError`; other errors retain their existing semantics.
The operation binds both numeric version and immutable snapshot identity
from its producing query or first range response. Every later partition
and oversized-range piece sends that original identity and requires an
equal response identity before decoding. Same-name table recreation
therefore fails explicitly instead of returning mixed old/new payloads;
no partial array is returned on later failure.
Targets `main`. The read-buffering prerequisite #4979, safe-write
prerequisite #4977 and deferred-query identity prerequisite #4973 are
merged into main; #5000 also supplies the merged SQL timeout-test
prerequisite. Server support is [Sophon
#10219](https://github.com/lancedb/sophon/pull/10219), including #10211.
Exact SDK `1497b508324662180086a4d1e0a6eb9e0b3970db` and server
`f39712c2c150b220eb831e00f6663c9eef32dce5` passed a real local SDK →
REST → PE experiment: one Rust harness test, 14 assertion groups, 38
REST range requests and 34 PE RPCs. All four sync/async × warm/cold
table-recreation cases failed explicitly before the second descriptor
lookup or PE dispatch, with no mixed payload or partial result. The
other groups retained 1,025-range success, 70 MiB reassembly,
branch/version reads, overwrite snapshot consistency, error behavior and
TypeScript buffer ownership. Bindings were rebuilt and their loaded
hashes verified. This is local interoperability evidence, not Cloud,
mixed-fleet or deployed header-forwarding acceptance.
The server dependency upgrade, External/cache/URI-policy acceptance and
validated rollout remain required. Enforcing PE support must precede QN
and SDK enablement; identity does not retain versions or freeze External
objects. This PR does not claim deployed support or complete ENT-3100/GA
acceptance.
Published documentation retains the Early access badge and released
Enterprise instructions, including explicit fetches for copying. The new
Enterprise `blob_mode="bytes"` guidance, snapshot-bound copy example,
future streaming restrictions and GA wording remain source-only MDX
drafts until release. The correction distinguishing released Enterprise
SQL bytes from SDK descriptors remains visible. Documentation validation
checked comment boundaries, visible instructions, Python example syntax
and whitespace; the site was not built. The main integration keeps these
release gates unchanged.
Main integration at `0491d9bdcc65ce5d52ea93e1083c89e951ea4f9d` normally
merges main `9b13e8f72530c8b1950c09685f6920711154a539`, including its
Lance beta.18 dependency. Focused current-source validation passed: 493
remote-table/query/Blob/IPC/write-progress Rust tests, 23 shared
create/write-body tests, 59 native Blob integration tests and 7 public
HTTP range tests. Rebuilt Python passed 468 selected tests (one optional
PyAV test skipped), and rebuilt TypeScript passed 194 selected tests
across four suites; lint/format, TypeScript compilation and API
documentation generation passed. Shared tests include actual HTTP
multipart failures, acknowledgment boundaries, dictionary compaction and
native Blob compaction. The 598 unrelated Jest cases excluded by the
focused shared-suite selector were not run.
The retained 14-group joint REST/PE experiment used the earlier exact
candidates stated above. Operation-identity/range/IPC code is unchanged,
but dependencies and shared write interfaces changed with main; the new
local checks validate the SDK combination and do not constitute a fresh
final-head SDK/server joint, Cloud or rollout run. Early access and
every remaining server/External/cache/policy/dependency/rollout
condition remain in force.
CI snapshot on this head (2026-11-12 18:30 UTC): `build-no-lock` failed
in the standalone `ci/tests/test_build_no_lock.py` fixture at the
retained-rlib assertion, before the actual SDK no-lock build. The
fixture, helper and Rust workflow are byte-identical to main; the
fixture does not load SDK source. The underlying CI/environment cause is
not diagnosed here. Other jobs remained pending/running at the snapshot,
so CI is not reported as passing. Failure:
https://github.com/lancedb/lancedb/actions/runs/43280277756/job/131399418284.
Python remote queries materialize Blob v2 payloads with
`blob_mode="bytes"` through synchronous and asynchronous `to_arrow`,
`to_list`, `to_pandas`, and `to_batches`. Deferred reads bind to the
actual producing dataset without changing the caller's live table
handle, including concurrent writes and same-name DROP/CREATE.
Trust only the authoritative `x-lancedb-query-version` plus
`x-lancedb-query-snapshot`. A numeric version alone cannot distinguish a
recreated table; the ordinary live watermark and user-supplied Arrow
metadata cannot establish provenance. An independent immutable handle
carries the original identity through every batch, byte-limit split, and
large-Blob Range fallback, and requires a verified response echo before
accepting payloads. Aliases, NULL/empty results, rerankers, and hybrid
legs retain consistent provenance. Missing capability, mixed identities,
or a serving node ignoring the precondition fails explicitly; ordinary
descriptor queries remain available on older servers.
The source docs distinguish Enterprise SQL payload bytes from SDK
descriptors. Server dependency:
https://github.com/lancedb/sophon/pull/10211.
Validation uses retained, independently audited local evidence: 724
Python cases passed (one optional PyAV skip), 67 focused SDK Rust cases
passed, 36 server checks passed, and 15 actual REST/SDK scenarios passed
across retained runs. These cover sync/async and Arrow file/stream
recreation, concurrent overwrite, deletion of a selected version, legacy
capabilities, forged IPC metadata, WAL exclusion, and actual mid-batch
recreation. The original aggregate experiment exited 101 because its
extra harness assumed a Python batch size would split the native result;
its 36 server checks and 13 completed scenarios remain valid. The
corrected native-batch experiment passed separately for sync and async.
No aggregate all-green claim is made.
The public batched-range operation has separate cross-partition identity
integration in https://github.com/lancedb/sophon/pull/10219 and
https://github.com/lancedb/lancedb/pull/4994. This change does not claim
to fix that loop. Realtime/MemWAL remains outside Blob v2 GA, without
disabling existing writes or compaction. No dependency pins changed.
Merge/rollout hold remains: upgrade every serving node before enabling
the new SDK capability, verify proxy forwarding of both authoritative
headers and the verification echo, and preserve queried versions for
later reads. Missing or inconsistent capability fails explicitly;
identity does not retain versions or authenticate storage paths. Actual
deployed proxy/Cloud/PE behavior and production retention remain
unverified. Old SDKs do not gain incarnation protection from a
server-only upgrade.
Published documentation retains the Early access badge and released
Enterprise instructions, including explicit fetches for copying. The new
Enterprise `blob_mode="bytes"` guidance, snapshot-bound copy example,
future streaming restrictions and GA wording remain source-only MDX
drafts until release. The correction distinguishing released Enterprise
SQL bytes from SDK descriptors remains visible. Documentation validation
checked comment boundaries, visible instructions, Python example syntax
and whitespace; the site was not built. This documentation-only revision
reuses the implementation evidence above.
Ambiguous gateway failures can occur after a write commits, so replaying
the operation can append duplicate rows. Non-idempotent writes now retry
only known precommit failures. Multipart retries reuse the same upload
ID, part ID, and encoded bytes; ambiguous completion returns an
unknown-outcome error without abort or replay. A definite 409/429
completion rejection triggers best-effort cleanup using the call's retry
budget.
Replayable parts and the shared byte-based partition target default to
64 MiB. Dictionary-bearing batches are compacted before size estimation
and again when actual compressed IPC framing requires further splitting:
keys are remapped without changing their types or schema, view backing
buffers are collected, and ListView/LargeListView child ranges are
compacted as an interval union so overlapping views retain sharing.
Parts are prepared on demand; a single row and its schema can still
exceed the target. Multipart progress starts at zero and counts each
acknowledged IPC body once. Rust write builders and Python/TypeScript
`add` expose per-call retry overrides. Atomic `create_table` pre-encodes
to a temporary file and rejects compressed IPC over 256 MiB before
sending any request; the schema-first import guidance now includes
Python, TypeScript, and Rust examples. The shared partition target also
affects local automatic partitioning.
At `cb2a79473bd1b51b950c9fa3e9f247f929c8ac3b`, 70 targeted Rust cases
pass on source verified against the committed four-file patch. With a 16
KiB target and 128 unique 1 KiB dictionary values, the original ordinary
dictionary reproducer drops from 128 requests / 16,942,080 bytes to 16 /
143,488; ListView and LargeListView drop from 128 / 17,056,768 to 16 /
149,632. Encoded HTTP bodies are decoded to check values, nulls, slices,
metadata, changing dictionaries, and overlapping views; additional cases
cover framing-driven splitting, oversized rows, stable retry bytes/IDs,
acknowledged progress, and atomic create. Real HTTP fault tests commit
Blob payloads to a local Lance table and verify byte equality, no
duplicate append, and zero abort/replay after ambiguous completion.
The earlier 811 remote and 7 progress cases at
`f36d217110a25f6b501c0255df9aaa60e3c8000a`, Linux Python remote
database/options results (437 cases plus 8 fixture consumers), Node
retry-binding evidence, and Rust/TypeScript documentation example checks
remain historical validation. Python/Node extensions were not rebuilt
for the dictionary follow-up; these results do not establish current
binding integration or fresh cross-platform/minimum-dependency CI
acceptance.
A separate real Query Node lifecycle experiment used SDK
`b8efe7d2d63647d4962789ca5fc042b59efe073d` and Sophon
`58b7895c7c287810fff4e89f13226fc5fa60d9ef`. After the actual listener
forced a connection closed, a surviving QN accepted a retry with
identical upload ID, part ID, and IPC bytes. Ordinary insert and
complete response-loss scenarios sent no replay or abort; fresh reads
observed exactly one commit and exact Blob bytes in all three scenarios.
This local experiment used a 1-second drain grace, two 32 KiB payloads,
and one distinct staged part. It validates acknowledgement-loss recovery
at those revisions, not concurrent overlapping attempts, large uploads,
physical orphan cleanup, the later dictionary encoding change, or the
original sixth-insert EOF.
The part target is not a process memory limit: source/ancestor buffers
and temporary compaction allocations may coexist. Struct/FixedSizeList
parent nulls can retain hidden child keys; this is not complete
logical-reachability GC for every Arrow combination, and retained hidden
values may affect wire size. The current local Lance 15.0.0-beta.17
rejects ListView/LargeListView persistence; the tests establish remote
client IPC encoding behavior, not native or Cloud persistence support.
Live Cloud, full workspace/Clippy, the original ordinary-insert
disconnect root cause, and Sophon's asynchronous transaction cleanup
behavior are not established. Cancelling during staging retains the
existing server-session cleanup limitation. Function reader delivery is
separate.
Remote Blob reads retain and concatenate intermediate IPC buffers across
batches and HTTP requests, increasing peak memory. Decode fragmented IPC
bodies using their declared length, assemble Blob values once across
batches/requests, and collect large-object Range responses into
known-size buffers. Impossible IPC/Range allocations return errors
instead of panicking. Closing a remote Blob file releases cached bytes
immediately, including while a cross-window read is waiting for the
network.
Rust and Python expose configurable Blob read buffers. Python sync/async
`fetch_blob_files` and `open_blob_file(s)` accept `buffer_size`; the
default is 512 KiB and zero disables prefetch. Explicit ranges bypass
prefetch. New PE batch-endpoint adoption is separate.
Malformed-length and retained-cache regressions fail on the previous
implementation and pass after the correction. Real HTTP tests cover
buffer propagation, close during blocked input, batch/request
aggregation, and large-object fallback. The final extension was rebuilt
before Python validation. Non-Blob Arrow arrays may still require
alignment copies; a contiguous multi-batch result still requires its
final allocation.
## Benchmark
Peak client RSS increment in KiB, using
`python/benchmarks/bench_fetch_blobs_rss.py`, independent clients and
real loopback HTTP. Both extensions were rebuilt from clean, unchanged
source with the same toolchain/configuration; loaded artifact hashes
were checked. Baseline `42f11d13a2755e44b63876b5a5edd93901291150`, after
`0a8a76de5286949d80368f95a5c529adf422c187`.
| Equivalent fetch workload | Payload | Before | After |
| --- | ---: | ---: | ---: |
| Single response, one batch | 48 MiB | 63,812 | 63,896 |
| Multiple responses, one batch per response | 144 MiB | 423,104 |
195,628 |
| Single response, 12 rows per batch | 48 MiB | 130,520 | 71,348 |
| Multiple responses, 12 rows per batch | 144 MiB | 363,144 | 172,748 |
| One oversized row, Range fallback | 70 MiB | 182,816 | 85,548 |
These are one observation per workload and build, not a statistical
distribution or memory upper bound. The single-batch workload shows no
improvement. Cloud/Sophon deployment, credentialed S3 and long-running
stress have not been exercised.
GPU Functions that use a scalar callable currently invoke the callable
once per row. The SDK documents Arrow-vectorized callables, but silently
accepts a scalar GPU callable, which makes it easy to assume that the
runtime will batch model work automatically.
Warn during Function construction when a GPU callable does not use the
documented vectorized form. A callable is recognized as vectorized when
every input is annotated as `pyarrow.Array`, or when a single input is
annotated as `pyarrow.RecordBatch`. The warning explains the resulting
per-row invocation and shows how to opt into batch execution. CPU
Functions and the vectorized GPU forms do not emit it.
The warning is advisory and does not change registration serialization,
the artifact, the runtime adapter, or execution behavior. It is one part
of the ENT-3522 documentation-and-warning alternative; it does not claim
that a single A10G meets the original batch throughput requirement.
Validation on the designated EC2 host reused the compatible existing
native extension from `ent3563-sdk-freshness-9336cfb`; this does not
claim a new native package or GPU performance run. The final head has a
clean source tree and ran:
```bash
PYTHONPATH="$sdk/python/python" /home/ec2-user/.venvs/ent3563-0a839fa/bin/python -m pytest -q python/python/tests/test_first_class_function_slice2.py -k 'gpu_marker_uses_gpu_runtime or gpu_scalar_warning_names_the_vectorized_alternative'
/home/ec2-user/.venvs/ent3563-0a839fa/bin/ruff format --check python/python/lancedb/functions.py python/python/tests/test_first_class_function_slice2.py
/home/ec2-user/.venvs/ent3563-0a839fa/bin/ruff check python/python/lancedb/functions.py python/python/tests/test_first_class_function_slice2.py
```
The actual result was `2 passed, 123 deselected`; both Ruff commands
passed. The original 2,000-row single-A10G throughput requirement
remains a separate ENT-3522 acceptance gate.
A plain `import ctypes.util` in a Function currently reports “dynamic
namespace access” without explaining the module restriction or a way
forward. Give blocked module imports a distinct error that names the
modules, explains the reconstructed namespace constraint, and recommends
an importable helper supplied through `code=`, `pip=`, or `conda=`.
Dynamic namespace operations also get an actionable explanation.
Document the full restrictions and the helper alternative in the
decorator and Python Functions reference. Add regression coverage for
direct imports, `from` imports, global module aliases, class Functions,
the deprecated `@udf` alias, and helpers imported normally or shipped
with `code=`. Existing import restrictions remain in place.
For example, move `ctypes.util.find_library` into
`native_diagnostics/__init__.py`, then use:
```python
import native_diagnostics
from lancedb import function
@function(code=[native_diagnostics])
def probe_library(name: str) -> str:
return native_diagnostics.find_library(name)
```
Fixes ENT-3408.
Add `exist_ok=False` to synchronous and asynchronous Python
`create_secret`. Passing `True` uses `CREATE SECRET IF NOT EXISTS`,
preserving an existing credential. The default continues to fail on an
existing name; rotation stays explicit through `alter_secret`.
```python
db.create_secret("api-key", value, exist_ok=True)
await async_db.create_secret("api-key", value, exist_ok=True)
```
The Rust API gains an awaitable builder with `.exist_ok(true)` while
existing `create_secret(...).await` calls keep working. Includes Python
SQL round-trip coverage and Rust coverage for direct and deferred SQL
responses.
Restore typed results for reopened Function and SQL-expression refresh jobs while preserving their handles and cached descriptions.
Fixes https://linear.app/lancedb/issue/ENT-3441.