nevi-me commented on a change in pull request #9093:
URL: https://github.com/apache/arrow/pull/9093#discussion_r551913784
##########
File path: rust/arrow/src/array/equal/list.rs
##########
@@ -71,45 +79,94 @@ fn offset_value_equal<T: OffsetSizeTrait>(
pub(super) fn list_equal<T: OffsetSizeTrait>(
lhs: &ArrayData,
rhs: &ArrayData,
+ lhs_nulls: Option<&Buffer>,
+ rhs_nulls: Option<&Buffer>,
lhs_start: usize,
rhs_start: usize,
len: usize,
) -> bool {
let lhs_offsets = lhs.buffer::<T>(0);
let rhs_offsets = rhs.buffer::<T>(0);
+ // There is an edge-case where a n-length list that has 0 children,
results in panics.
+ // For example; an array with offsets [0, 0, 0, 0, 0] has 4 slots, but
will have
Review comment:
Ah yes, that's the offsets for the 4 slots. A list's offsets are always
list_length + 1, as they point to the range of values. [0, 2, 3] has 2 slots,
with slot 1 being `[1, 2]`, and slot 2 being `[3]`.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]