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

Method new

datafusion/physical-expr/src/utils/guarantee.rs:97–109  ·  view source on GitHub ↗

ScalarValue has interior mutability but is intentionally used as hash key

(
        column_name: impl Into<String>,
        guarantee: Guarantee,
        literals: impl IntoIterator<Item = &'a ScalarValue>,
    )

Source from the content-addressed store, hash-verified

95 /// create these structures from an predicate (boolean expression).
96 #[allow(clippy::allow_attributes, clippy::mutable_key_type)] // ScalarValue has interior mutability but is intentionally used as hash key
97 fn new<'a>(
98 column_name: impl Into<String>,
99 guarantee: Guarantee,
100 literals: impl IntoIterator<Item = &'a ScalarValue>,
101 ) -> Self {
102 let literals: HashSet<_> = literals.into_iter().cloned().collect();
103
104 Self {
105 column: Column::from_name(column_name),
106 guarantee,
107 literals,
108 }
109 }
110
111 /// Return a list of [`LiteralGuarantee`]s that must be satisfied for `expr`
112 /// to evaluate to `true`.

Callers

nothing calls this directly

Calls 3

collectMethod · 0.80
clonedMethod · 0.45
into_iterMethod · 0.45

Tested by

no test coverage detected