feat: Fuse partition and metrics filtering into manifest deserialization - #3658
feat: Fuse partition and metrics filtering into manifest deserialization#3658zenfenan wants to merge 3 commits into
Conversation
fc4e2f1 to
9492802
Compare
abnobdoss
left a comment
There was a problem hiding this comment.
This looks good. My main concern is whether we can extend fetch_manifest_entry and avoid introducing prune_manifest_entry.
There was a problem hiding this comment.
Thank you for addressing the feedback. This looks good to me!
One thought: a simpler alternative might be to convert fetch_manifest_entry into a generator instead of adding entry_filter. That way _open_manifest keeps its existing comprehension filter and the memory win comes for free, with no new parameter. It would be a wider change though, so not sure what maintainers would prefer here.
Thanks! Good idea. A generator would give the memory win without a new parameter. Two things make me lean toward keeping the current approach here, though: it changes the return-type contract (callers doing Happy to explore the generator conversion as a separate PR if maintainers think the broader change is worth it. |
|
Whenever you have a free moment, could you please take a look at this PR? All checks are green and previous feedback is addressed. Really appreciate it! |
|
This pull request has been marked as stale due to 30 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that's incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the dev@iceberg.apache.org list. Thank you for your contributions. |
|
This pull request has been closed due to lack of activity. This is not a judgement on the merit of the PR in any way. It is just a way of keeping the PR queue manageable. If you think that is incorrect, or the pull request requires review, you can revive the PR at any time. |
|
@kevinjqliu Could you please re-open this PR, and review this? Highly appreciated! |
Closes #3657
Rationale for this change
_open_manifest()currently deserializes all live manifest entries viafetch_manifest_entry()and then applies partitions & metrics filters as a second pass. This materialises the full list before discarding non-matching entries.This PR adds
ManifestFile#prune_manifest_entry()that fuses filtering into the deserialization loop, avoiding the intermediate list allocation for non-matching entries.Are these changes tested?
Yes, existing test suit passes. No behavioral change. Correctness was validated across all benchmark runs (matched entry counts identical between both paths).
Are there any user-facing changes?
No.