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

Method is_true_false_unknown

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

Returns a tuple of booleans indicating if this interval contains the true, false, and unknown truth values respectively.

(&self)

Source from the content-addressed store, hash-verified

1927 /// Returns a tuple of booleans indicating if this interval contains the
1928 /// true, false, and unknown truth values respectively.
1929 fn is_true_false_unknown(&self) -> Result<(bool, bool, bool), DataFusionError> {
1930 Ok(match self {
1931 NullableInterval::Null { .. } => (false, false, true),
1932 NullableInterval::MaybeNull { values } => (
1933 values.contains_value(ScalarValue::Boolean(Some(true)))?,
1934 values.contains_value(ScalarValue::Boolean(Some(false)))?,
1935 true,
1936 ),
1937 NullableInterval::NotNull { values } => (
1938 values.contains_value(ScalarValue::Boolean(Some(true)))?,
1939 values.contains_value(ScalarValue::Boolean(Some(false)))?,
1940 false,
1941 ),
1942 })
1943 }
1944
1945 /// Returns an interval representing the set of possible values after applying
1946 /// SQL three-valued logical NOT on possible value in this interval.

Callers 3

is_trueMethod · 0.80
is_falseMethod · 0.80
is_unknownMethod · 0.80

Calls 1

contains_valueMethod · 0.80

Tested by

no test coverage detected