Rich-T-kid commented on code in PR #11912:
URL: https://github.com/apache/arrow-rs/pull/11912#discussion_r4404552980
##########
arrow-data/src/transform/list_view.rs:
##########
@@ -29,6 +30,17 @@ pub(super) fn build_extend<T: ArrowNativeType + Integer +
CheckedAdd>(
let sizes = array.buffer::<T>(1);
Box::new(
move |mutable: &mut _MutableArrayData, index: usize, start: usize,
len: usize| {
+ let additional = len
+ .checked_mul(size_of::<T>())
+ .ok_or_else(|| ArrowError::MemoryError("list-view buffer size
overflow".into()))?;
+ mutable
+ .buffer1
+ .try_reserve(additional)
+ .map_err(|e| ArrowError::MemoryError(e.to_string()))?;
+ mutable
+ .buffer2
+ .try_reserve(additional)
+ .map_err(|e| ArrowError::MemoryError(e.to_string()))?;
Review Comment:
Moved the MutableArrayData and transform changes out of this PR. They are
now isolated in #11973.
--
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]