Jefffrey commented on code in PR #11756:
URL: https://github.com/apache/arrow-rs/pull/11756#discussion_r4336205876
##########
arrow-data/src/transform/fixed_size_list.rs:
##########
@@ -25,13 +25,23 @@ pub(super) fn build_extend(array: &ArrayData) -> Extend<'_>
{
DataType::FixedSizeList(_, i) => *i as usize,
_ => unreachable!(),
};
+ let offset = array.offset();
Box::new(
move |mutable: &mut _MutableArrayData, index: usize, start: usize,
len: usize| {
- mutable
- .child_data
- .iter_mut()
- .for_each(|child| child.extend(index, start * size, (start +
len) * size))
+ let start = start
+ .checked_add(offset)
+ .expect("fixed size list range overflows usize");
Review Comment:
altered from cherry pick because we need
https://github.com/apache/arrow-rs/pull/9710 for it to be fallible; for now
just panic, dont think want to pull in whole other PR for this edge case
--
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]