pub fn take_primitive_iter<T: DFNumericType, I: IntoIterator<Item = usize>>(
    arr: &PrimitiveArray<T>,
    indices: I,
) -> Arc<PrimitiveArray<T>> {
    let array_values = arr.values();

    let arr = indices
        .into_iter()
        .map(|idx| {
            if arr.is_valid(idx) {
                Some(array_values[idx])
            } else {
                None
            }
        })
        .collect();

    Arc::new(arr)
}
/// Take kernel for a single chunk with null values and an iterator as index that does bound checks.
Take kernel for a single chunk with null values and an iterator as index that does bound checks.
Take kernel for a single chunk with null values and an iterator as index that does bound checks .
pub fn take_primitive_iter<T: DFNumericType, I: IntoIterator<Item = usize>>(
    arr: &PrimitiveArray<T>,
    indices: I,
) -> Arc<PrimitiveArray<T>> {
    let array_values = arr.values();
    let arr = indices
        .into_iter()
        .map(|idx| {
            if arr.is_valid(idx) {
                Some(array_values[idx])
            } else {
                None
            }
        })
        .collect();
    Arc::new(arr)
}
pub fn take_primitive_iter < T : DFNumericType , I : IntoIterator < Item = usize > > ( arr : & PrimitiveArray < T > , indices : I , ) -> Arc < PrimitiveArray < T > > { let array_values = arr . values ( ) ; let arr = indices . into_iter ( ) . map ( | idx | { if arr . is_valid ( idx ) { Some ( array_values [ idx ] ) } else { None } } ) . collect ( ) ; Arc :: new ( arr ) }
Take kernel for a single chunk with null values and an iterator as index that does bound checks.
Take kernel for a single chunk with null values and an iterator as index that does bound checks .
arr
&PrimitiveArray<T>
indices
I
arr
&PrimitiveArray<T>
indices
I