arrow_select::take

Function take_value_indices_from_list

Source
fn take_value_indices_from_list<IndexType, OffsetType>(
    list: &GenericListArray<OffsetType::Native>,
    indices: &PrimitiveArray<IndexType>,
) -> Result<(PrimitiveArray<OffsetType>, Vec<OffsetType::Native>, MutableBuffer), ArrowError>
where IndexType: ArrowPrimitiveType, OffsetType: ArrowPrimitiveType, OffsetType::Native: OffsetSizeTrait + Add + Zero + One, PrimitiveArray<OffsetType>: From<Vec<OffsetType::Native>>,
Expand description

Takes/filters a list array’s inner data using the offsets of the list array.

Where a list array has indices [0,2,5,10], taking indices of [2,0] returns an array of the indices [5..10, 0..2] and offsets [0,5,7] (5 elements and 2 elements)