pub fn take_no_validity<O: Offset, I: Index>(
    offsets: &[O],
    values: &[u8],
    indices: &[I],
) -> (Buffer<O>, Buffer<u8>, Option<Bitmap>) {
    let mut length = O::default();
    let mut buffer = MutableBuffer::<u8>::new();
    let offsets = indices.iter().map(|index| {
        let index = index.to_usize();
        let start = offsets[index];
        let length_h = offsets[index + 1] - start;
        length += length_h;

        let _start = start.to_usize();
        let end = (start + length_h).to_usize();
        buffer.extend_from_slice(&values[_start..end]);
        length
    });
    let offsets = std::iter::once(O::default()).chain(offsets);
    let offsets = Buffer::from_trusted_len_iter(offsets);

    (offsets, buffer.into(), None)
}
// take implementation when neither values nor indices contain nulls
take implementation when neither values nor indices contain nulls
take implementation when neither values nor indices contain nulls
pub fn take_no_validity<O: Offset, I: Index>(
    offsets: &[O],
    values: &[u8],
    indices: &[I],
) -> (Buffer<O>, Buffer<u8>, Option<Bitmap>) {
    let mut length = O::default();
    let mut buffer = MutableBuffer::<u8>::new();
    let offsets = indices.iter().map(|index| {
        let index = index.to_usize();
        let start = offsets[index];
        let length_h = offsets[index + 1] - start;
        length += length_h;
        let _start = start.to_usize();
        let end = (start + length_h).to_usize();
        buffer.extend_from_slice(&values[_start..end]);
        length
    });
    let offsets = std::iter::once(O::default()).chain(offsets);
    let offsets = Buffer::from_trusted_len_iter(offsets);
    (offsets, buffer.into(), None)
}
pub fn take_no_validity < O : Offset , I : Index > ( offsets : & [ O ] , values : & [ u8 ] , indices : & [ I ] , ) -> ( Buffer < O > , Buffer < u8 > , Option < Bitmap > ) { let mut length = O :: default ( ) ; let mut buffer = MutableBuffer :: < u8 > :: new ( ) ; let offsets = indices . iter ( ) . map ( | index | { let index = index . to_usize ( ) ; let start = offsets [ index ] ; let length_h = offsets [ index + 1 ] - start ; length += length_h ; let _start = start . to_usize ( ) ; let end = ( start + length_h ) . to_usize ( ) ; buffer . extend_from_slice ( & values [ _start .. end ] ) ; length } ) ; let offsets = std :: iter :: once ( O :: default ( ) ) . chain ( offsets ) ; let offsets = Buffer :: from_trusted_len_iter ( offsets ) ; ( offsets , buffer . into ( ) , None ) }
take implementation when neither values nor indices contain nulls
take implementation when neither values nor indices contain nulls
offsets
&[O]
values
&[u8]
indices
&[I]
offsets
&[O]
values
&[u8]
indices
&[I]