refactor(parquet): extract InitialDecoderState from the opener decoder-setup block - #24572
Merged
Merged
Conversation
…r-setup block The decoder-setup block in the opener returned a bare `(decoder, rg_plan, has_row_selection)` tuple. Give it a named `InitialDecoderState` struct so the values carried out of the block stay self-documenting as more are added (e.g. by apache#23696). Pure refactor, no behavior change. Closes apache#24286.
Contributor
There was a problem hiding this comment.
Pull request overview
Refactors Parquet decoder setup to use a named InitialDecoderState struct instead of a positional tuple.
Changes:
- Adds the named decoder state struct.
- Updates the opener to construct and destructure it.
- Preserves existing behavior.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
datafusion/datasource-parquet/src/push_decoder.rs |
Defines InitialDecoderState. |
datafusion/datasource-parquet/src/opener/mod.rs |
Uses the struct during decoder setup. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #24572 +/- ##
==========================================
+ Coverage 81.34% 81.36% +0.01%
==========================================
Files 1117 1116 -1
Lines 397528 397513 -15
Branches 397528 397513 -15
==========================================
+ Hits 323385 323449 +64
+ Misses 55225 55123 -102
- Partials 18918 18941 +23 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
adriangb
approved these changes
Aug 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Rationale for this change
Split out from #23696 (per @adriangb's decomposition proposal, PR 3).
The decoder-setup block in the opener returns a bare
(decoder, rg_plan, has_row_selection)tuple. Giving it a namedInitialDecoderStatestruct keeps the values carried out of the block self-documenting, and means the follow-up feature PR (#23696) adds fields to a named struct instead of reshaping a positional tuple.What changes are included in this PR?
push_decoder.rs: newpub(crate) struct InitialDecoderState { decoder, rg_plan, has_row_selection }.opener/mod.rs: the decoder-setup block returnsInitialDecoderState { .. }and is destructured back into the same locals.Pure refactor, no behavior change.
Are these changes tested?
Covered by the existing
dynamic_row_group_pruningintegration tests (they drive the opener path); all pass.clippy --all-targets --all-features -D warningsis clean.Are there any user-facing changes?
No.