viirya commented on code in PR #5395:
URL: https://github.com/apache/arrow-rs/pull/5395#discussion_r1487323110
##########
arrow-select/src/take.rs:
##########
@@ -420,7 +420,11 @@ fn take_bytes<T: ByteArrayType, IndexType:
ArrowPrimitiveType>(
nulls = Some(null_buf.into())
}
- T::Offset::from_usize(values.len()).expect("offset overflow");
+ T::Offset::from_usize(values.len()).ok_or(ArrowError::ComputeError(format!(
+ "Offset overflow for {}BinaryArray: {}",
+ T::Offset::PREFIX,
+ values.len()
+ )))?;
Review Comment:
Also take the chance to improve the message.
--
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]