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

Method is_superset

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

Decide if this interval is a superset of `other`. If argument `strict` is `true`, only returns `true` if this interval is a strict superset. NOTE: This function only works with intervals of the same data type. Attempting to compare intervals of different data types will lead to an error.

(&self, other: &Interval, strict: bool)

Source from the content-addressed store, hash-verified

768 /// Attempting to compare intervals of different data types will lead
769 /// to an error.
770 pub fn is_superset(&self, other: &Interval, strict: bool) -> Result<bool> {
771 Ok(!(strict && self.eq(other)) && (self.contains(other)? == Interval::TRUE))
772 }
773
774 /// Add the given interval (`other`) to this interval. Say we have intervals
775 /// `[a1, b1]` and `[a2, b2]`, then their sum is `[a1 + a2, b1 + b2]`. Note

Callers 1

test_is_supersetFunction · 0.80

Calls 2

eqMethod · 0.45
containsMethod · 0.45

Tested by 1

test_is_supersetFunction · 0.64