fallintoplace opened a new pull request, #22467:
URL: https://github.com/apache/datafusion/pull/22467

   ## Which issue does this PR close?
   
   - N/A
   
   ## Rationale for this change
   
   Parquet file format proto decoding is exposed through a 
`try_decode_file_format` API, but invalid `writer_version` values could still 
panic because the Parquet options conversion used an infallible `expect` while 
parsing the writer version.
   
   This makes malformed or manually produced proto bytes abort the decode path 
instead of returning a DataFusion error.
   
   ## What changes are included in this PR?
   
   - Convert Parquet table options decoding in the file format codec to the 
fallible `TryFromProto` path.
   - Return the existing writer version validation error for invalid non-empty 
proto values.
   - Treat an empty proto `writer_version` as the default writer version for 
compatibility with proto default values.
   - Add regression coverage for invalid and empty writer version decoding.
   
   ## Are these changes tested?
   
   - `cargo fmt --all`
   - `cargo test -p datafusion-proto --lib try_decode_file_format --features 
parquet`
   - `cargo test -p datafusion-proto --lib --features parquet`
   - `cargo clippy -p datafusion-proto --lib --features parquet -- -D warnings`
   
   ## Are there any user-facing changes?
   
   Invalid Parquet writer versions in serialized file format protos now return 
an error instead of panicking during decode.
   


-- 
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]

Reply via email to