Files
lancedb/docs/web-tests/py
Xuanwo 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
2026-11-21 06:41:38 +08:00
..