tustvold commented on code in PR #3157:
URL: https://github.com/apache/arrow-rs/pull/3157#discussion_r1029120245


##########
arrow-data/src/transform/utils.rs:
##########
@@ -36,7 +36,7 @@ pub(super) fn extend_offsets<T: ArrowNativeType + Integer>(
     offsets.windows(2).for_each(|offsets| {
         // compute the new offset
         let length = offsets[1] - offsets[0];
-        last_offset = last_offset + length;
+        last_offset = last_offset.checked_add(&length).expect("offset 
overflow");

Review Comment:
   Extend is infallible, so we can't return an Error. We also fairly 
consistently panic on offset overflow in other kernels, and I wish to 
eventually remove MutableArrayData, and so I think this is fine for now



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