Anakin100100 opened a new pull request, #49375: URL: https://github.com/apache/arrow/pull/49375
### Rationale for this change Fixing #49310 ### What changes are included in this PR? I added a check for the if else compute kernels that verify that the result will fit in the offset of the result. The check asserts that no matter which values are chosen from either the left or right arrays/scalars there will be no overflow in order to use the UnsafeAppend which skips almost all safety checks. ### Are these changes tested? Yes, There are tests for each of the kernels that include an array that the values that would overflow the 32 bit index trigger the check. These tests don't actually allocate the data to save on time and compute. There are also two tests that verify an overflow for a 32 bit offset type and trigger an error and the second one that ensures that for a data type with a 64 bit offset there is no overflow error. ### Are there any user-facing changes? Yes, if the result may not fit in a type that relies on 32 bit offsets the user will receive a helpful error message instead of a segfault. -- 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]
