hcrosse opened a new pull request, #1732:
URL: https://github.com/apache/arrow-go/pull/1732

   ### Rationale for this change
   
   Follow-up to #1619. On 32-bit architectures, `Struct.Validate` adds offset 
and length in 64-bit integers, so a struct array whose offset and length 
overflow `int` passes validation when it has no children or fails with a 
short-child error instead of an overflow error. In addition, the 32-bit CI job 
only ran a single validation test in `arrow/array` because two time tests 
overflowed `int` constants and a scalar conversion test assumed 64-bit integer 
formatting.
   
   ### What changes are included in this PR?
   
   - Reject negative offsets, negative lengths, and `int` offset plus length 
overflow explicitly in `Struct.Validate` before checking children.
   - Widen the time constants in the `arrow/array` and `arrow/scalar` tests to 
`int64`, and format the expected integer scalar strings using the platform 
integer width.
   - Run `./arrow/array/...` and `./arrow/scalar/...` in the `386` test 
workflow instead of a single validation test.
   
   ### Are these changes tested?
   
   Yes. I added struct validation tests for offset plus length overflow with 
and without children, and ran the array and scalar test suites on `linux/386` 
as well as with the race detector on 64-bit.
   
   ### Are there any user-facing changes?
   
   `Struct.Validate` and `Struct.ValidateFull` now return an invalid overflow 
error on 32-bit platforms when a struct array's offset and length exceed 
`math.MaxInt`.
   


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