rxdrccq commented on PR #27348:
URL: https://github.com/apache/datafusion/pull/27348#issuecomment-7073291236

   Thanks for the question! This PR targets the legacy 
`FileScanExecConf.projection` field. As far as I can tell, 
`ParquetSource::try_from_proto` was the only place still indexing the schema 
with it: the shared `FileScanConfig::try_from_proto` ignores that field 
(current encoders leave it empty), and the other file sources don't read it.
   
   The current projection path, `projection_exprs`, is already bounds-checked. 
I tested an out-of-range `Column` index there (`1` and `u32::MAX` against a 
one-column schema, with and without a predicate), and decoding returns `Column 
index ... out of bounds for projected expressions of length 1` instead of 
panicking. That check is in `ProjectionExprs` 
(`datafusion/physical-expr/src/projection.rs`), which already has its own unit 
test, so I kept this PR focused on the legacy field.
   


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