fix(proto): preserve Parquet source and sink state - #25057
Open
buraksenn wants to merge 3 commits into
Open
Conversation
buraksenn
marked this pull request as draft
September 8, 2026 09:11
|
Thank you for opening this pull request! Reviewer note: cargo-semver-checks reported the current version number is not SemVer-compatible with the changes in this pull request (compared against the base branch). Details |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #25057 +/- ##
==========================================
+ Coverage 81.74% 82.06% +0.32%
==========================================
Files 1128 1128
Lines 416645 416850 +205
Branches 416645 416850 +205
==========================================
+ Hits 340580 342092 +1512
+ Misses 55998 54328 -1670
- Partials 20067 20430 +363 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
buraksenn
marked this pull request as ready for review
September 8, 2026 15:14
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
Parquet source and sink protobuf hooks accessed fields individually and silently dropped source metadata prefetch hints and sink sorting-column metadata. This changed performance characteristics and omitted metadata from files written after a plan round trip.
What changes are included in this PR?
ParquetSource,ParquetSink, and their protobuf messages.ParquetSource::metadata_size_hintwith a checked integer conversion.ParquetSink::sorting_columns, including the distinction betweenNoneand an empty list.#24930 already preserves
reverse_row_groupsandsort_order_for_reorder; this PR builds on that behavior rather than duplicating it.The protobuf wire changes are additive and backward compatible.
What is the testing strategy for this PR?
Physical-plan round-trip coverage verifies:
None, zero, a normal value, andusize::MAX.None, an empty list, and populated lists.Both regression tests were ablation-checked and fail when their corresponding field is omitted from serialization.
Validated with:
cargo test -p datafusion-proto --test proto_integration --features json(262 passed)cargo clippy -p datafusion-datasource-parquet -p datafusion-proto --all-features --tests -- -D warningscargo fmt --all -- --check./ci/scripts/doc_prettier_check.sh --write --allow-dirtyAre there any user-facing changes?
Parquet scan metadata prefetch hints and sink sorting-column metadata now survive protobuf plan round trips. The protobuf wire additions are backward compatible.
Adding
metadata_size_hintto the generated publicParquetScanExecNodeRust struct andsorting_columnstoParquetSinkis a source-level API change for callers using exhaustive struct literals. Such callers must initialize the new fields (useNoneto retain previous behavior) or use..Default::default(). This migration is documented in the DataFusion 56.0.0 upgrade guide.