fn binary_boolean_kernel<F>(lhs: &BooleanArray, rhs: &BooleanArray, op: F) -> Result<BooleanArray>
where
    F: Fn(&Bitmap, &Bitmap) -> Bitmap,
{
    if lhs.len() != rhs.len() {
        return Err(ArrowError::InvalidArgumentError(
            "Cannot perform bitwise operation on arrays of different length".to_string(),
        ));
    }

    let validity = combine_validities(lhs.validity(), rhs.validity());

    let left_buffer = lhs.values();
    let right_buffer = rhs.values();

    let values = op(&left_buffer, &right_buffer);

    Ok(BooleanArray::from_data(values, validity))
}
/// Helper function to implement binary kernels
Helper function to implement binary kernels
Helper function to implement binary kernels
fn binary_boolean_kernel<F>(lhs: &BooleanArray, rhs: &BooleanArray, op: F) -> Result<BooleanArray>
where
    F: Fn(&Bitmap, &Bitmap) -> Bitmap,
{
    if lhs.len() != rhs.len() {
        return Err(ArrowError::InvalidArgumentError(
            "Cannot perform bitwise operation on arrays of different length".to_string(),
        ));
    }
    let validity = combine_validities(lhs.validity(), rhs.validity());
    let left_buffer = lhs.values();
    let right_buffer = rhs.values();
    let values = op(&left_buffer, &right_buffer);
    Ok(BooleanArray::from_data(values, validity))
}
fn binary_boolean_kernel < F > ( lhs : & BooleanArray , rhs : & BooleanArray , op : F ) -> Result < BooleanArray > where F : Fn ( & Bitmap , & Bitmap ) -> Bitmap , { if lhs . len ( ) != rhs . len ( ) { return Err ( ArrowError :: InvalidArgumentError ( " " . to_string ( ) , ) ) ; } let validity = combine_validities ( lhs . validity ( ) , rhs . validity ( ) ) ; let left_buffer = lhs . values ( ) ; let right_buffer = rhs . values ( ) ; let values = op ( & left_buffer , & right_buffer ) ; Ok ( BooleanArray :: from_data ( values , validity ) ) }
Helper function to implement binary kernels
Helper function to implement binary kernels
lhs
&BooleanArray
rhs
&BooleanArray
op
F
lhs
&BooleanArray
rhs
&BooleanArray
op
F