pub(crate) unsafe fn take_no_null_primitive<T: PolarsPrimitiveType>(
    arr: &PrimitiveArray<T::Native>,
    indices: &UInt32Array,
) -> Arc<PrimitiveArray<T::Native>> {
    assert_eq!(arr.null_count(), 0);

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

    let iter = index_values
        .iter()
        .map(|idx| *array_values.get_unchecked(*idx as usize));

    let values = Buffer::from_trusted_len_iter(iter);
    let validity = indices.validity().clone();
    Arc::new(PrimitiveArray::from_data(
        T::get_dtype().to_arrow(),
        values,
        validity,
    ))
}
/// Take kernel for single chunk without nulls and arrow array as index.
Take kernel for single chunk without nulls and arrow array as index.
Take kernel for single chunk without nulls and arrow array as index .
pub(crate) unsafe fn take_no_null_primitive<T: PolarsPrimitiveType>(
    arr: &PrimitiveArray<T::Native>,
    indices: &UInt32Array,
) -> Arc<PrimitiveArray<T::Native>> {
    assert_eq!(arr.null_count(), 0);
    let array_values = arr.values().as_slice();
    let index_values = indices.values().as_slice();
    let iter = index_values
        .iter()
        .map(|idx| *array_values.get_unchecked(*idx as usize));
    let values = Buffer::from_trusted_len_iter(iter);
    let validity = indices.validity().clone();
    Arc::new(PrimitiveArray::from_data(
        T::get_dtype().to_arrow(),
        values,
        validity,
    ))
}
pub ( crate ) unsafe fn take_no_null_primitive < T : PolarsPrimitiveType > ( arr : & PrimitiveArray < T :: Native > , indices : & UInt32Array , ) -> Arc < PrimitiveArray < T :: Native > > { assert_eq ! ( arr null_count ( ) 0 ) ; let array_values = arr . values ( ) . as_slice ( ) ; let index_values = indices . values ( ) . as_slice ( ) ; let iter = index_values . iter ( ) . map ( | idx | * array_values . get_unchecked ( * idx as usize ) ) ; let values = Buffer :: from_trusted_len_iter ( iter ) ; let validity = indices . validity ( ) . clone ( ) ; Arc :: new ( PrimitiveArray :: from_data ( T :: get_dtype ( ) . to_arrow ( ) , values , validity , ) ) }
Take kernel for single chunk without nulls and arrow array as index.
Take kernel for single chunk without nulls and arrow array as index .
arr
&PrimitiveArray<T::Native>
indices
&UInt32Array
arr
&PrimitiveArray<T::Native>
indices
&UInt32Array