Skip to content

feat: report the row ids deleted between two versions - #8589

Merged
Xuanwo merged 1 commit into
lance-format:mainfrom
wkalt:ticket/ent-1961/delta-deleted-row-ids
Aug 21, 2026
Merged

feat: report the row ids deleted between two versions#8589
Xuanwo merged 1 commit into
lance-format:mainfrom
wkalt:ticket/ent-1961/delta-deleted-row-ids

Conversation

@wkalt

@wkalt wkalt commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

A delta can stream the rows a version range inserted or updated, but not the ones it deleted, so a caller cannot see removals without reading the whole dataset.

The result is the ids live at the begin version and absent at the end version. Each begin fragment's deletion-vector growth is mapped through its row id sequence, and ids still live at the end -- moved by compaction or update, or revived by restore -- are excluded with a sort-merge anti join that spills past the session memory pool, so memory stays bounded. Version 0 is the empty snapshot; reversed ranges and endpoints without stable row ids are rejected. Batches follow the scanner's default size.

Comparing endpoints surfaced a restore bug, fixed separately in #8671. Exposed in Python and Java alongside the existing readers.

@wkalt
wkalt marked this pull request as draft August 17, 2026 20:32
@wkalt
wkalt marked this pull request as ready for review August 17, 2026 20:32
@codecov

codecov Bot commented Aug 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@github-actions github-actions Bot added A-python Python bindings A-java Java bindings + JNI labels Aug 18, 2026
@wkalt
wkalt force-pushed the ticket/ent-1961/delta-deleted-row-ids branch from ee949fb to f7e54da Compare August 18, 2026 14:29
@github-actions github-actions Bot added the enhancement New feature or request label Aug 18, 2026
@wkalt
wkalt force-pushed the ticket/ent-1961/delta-deleted-row-ids branch from f7e54da to caf9029 Compare August 18, 2026 14:58
lance-gatekeeper[bot]

This comment was marked as outdated.

@lance-gatekeeper lance-gatekeeper Bot added the K-changes Latest Gatekeeper recommendation requests changes. label Aug 18, 2026
@wkalt
wkalt force-pushed the ticket/ent-1961/delta-deleted-row-ids branch 2 times, most recently from 11ef319 to 33cdd7e Compare August 19, 2026 23:28
@lance-gatekeeper lance-gatekeeper Bot removed the K-changes Latest Gatekeeper recommendation requests changes. label Aug 19, 2026
lance-gatekeeper[bot]

This comment was marked as outdated.

@lance-gatekeeper lance-gatekeeper Bot added the K-changes Latest Gatekeeper recommendation requests changes. label Aug 19, 2026
@wkalt
wkalt force-pushed the ticket/ent-1961/delta-deleted-row-ids branch from 33cdd7e to a826484 Compare August 20, 2026 14:36
@lance-gatekeeper lance-gatekeeper Bot removed the K-changes Latest Gatekeeper recommendation requests changes. label Aug 20, 2026
lance-gatekeeper[bot]

This comment was marked as outdated.

@lance-gatekeeper lance-gatekeeper Bot added the K-changes Latest Gatekeeper recommendation requests changes. label Aug 20, 2026
@wkalt
wkalt force-pushed the ticket/ent-1961/delta-deleted-row-ids branch from a826484 to 3b5ab5b Compare August 20, 2026 15:23
@lance-gatekeeper lance-gatekeeper Bot removed the K-changes Latest Gatekeeper recommendation requests changes. label Aug 20, 2026
lance-gatekeeper[bot]

This comment was marked as outdated.

@lance-gatekeeper lance-gatekeeper Bot added the K-changes Latest Gatekeeper recommendation requests changes. label Aug 20, 2026
@wkalt
wkalt force-pushed the ticket/ent-1961/delta-deleted-row-ids branch 2 times, most recently from 53ec482 to 3ff5e8c Compare August 20, 2026 17:47
@lance-gatekeeper lance-gatekeeper Bot removed the K-changes Latest Gatekeeper recommendation requests changes. label Aug 20, 2026
lance-gatekeeper[bot]

This comment was marked as outdated.

