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

   ### Which issue does this PR close?
   
   - Closes #11317.
   
   ### Rationale for this change
   
   the two element lengths are u32 and were added as u32, so a pair that sums 
past u32::MAX wrapped before the size check could see it. the check passed on 
the wrapped number and the result came back with an empty value where the data 
belongs.
   
   ### What changes are included in this PR?
   
   the addition is done in usize. nothing else moves, the existing i32::MAX 
check now sees the real total and rejects it.
   
   ### Are these changes tested?
   
   yes, two 2 GiB elements concatenated. the test is ignored by default since 
it wants around 8 GiB, run it with cargo test --release -p arrow-string -- 
--ignored. without the fix it returns Ok with an empty element, with the fix it 
returns the overflow error.
   
   ### Are there any user-facing changes?
   
   concat of view elements that together pass u32::MAX returns an error now 
instead of wrong data.
   


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