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

Method with_contained

datafusion/pruning/src/pruning_predicate.rs:2249–2260  ·  view source on GitHub ↗

ScalarValue has interior mutability but is intentionally used as hash key

(
            mut self,
            values: impl IntoIterator<Item = ScalarValue>,
            contained: impl IntoIterator<Item = Option<bool>>,
        )

Source from the content-addressed store, hash-verified

2247 /// Add contained information.
2248 #[allow(clippy::allow_attributes, clippy::mutable_key_type)] // ScalarValue has interior mutability but is intentionally used as hash key
2249 pub fn with_contained(
2250 mut self,
2251 values: impl IntoIterator<Item = ScalarValue>,
2252 contained: impl IntoIterator<Item = Option<bool>>,
2253 ) -> Self {
2254 let contained: BooleanArray = contained.into_iter().collect();
2255 let values: HashSet<_> = values.into_iter().collect();
2256
2257 self.contained.push((values, contained));
2258 self.assert_invariants();
2259 self
2260 }
2261
2262 /// get any contained information for the specified values
2263 #[allow(clippy::allow_attributes, clippy::mutable_key_type)] // ScalarValue has interior mutability but is intentionally used as hash key

Calls 7

collectMethod · 0.80
assert_invariantsMethod · 0.80
into_iterMethod · 0.45
pushMethod · 0.45
intoMethod · 0.45
removeMethod · 0.45
insertMethod · 0.45