wleeaf opened a new pull request, #11883:
URL: https://github.com/apache/arrow-rs/pull/11883

   # Which issue does this PR close?
   
   - Closes #11852.
   
   # Rationale for this change
   
   When converting an IPC schema, the `byteWidth` of a `FixedSizeBinary` field 
is used as is. A negative width produces a `DataType::FixedSizeBinary` that the 
rest of the code assumes is valid, which can lead to panics later on.
   
   # What changes are included in this PR?
   
   `get_data_type` returns a `ParseError` when the byte width is negative. A 
width of 0 is still accepted.
   
   # Are these changes tested?
   
   Yes. `try_fb_to_schema_negative_fixed_size_binary_width_is_err` builds a 
schema with a `FixedSizeBinary` field of width -1 and checks that the 
conversion returns an error. It fails without the fix and passes with it.
   
   # Are there any significant user-facing changes?
   
   No.
   
   AI usage: this change was prepared with Claude Code (an AI coding agent). 
The fix and test were generated by it and checked against a failing test for 
the issue.
   


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

Reply via email to