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

   ## Which issue does this PR close?
   
   Closes #27327.
   
   ## Rationale for this change
   
   Decoding a Parquet scan with an out-of-bounds legacy projection index 
panics, even when no predicate is present. Invalid input should return an error.
   
   ## What changes are included in this PR?
   
   Use Arrow's fallible `Schema::project` instead of unchecked field access in 
`ParquetSource::try_from_proto`. Keeping the check in the datasource decoder 
also covers direct callers.
   
   ## What is the testing strategy for this PR?
   
   Added regression tests for the exact eight-byte payload from the issue and 
for valid and invalid legacy projections, with and without a predicate. The 
cases include repeated indices, the schema boundary, and `u32::MAX`.
   
   ## Are there any user-facing changes?
   
   Malformed Parquet protobuf plans with out-of-bounds legacy projection 
indices now return an error instead of panicking.
   
   AI assistance was used to implement and review this change.
   


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