Function arrow::compute::and_not

pub fn and_not(
    left: &BooleanArray,
    right: &BooleanArray
) -> Result<BooleanArray, ArrowError>
Expand description

Performs AND_NOT operation on two arrays. If either left or right value is null then the result is also null.

§Error

This function errors when the arrays have different lengths.

§Example

let a = BooleanArray::from(vec![Some(false), Some(true), None]);
let b = BooleanArray::from(vec![Some(true), Some(true), Some(false)]);
let andn_ab = and_not(&a, &b).unwrap();
assert_eq!(andn_ab, BooleanArray::from(vec![Some(false), Some(false), None]));
// It's equal to and(left, not(right))
assert_eq!(andn_ab, and(&a, &not(&b).unwrap()).unwrap());