Repository navigation
Conversation
04fac57 to
a6725c8
Compare
a6725c8 to
3b3504c
Compare
cd15088 to
48dcb35
Compare
Own, cancel, and join planning workers, propagating failures even when no data task uses the delete index.
48dcb35 to
7fdfcfd
Compare
| None | ||
| }; | ||
|
|
||
| if skipped { |
There was a problem hiding this comment.
The description says manifests containing only deleted entries are skipped, but skipped is only set by predicate evaluation here.
I reproduced this with one data manifest containing only DELETED entries, with both added_files_count and existing_files_count equal to Some(0). The scan returns no tasks, but reports:
scanned_data_manifests = 1
skipped_data_manifests = 0
Java excludes these manifests before incrementing the scanned counter, producing scanned=0 and skipped=1.
Should this also check !manifest_file.has_added_files() && !manifest_file.has_existing_files()? The existing helpers conservatively scan when either count is unknown.
There was a problem hiding this comment.
Thanks for the review Alex! I realized that this PR's diff size was probably too large and started to split out some work.
The issue you found here is now fixed separately in #3708 but I didn't update the harness yet accordingly, sorry about that! 🙏
|
Closing this in favor of a more granular break-down: |
Which issue does this PR close?
This PR is another attempt at closing #1466 by implementing Iceberg's Metrics Reporting, starting with scan reports. It supersedes my original #1496 and is the first of three planned PRs. The idea of what's to come:
What changes are included in this PR?
This first PR implements the collection of metrics relevant for scan reports. It counts metrics such as number of manifests, data files, total bytes, used during planning.
It adds a (for now private) reporter trait to capture the counts in tests. A follow-up PR will work on its public API.
Reports describe work planned per invocation, including partial and failed scans. They do not indicate success. Planning doesn't wait for reports to be submitted.
Planning also now propagates unused delete-index failures and skips dead-only manifests, matching Java's behavior.
The commits are ordered for independent review:
9d03a810a— planner behavior9f7bc1a78— countinga6725c8ac— reportingAre these changes tested?
68% of the changes are unit and integration tests, but more interestingly is the separate harness comparing scan metrics to Java's scan metrics!
The branch
scan-reports-1-validationruns both implementations against the same physical table files and compares file/delete plans, report fields and counters.The test branch is not meant to be merged because of it's setup that doesn't fit well into the repo's existing integration test suite.
35/39 fixtures match all compared fields and plans. Four retain explained differences: equality-delete predicate pruning, equality-delete association, and close after one task in normal and copy-on-write planning.
The first two expose existing planner differences: Rust attaches deletes that Java can exclude using column bounds, and the counters reflect those different plans. The latter two reflect scheduling-dependent read-ahead: Rust can (sometimes) plan buffered tasks that Java has not yet visited.
AI Disclosure
AI assisted implementation and validation.