fn take_primitive<T, I>(
values: &PrimitiveArray<T>,
indices: &PrimitiveArray<I>,
) -> Result<PrimitiveArray<T>, ArrowError>where
T: ArrowPrimitiveType,
I: ArrowPrimitiveType,
Expand description
take
implementation for all primitive arrays
This checks if an indices
slot is populated, and gets the value from values
as the populated index.
If the indices
slot is null, a null value is returned.
For example, given:
values: [1, 2, 3, null, 5]
indices: [0, null, 4, 3]
The result is: [1 (slot 0), null (null slot), 5 (slot 4), null (slot 3)]