Validate parquet writer version 17498 #19515
Open
+182
−26
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
Currently, invalid
writer_versionvalues (e.g., "3.0") are accepted atSETtime and only fail later when writing parquet files. This PR adds early validation so invalid values are rejected immediately with clear error messages, following the same pattern asExplainFormat.What changes are included in this PR?
DFWriterVersionenum withFromStr,Display,ConfigFieldimplementationsParquetOptions.writer_versionfromStringtoDFWriterVersionparse_version_stringfunction (validation now happens at config time)Are these changes tested?
Yes. Added
test_parquet_writer_version_validationthat verifies:Are there any user-facing changes?
Not exactly. Invalid
writer_versionvalues now error immediately when set viaSETcommand or proto deserialization, instead of failing later during parquet file writing. This provides better error messages and earlier feedback.So the change is in the feedback not in the input.