Repository navigation
feat(data): add filter-based merge-on-read deletion - #1182
Draft
wirybeaver wants to merge 1 commit into
Draft
wirybeaver wants to merge 1 commit into
wirybeaver wants to merge 1 commit into
Conversation
wirybeaver
force-pushed
the
feature/mor-delete-by-filter
branch
from
November 26, 2026 21:27
4021e55 to
0bcf24e
Compare
This was referenced Nov 26, 2026
This branch has not been deployed
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.
Depends on #919. The filter-based operation is the final commit on this branch.
Motivation
A caller deleting rows by predicate should be able to pass the table and filter and let the library find the matching positions. This supplies the higher-level merge-on-read caller for the write helper in #919.
Modification
MergeOnReadDelete(table, filter)plans against an explicit snapshot and resolves the predicate against the current table schema. It reads live rows using the scan’s FileIO, enforces residual predicates, and groups absolute row positions by data file.The operation honors the configured delete isolation level. An empty match leaves the snapshot unchanged. Matching positions are buffered in memory before writing.
Test
In-library integration tests use real Parquet and Puffin encoding with an in-memory catalog. A v3 test starts with a previously deleted row, renames the filter column, deletes another row by its new column name, and checks the exact survivors after reloading. Repeating the predicate creates no snapshot. Other cases cover a v2 predicate delete followed by upgrade, and an acknowledged-as-unknown commit whose published DV remains readable.