Function arrow::compute::kernels::boolean::and_kleene [−][src]
pub fn and_kleene(
left: &BooleanArray,
right: &BooleanArray
) -> Result<BooleanArray>
Expand description
Logical ‘and’ boolean values with Kleene logic
Behavior
This function behaves as follows with nulls:
true
andnull
=null
null
andtrue
=null
false
andnull
=false
null
andfalse
=false
null
andnull
=null
In other words, in this context a null value really means "unknown", and an unknown value ‘and’ false is always false. For a different null behavior, see function "and".
Example
use arrow::array::BooleanArray; use arrow::error::Result; use arrow::compute::kernels::boolean::and_kleene; let a = BooleanArray::from(vec![Some(true), Some(false), None]); let b = BooleanArray::from(vec![None, None, None]); let and_ab = and_kleene(&a, &b)?; assert_eq!(and_ab, BooleanArray::from(vec![None, Some(false), None]));
Fails
If the operands have different lengths