Skip to content

fix(scan): validate deletion vector delete tasks - #3145

Open
linhongyu510 wants to merge 9 commits into
apache:mainfrom
linhongyu510:design/file-scan-delete-validation
Open

fix(scan): validate deletion vector delete tasks#3145
linhongyu510 wants to merge 9 commits into
apache:mainfrom
linhongyu510:design/file-scan-delete-validation

Conversation

@linhongyu510

Copy link
Copy Markdown

Summary

  • validate deletion vector invariants when FileScanTaskDeleteFile is built
  • migrate delete-file fixtures and callers to the validated builder result shape
  • remove duplicate single-task deletion-vector structural checks from the loader and delete-file index

Testing

  • cargo test -p iceberg scan::task::tests::test_delete_file_builder --lib
  • cargo test -p iceberg --lib delete_file_loader
  • cargo test -p iceberg --lib row_filter
  • cargo test -p iceberg --lib caching_delete_file_loader
  • cargo test -p iceberg --lib delete_file_index
  • cargo test -p iceberg --lib
  • cargo clippy -p iceberg --all-targets --all-features -- -D warnings
  • cargo fmt --all -- --check

Closes #3135.

@linhongyu510

Copy link
Copy Markdown
Author

CI follow-up pushed in 8ff9d12: removed the internal design note that failed the Apache license-header check, made the helper private, and updated the validated builder public API baseline. Verified locally with 15 targeted scan tests, rustfmt, clippy -D warnings, LICENSE/NOTICE checks, and cargo-public-api 0.51.0 output comparison.

field_defaults(setter(prefix = "with_")),
build_method(into = Result<FileScanTaskDeleteFile>)
)]
pub struct FileScanTaskDeleteFile {

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.

We should remove all pub fields, and add pub getter to avoid inconsistent changes.

@linhongyu510

Copy link
Copy Markdown
Author

Addressed the review in 0228cd4: all FileScanTaskDeleteFile fields are private, with read-only getters used by internal callers; the public API baseline is updated. Verified 66 focused tests, workspace fmt, Clippy with -D warnings, public API checks, and git diff --check.

@linhongyu510
linhongyu510 marked this pull request as ready for review September 4, 2026 22:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Validate the construction of FileScanTaskDeleteFile.

2 participants