You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "xushiyan (via GitHub)" <gi...@apache.org> on 2026/04/28 05:08:21 UTC
Re: [PR] feat: improve partition pruning during file listing [hudi-rs]
xushiyan commented on PR #238:
URL: https://github.com/apache/hudi-rs/pull/238#issuecomment-4332499175
Hi @TheR1sing3un, thanks again for the work here and apologies for the long delay.
After re-evaluating, I'm going to close this PR. Summary of the analysis:
**Code path scope.** This optimization only runs in the no-MDT file-listing path. With the metadata table FILES partition enabled (the production recommendation), partition discovery comes from metadata records and bypasses filesystem listing entirely.
**Architecture has shifted.** Since this PR was opened, the listing logic moved out of `FileSystemView` into a dedicated `FileLister` (`crates/core/src/table/listing.rs`), so the patch would need a substantial rework to apply.
**ROI of the leveled-pruning approach as proposed:**
- Gain: ~10–20x fewer sequential LIST calls only when (no MDT) AND (remote object store) AND (selective partition filter). Zero gain otherwise.
- Cost: ~150 LOC of production code, a new `should_include_with_level` / `parse_segment_with_level` API surface that has to stay in sync with `should_include` forever, breaking `PartitionPruner::schema` encapsulation, and changing `list_file_groups_for_partition` to return a tuple.
**Cheaper alternatives** that capture the same wins (and more) with much less surface area:
1. Parallelize `get_leaf_dirs` in `crates/core/src/storage/mod.rs` (the recursive descent is currently sequential). This benefits every no-MDT query, not just the filtered ones.
2. Add an optional per-level predicate to `get_leaf_dirs` so pruning happens during descent — same effect as the leveled approach without a parallel pruner API.
I've re-scoped #205 along these lines and left it open. Would love to have you pick it up again, or anyone else in the community.
Closing this PR. Thanks for the contribution and for raising the perf concern in the first place — the underlying issue stays on the roadmap.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org