/// Take kernel for single chunk and an iterator as index.
/// # Safety
/// - no bounds checks
/// - iterator must be TrustedLen
Take kernel for single chunk and an iterator as index.
Take kernel for single chunk and an iterator as index .
pub(crate) unsafe fn take_bool_iter_unchecked<I: IntoIterator<Item = usize>>(
    arr: &BooleanArray,
    indices: I,
) -> Arc<BooleanArray> {
    let validity = arr.validity().as_ref().expect("should have nulls");
    let iter = indices.into_iter().map(|idx| {
        if validity.get_bit_unchecked(idx) {
            Some(arr.value_unchecked(idx))
        } else {
            None
        }
    });
    Arc::new(BooleanArray::from_trusted_len_iter_unchecked(iter))
}
pub ( crate ) unsafe fn take_bool_iter_unchecked < I : IntoIterator < Item = usize > > ( arr : & BooleanArray , indices : I , ) -> Arc < BooleanArray > { let validity = arr . validity ( ) . as_ref ( ) . expect ( " " ) ; let iter = indices . into_iter ( ) . map ( | idx | { if validity . get_bit_unchecked ( idx ) { Some ( arr . value_unchecked ( idx ) ) } else { None } } ) ; Arc :: new ( BooleanArray :: from_trusted_len_iter_unchecked ( iter ) ) }
Take kernel for single chunk and an iterator as index.
Take kernel for single chunk and an iterator as index .
arr
&BooleanArray
indices
I
safety
no bounds checks
iterator must be TrustedLen
no bounds checks iterator must be TrustedLen