pub fn offset_span<O: ArrowNativeType>(
offsets: &OffsetBuffer<O>,
) -> (usize, usize)Expand description
Returns the start and length of the values covered by an offset buffer.
The returned pair can be passed to Array::slice to select the visible
child values of a sliced list or map. For strings/binary arrays, the start
and length are measured in bytes. Values in null rows are included.
An empty array has a length of zero but may have a nonzero start.
let offsets = OffsetBuffer::new(vec![100_i32, 103, 108].into());
assert_eq!(offset_span(&offsets), (100, 8));