MCPcopy Create free account
hub / github.com/apache/datafusion / not

Method not

datafusion/expr-common/src/interval_arithmetic.rs:631–644  ·  view source on GitHub ↗

Compute the logical negation of this (boolean) interval.

(&self)

Source from the content-addressed store, hash-verified

629
630 /// Compute the logical negation of this (boolean) interval.
631 pub fn not(&self) -> Result<Self> {
632 assert_eq_or_internal_err!(
633 self.data_type(),
634 DataType::Boolean,
635 "Cannot apply logical negation to a non-boolean interval"
636 );
637 if self == &Self::TRUE {
638 Ok(Self::FALSE)
639 } else if self == &Self::FALSE {
640 Ok(Self::TRUE)
641 } else {
642 Ok(Self::TRUE_OR_FALSE)
643 }
644 }
645
646 /// Compute the intersection of this interval with the given interval.
647 /// If the intersection is empty, return `None`.

Callers 15

evaluate_boundsMethod · 0.45
propagate_constraintsMethod · 0.45
apply_operatorFunction · 0.45
apply_operatorMethod · 0.45
test_create_notFunction · 0.45
row_group_predicate_notFunction · 0.45
prune_bool_not_columnFunction · 0.45
simplify_not_binaryFunction · 0.45

Calls

no outgoing calls

Tested by 15

test_create_notFunction · 0.36
row_group_predicate_notFunction · 0.36
prune_bool_not_columnFunction · 0.36
simplify_not_binaryFunction · 0.36
simplify_not_bool_andFunction · 0.36
simplify_not_bool_orFunction · 0.36
simplify_not_notFunction · 0.36
simplify_not_nullFunction · 0.36