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

Method insert_intersection

datafusion/optimizer/src/join_key_set.rs:110–118  ·  view source on GitHub ↗

Inserts any join keys that are common to both `s1` and `s2` into self

(&mut self, s1: &JoinKeySet, s2: &JoinKeySet)

Source from the content-addressed store, hash-verified

108
109 /// Inserts any join keys that are common to both `s1` and `s2` into self
110 pub fn insert_intersection(&mut self, s1: &JoinKeySet, s2: &JoinKeySet) {
111 // note can't use inner.intersection as we need to consider both (l, r)
112 // and (r, l) in equality
113 for (left, right) in s1.inner.iter() {
114 if s2.contains(left, right) {
115 self.insert(left, right);
116 }
117 }
118 }
119
120 /// returns true if this set is empty
121 pub fn is_empty(&self) -> bool {

Callers 2

test_insert_intersectionFunction · 0.80

Calls 3

iterMethod · 0.45
containsMethod · 0.45
insertMethod · 0.45

Tested by 1

test_insert_intersectionFunction · 0.64