pub fn or(lhs: &BooleanArray, rhs: &BooleanArray) -> Result<BooleanArray>
Available on crate feature compute_boolean only.
Expand description

Performs OR 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

use arrow2::array::BooleanArray;
use arrow2::error::Result;
use arrow2::compute::boolean::or;
let a = BooleanArray::from(vec![Some(false), Some(true), None]);
let b = BooleanArray::from(vec![Some(true), Some(true), Some(false)]);
let or_ab = or(&a, &b)?;
assert_eq!(or_ab, BooleanArray::from(vec![Some(true), Some(true), None]));