Function arrow::compute::kernels::cmp::distinct

source ·
pub fn distinct(
    lhs: &dyn Datum,
    rhs: &dyn Datum,
) -> Result<BooleanArray, ArrowError>
Expand description

Perform left IS DISTINCT FROM right operation on two Datum

distinct is similar to neq, only differing in null handling. In particular, two operands are considered DISTINCT if they have a different value or if one of them is NULL and the other isn’t. The result of distinct is never NULL.

For floating values like f32 and f64, this comparison produces an ordering in accordance to the totalOrder predicate as defined in the IEEE 754 (2008 revision) floating point standard. Note that totalOrder treats positive and negative zeros as different. If it is necessary to treat them as equal, please normalize zeros before calling this kernel. See f32::total_cmp and f64::total_cmp.

Nested types, such as lists, are not supported as the null semantics are not well-defined. For comparisons involving nested types see crate::ord::make_comparator