[SQL] Add ParquetFormatVersion enum and writer version option#55273
Open
divjotarora wants to merge 1 commit intoapache:masterfrom
Open
[SQL] Add ParquetFormatVersion enum and writer version option#55273divjotarora wants to merge 1 commit intoapache:masterfrom
divjotarora wants to merge 1 commit intoapache:masterfrom
Conversation
d719adc to
36c498c
Compare
… option plumbing Add WRITER_VERSION and OUTPUT_TIMESTAMP_TYPE options to ParquetOptions so callers (e.g., Delta Lake) can control the Parquet writer version and timestamp encoding through the write options map. Wire both through ParquetUtils.prepareWrite() to the Hadoop Configuration. Co-authored-by: Isaac
36c498c to
d55d399
Compare
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.
What changes were proposed in this pull request?
This PR adds
parquet.writer.versionandspark.sql.parquet.outputTimestampTypetoParquetOptionsand allows them to be plumbed down to Parquet writes via this mechanism. Note thatparquet.writer.versionis named differently than other configs (nosparkprefix) because it is defined in theparquet-javadependency and passed down directly via Spark. These configs are already settable via SQL confs (see existing test case) and are just dropped when passed via writer options (df.option("foo", "bar").save()), so this PR is just fixing that.Why are the changes needed?
These changes are required to open source the functionality to configure the Parquet format version for writes to Delta and Iceberg tables.
Does this PR introduce any user-facing change?
No
How was this patch tested?
Integration tests to validate that these configurations can be pushed down via writer options.
Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude Code (claude-opus-4-6)