Describe the bug
The Parquet file format proto decoder can panic while decoding malformed TableParquetOptions bytes.
ParquetLogicalExtensionCodec::try_decode_file_format returns a Result, but it converts decoded TableParquetOptionsProto through an infallible FromProto path. That path parses ParquetOptionsProto.writer_version with expect, so an invalid value such as "3.0" aborts the decode path instead of returning a DataFusion error.
To Reproduce
Construct a TableParquetOptionsProto with a present global options message and an invalid writer version:
TableParquetOptionsProto {
global: Some(ParquetOptionsProto {
writer_version: "3.0".to_string(),
..Default::default()
}),
..Default::default()
}
Encode it and pass the bytes to ParquetLogicalExtensionCodec::try_decode_file_format.
Expected behavior
The decoder should return an error, consistent with the try_decode_file_format API and the existing writer-version validation.
Additional context
An empty proto writer_version should continue to use DataFusion's default writer version so proto default values remain compatible.
Describe the bug
The Parquet file format proto decoder can panic while decoding malformed
TableParquetOptionsbytes.ParquetLogicalExtensionCodec::try_decode_file_formatreturns aResult, but it converts decodedTableParquetOptionsProtothrough an infallibleFromProtopath. That path parsesParquetOptionsProto.writer_versionwithexpect, so an invalid value such as"3.0"aborts the decode path instead of returning a DataFusion error.To Reproduce
Construct a
TableParquetOptionsProtowith a presentglobaloptions message and an invalid writer version:Encode it and pass the bytes to
ParquetLogicalExtensionCodec::try_decode_file_format.Expected behavior
The decoder should return an error, consistent with the
try_decode_file_formatAPI and the existing writer-version validation.Additional context
An empty proto
writer_versionshould continue to use DataFusion's default writer version so proto default values remain compatible.