AlyAbdelmoneim opened a new pull request, #19515:
URL: https://github.com/apache/datafusion/pull/19515
## Which issue does this PR close?
- Part of #17498.
## Rationale for this change
Currently, invalid `writer_version` values (e.g., "3.0") are accepted at
`SET` time 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 as `ExplainFormat`.
## What changes are included in this PR?
- Add `DFWriterVersion` enum with `FromStr`, `Display`, `ConfigField`
implementations
- Change `ParquetOptions.writer_version` from `String` to `DFWriterVersion`
- Remove `parse_version_string` function (validation now happens at config
time)
- Update proto conversions to validate during deserialization
- Add test for early validation
## Are these changes tested?
Yes. Added `test_parquet_writer_version_validation` that verifies:
- Valid values ("1.0", "2.0") are accepted
- Invalid values ("3.0", "invalid") are rejected immediately at SET time
- Error messages are clear and helpful
## Are there any user-facing changes?
Yes. Invalid `writer_version` values now error immediately when set via
`SET` command or proto deserialization, instead of failing later during parquet
file writing. This provides better error messages and earlier feedback.
--
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]