@lance-gatekeeper lance-gatekeeper Bot added the K-changes Latest Gatekeeper recommendation requests changes. label Aug 20, 2026
@wkalt
wkalt force-pushed the ticket/ent-1961/delta-deleted-row-ids branch from 3ff5e8c to 3344daf Compare August 20, 2026 18:27
@wkalt
wkalt force-pushed the ticket/ent-1961/delta-deleted-row-ids branch from 38c9c34 to 76b84db Compare August 20, 2026 22:04
@lance-gatekeeper lance-gatekeeper Bot removed the K-changes Latest Gatekeeper recommendation requests changes. label Aug 20, 2026
lance-gatekeeper[bot]

This comment was marked as outdated.

@lance-gatekeeper lance-gatekeeper Bot added the K-changes Latest Gatekeeper recommendation requests changes. label Aug 20, 2026
@wkalt
wkalt force-pushed the ticket/ent-1961/delta-deleted-row-ids branch 3 times, most recently from 74a568a to b13b74f Compare August 20, 2026 23:31
@lance-gatekeeper lance-gatekeeper Bot removed the K-changes Latest Gatekeeper recommendation requests changes. label Aug 20, 2026
lance-gatekeeper[bot]

This comment was marked as outdated.

@lance-gatekeeper lance-gatekeeper Bot added the K-changes Latest Gatekeeper recommendation requests changes. label Aug 20, 2026
@wkalt
wkalt force-pushed the ticket/ent-1961/delta-deleted-row-ids branch from b13b74f to 9314f11 Compare August 21, 2026 00:27
@lance-gatekeeper lance-gatekeeper Bot removed the K-changes Latest Gatekeeper recommendation requests changes. label Aug 21, 2026
lance-gatekeeper[bot]

This comment was marked as outdated.

lance-gatekeeper[bot]

This comment was marked as outdated.

lance-gatekeeper[bot]

This comment was marked as outdated.

@lance-gatekeeper lance-gatekeeper Bot added the K-changes Latest Gatekeeper recommendation requests changes. label Aug 21, 2026
@wkalt
wkalt force-pushed the ticket/ent-1961/delta-deleted-row-ids branch 2 times, most recently from 1fd181a to f0a9834 Compare August 21, 2026 01:17
@lance-gatekeeper lance-gatekeeper Bot removed the K-changes Latest Gatekeeper recommendation requests changes. label Aug 21, 2026
lance-gatekeeper[bot]

This comment was marked as outdated.

@lance-gatekeeper lance-gatekeeper Bot added the K-approved Latest Gatekeeper recommendation permits acceptance. label Aug 21, 2026
A delta can stream the rows a version range inserted or updated, but not
the ones it deleted: they cannot be scanned at the end version, leaving a
caller unable to see removals without reading the whole dataset.

The result is the ids live at the begin version and absent at the end
version. Each begin fragment's deletion-vector growth is mapped through
its row id sequence, and ids still live at the end are excluded -- a
compaction or update moves rows without deleting them, and a restore
revives them in place. A moved row can only land in a fragment the
range created and a revived one where a deletion vector shrank, so the
exclusion is a sort-merge anti join against exactly those newly live
ids, run the way merge_insert runs its joins: bounded by the
session memory pool and spilling past it. Version 0 is the empty
snapshot, and a reversed range is rejected rather than read backwards.

Batches follow the scanner's default size, bounding a consumer's per-batch
work rather than the read. Requires stable row ids at both endpoints: a
history can hold versions from before the ids were enabled, and either
endpoint without them is rejected rather than misread. Exposed in Python
and Java alongside the existing readers.
@wkalt
wkalt force-pushed the ticket/ent-1961/delta-deleted-row-ids branch from f0a9834 to dafa059 Compare August 21, 2026 11:15
@lance-gatekeeper lance-gatekeeper Bot removed the K-approved Latest Gatekeeper recommendation permits acceptance. label Aug 21, 2026

@lance-gatekeeper lance-gatekeeper Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gate recommendation: approve.

The rebase keeps the feature patch unchanged and places the restore high-water fix in the base. Endpoint deletion semantics, spill-bounded anti-join behavior, and single-pass row-ID traversal remain intact on the current head.

@lance-gatekeeper lance-gatekeeper Bot added K-approved Latest Gatekeeper recommendation permits acceptance. and removed K-approved Latest Gatekeeper recommendation permits acceptance. labels Aug 21, 2026

@Xuanwo Xuanwo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, nice work!

@Xuanwo
Xuanwo merged commit 3abd50d into lance-format:main Aug 21, 2026
43 of 46 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-java Java bindings + JNI A-python Python bindings enhancement New feature or request K-approved Latest Gatekeeper recommendation permits acceptance.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants