MCPcopy Create free account
hub / github.com/apache/arrow-rs / and

Function and

arrow-arith/src/boolean.rs:256–258  ·  view source on GitHub ↗

Performs `AND` 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 ```rust # use arrow_array::BooleanArray; # use arrow_arith::boolean::and; let a = BooleanArray::from(vec![Some(false), Some(true), None]); let b = BooleanArray::from(vec![Some(true), Some(true), Some(false)]); let

(left: &BooleanArray, right: &BooleanArray)

Source from the content-addressed store, hash-verified

254/// assert_eq!(and_ab, BooleanArray::from(vec![Some(false), Some(true), None]));
255/// ```
256pub fn and(left: &BooleanArray, right: &BooleanArray) -> Result<BooleanArray, ArrowError> {
257 binary_boolean_kernel(left, right, |a, b| a & b)
258}
259
260/// Performs `OR` operation on two arrays. If either left or right value is null then the
261/// result is also null.

Callers 13

bench_andFunction · 0.85
buildMethod · 0.85
buildMethod · 0.85
filter_batchMethod · 0.85
filter_b_575_625Function · 0.85
test_bool_array_andFunction · 0.85

Calls 1

binary_boolean_kernelFunction · 0.85