Inserts any join keys that are common to both `s1` and `s2` into self
(&mut self, s1: &JoinKeySet, s2: &JoinKeySet)
| 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 { |