feat: report the row ids deleted between two versions - #8589
Merged
Xuanwo merged 1 commit intoAug 21, 2026
Conversation
wkalt
marked this pull request as draft
August 17, 2026 20:32
wkalt
marked this pull request as ready for review
August 17, 2026 20:32
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
wkalt
force-pushed
the
ticket/ent-1961/delta-deleted-row-ids
branch
from
August 18, 2026 14:29
ee949fb to
f7e54da
Compare
wkalt
force-pushed
the
ticket/ent-1961/delta-deleted-row-ids
branch
from
August 18, 2026 14:58
f7e54da to
caf9029
Compare
wkalt
force-pushed
the
ticket/ent-1961/delta-deleted-row-ids
branch
2 times, most recently
from
August 19, 2026 23:28
11ef319 to
33cdd7e
Compare
wkalt
force-pushed
the
ticket/ent-1961/delta-deleted-row-ids
branch
from
August 20, 2026 14:36
33cdd7e to
a826484
Compare
wkalt
force-pushed
the
ticket/ent-1961/delta-deleted-row-ids
branch
from
August 20, 2026 15:23
a826484 to
3b5ab5b
Compare
wkalt
force-pushed
the
ticket/ent-1961/delta-deleted-row-ids
branch
2 times, most recently
from
August 20, 2026 17:47
53ec482 to
3ff5e8c
Compare
wkalt
force-pushed
the
ticket/ent-1961/delta-deleted-row-ids
branch
from
August 20, 2026 18:27
3ff5e8c to
3344daf
Compare
wkalt
force-pushed
the
ticket/ent-1961/delta-deleted-row-ids
branch
from
August 20, 2026 22:04
38c9c34 to
76b84db
Compare
wkalt
force-pushed
the
ticket/ent-1961/delta-deleted-row-ids
branch
3 times, most recently
from
August 20, 2026 23:31
74a568a to
b13b74f
Compare
wkalt
force-pushed
the
ticket/ent-1961/delta-deleted-row-ids
branch
from
August 21, 2026 00:27
b13b74f to
9314f11
Compare
wkalt
force-pushed
the
ticket/ent-1961/delta-deleted-row-ids
branch
2 times, most recently
from
August 21, 2026 01:17
1fd181a to
f0a9834
Compare
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
force-pushed
the
ticket/ent-1961/delta-deleted-row-ids
branch
from
August 21, 2026 11:15
f0a9834 to
dafa059
Compare
Contributor
There was a problem hiding this comment.
✅ 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.