Repository navigation
fix(scan): validate deletion vector delete tasks #3145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
blackmwk
merged 14 commits into
apache:main
from
linhongyu510:design/file-scan-delete-validation
Oct 9, 2026
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
76640f1
docs: design delete task validation
linhongyu510 d8f04e9
fix(scan): validate delete task construction
linhongyu510 bf8474d
refactor(scan): use validated delete task builder
linhongyu510 f97f757
refactor(scan): centralize deletion vector validation
linhongyu510 d7064e8
style(scan): format validated delete task changes
linhongyu510 d8e80b5
fix(scan): satisfy public API and license checks
linhongyu510 acc59dd
test(scan): adapt merged reader fixtures
linhongyu510 706f5ed
refactor(scan): encapsulate delete file metadata
linhongyu510 8ef81ad
fix(scan): propagate invalid delete task errors
linhongyu510 4d7e831
fix(scan): unwrap the delete-file builder in the scan test
linhongyu510 9f5cbbf
refactor(scan): make delete-file byte offsets unsigned
linhongyu510 8330c6a
refactor(scan): validate delete files on deserialize and enforce size…
linhongyu510 ea27138
Merge remote-tracking branch 'origin/main' into design/file-scan-dele…
linhongyu510 66d3d96
docs(scan): clarify deletion vector loader extraction
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
207 changes: 93 additions & 114 deletions
207
crates/iceberg/src/arrow/caching_delete_file_loader.rs
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test_deletion_vector_builder_rejects_missing_referenced_data_fileandtest_deletion_vector_builder_rejects_missing_coordinates(line 1209) call onlyFileScanTaskDeleteFile::builder(). They repeattest_delete_file_builder_rejects_dv_missing_referenced_data_fileandtest_delete_file_builder_rejects_dv_missing_content_offsetinscan/task.rs, and nothing in them involves the index.What they replaced was the index-level test for missing coordinates. With this PR that check fires in
get_deletes_for_data_filethroughTryFrom<&DeleteFileContext>, and no test covers that path anymore. It does work at the head commit. I built a DV withbuild_deletion_vector, setcontent_offset = None, andget_deletes_for_data_file(&data_file, Some(0))returnedDataInvalid => deletion vector ... is missing content_offset. Could you replace these two tests with one that asserts throughget_deletes_for_data_file, so the index path is covered?