/// `take` implementation for utf8 arrays
`take` implementation for utf8 arrays
` take ` implementation for utf8 arrays
pub fn take<O: Offset, I: Index>(
    values: &Utf8Array<O>,
    indices: &PrimitiveArray<I>,
) -> Utf8Array<O> {
    let data_type = values.data_type().clone();
    let indices_has_validity = indices.null_count() > 0;
    let values_has_validity = values.null_count() > 0;
    let (offsets, values, validity) = match (values_has_validity, indices_has_validity) {
        (false, false) => {
            take_no_validity::<O, I>(values.offsets(), values.values(), indices.values())
        }
        (true, false) => take_values_validity(values, indices.values()),
        (false, true) => take_indices_validity(values.offsets(), values.values(), indices),
        (true, true) => take_values_indices_validity(values, indices),
    };
    unsafe { Utf8Array::<O>::from_data_unchecked(data_type, offsets, values, validity) }
}
pub fn take < O : Offset , I : Index > ( values : & Utf8Array < O > , indices : & PrimitiveArray < I > , ) -> Utf8Array < O > { let data_type = values . data_type ( ) . clone ( ) ; let indices_has_validity = indices . null_count ( ) > 0 ; let values_has_validity = values . null_count ( ) > 0 ; let ( offsets , values , validity ) = match ( values_has_validity , indices_has_validity ) { ( false , false ) => { take_no_validity :: < O , I > ( values . offsets ( ) , values . values ( ) , indices . values ( ) ) } ( true , false ) => take_values_validity ( values , indices . values ( ) ) , ( false , true ) => take_indices_validity ( values . offsets ( ) , values . values ( ) , indices ) , ( true , true ) => take_values_indices_validity ( values , indices ) , } ; unsafe { Utf8Array :: < O > :: from_data_unchecked ( data_type , offsets , values , validity ) } }
`take` implementation for utf8 arrays
` take ` implementation for utf8 arrays
values
&Utf8Array<O>
indices
&PrimitiveArray<I>