adriangb opened a new pull request, #23426: URL: https://github.com/apache/datafusion/pull/23426
## Which issue does this PR close? - N/A — follow-up cleanup requested in review of #23396 ([comment](https://github.com/apache/datafusion/pull/23396#discussion_r3552883479)). **Stacked on #23396.** Please merge that one first; until it lands this PR's diff against `main` also contains its commits. The change reviewable here is the last commit, [`root_level_plan`](https://github.com/apache/datafusion/pull/23396#discussion_r3552883479). ## Rationale for this change `build_projection_read_plan` has three early-return paths (all-plain-columns fast path, no-struct-columns fast path, and the no-struct-accesses fallback). Each one repeated the same three-step sequence: `ProjectionMask::roots`, `Schema::project`, then construct a `ParquetReadPlan`. As @mbutrovich noted in review, a small local helper collapses all three. ## What changes are included in this PR? - New private `root_level_plan(root_indices, file_schema, schema_descr) -> ParquetReadPlan` in `projection_read_plan.rs`, documenting the precondition that `root_indices` is sorted and deduplicated and that every leaf below each root gets decoded. - The three call sites now delegate to it. Net −9 lines. No behavior change. ## Are these changes tested? Yes, by existing tests: `datafusion-datasource-parquet` unit tests (158 pass) and the `parquet_integration` suite in `datafusion` (213 pass), both unchanged. ## Are there any user-facing changes? No. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01BsRGsN18YBCji5iFTQmWpr -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
