etseidl commented on PR #8603:
URL: https://github.com/apache/arrow-rs/pull/8603#issuecomment-3399967374

   Thanks for the submission @rambleraptor. If it's not too much to ask, could 
you also open an issue for this?
   
   The test you added actually errors correctly when your change is reverted. I 
believe the passed-in min/max needs to be > 12 to trigger the panic. Values 
with a length less than 12 are correctly caught by `check_len`.
   
   I'm not sure why only `INT96` performs a second test and expects an exact 
length, all other types seem to only require at least enough data is present. 
Whatever wrote the data causing your issue should also be examined to see why 
more than 12 bytes are used for what should be a fixed-length array of length 
12.
   
   I'd probably opt for simply getting rid of the asserts, but turning the 
asserts into tests as you have done is probably the safer way to go. I would, 
however, revert the change to `check_len` so the behavior for too little data 
remains the same.


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