pub(crate) unsafe fn take_agg_no_null_primitive_iter_unchecked<
    T: NativeType,
    I: IntoIterator<Item = usize>,
    F: Fn(T, T) -> T,
>(
    arr: &PrimitiveArray<T>,
    indices: I,
    f: F,
    init: T,
) -> T {
    debug_assert_eq!(arr.null_count(), 0);

    let array_values = arr.values().as_slice();

    indices
        .into_iter()
        .fold(init, |acc, idx| f(acc, *array_values.get_unchecked(idx)))
}
/// Take kernel for single chunk without nulls and an iterator as index.
Take kernel for single chunk without nulls and an iterator as index.
Take kernel for single chunk without nulls and an iterator as index .
pub(crate) unsafe fn take_agg_no_null_primitive_iter_unchecked<
    T: NativeType,
    I: IntoIterator<Item = usize>,
    F: Fn(T, T) -> T,
>(
    arr: &PrimitiveArray<T>,
    indices: I,
    f: F,
    init: T,
) -> T {
    debug_assert_eq!(arr.null_count(), 0);
    let array_values = arr.values().as_slice();
    indices
        .into_iter()
        .fold(init, |acc, idx| f(acc, *array_values.get_unchecked(idx)))
}
pub ( crate ) unsafe fn take_agg_no_null_primitive_iter_unchecked < T : NativeType , I : IntoIterator < Item = usize > , F : Fn ( T , T ) -> T , > ( arr : & PrimitiveArray < T > , indices : I , f : F , init : T , ) -> T { debug_assert_eq ! ( arr null_count ( ) 0 ) ; let array_values = arr . values ( ) . as_slice ( ) ; indices . into_iter ( ) . fold ( init , | acc , idx | f ( acc , * array_values . get_unchecked ( idx ) ) ) }
Take kernel for single chunk without nulls and an iterator as index.
Take kernel for single chunk without nulls and an iterator as index .
arr
&PrimitiveArray<T>
indices
I
f
F
init
T
arr
&PrimitiveArray<T>
indices
I
f
F
init
T