Computes the union of the nulls in multiple optional [`NullBuffer`]s See [`union`](Self::union)
(
nulls: impl IntoIterator<Item = Option<&'a NullBuffer>>,
)
| 88 | /// |
| 89 | /// See [`union`](Self::union) |
| 90 | pub fn union_many<'a>( |
| 91 | nulls: impl IntoIterator<Item = Option<&'a NullBuffer>>, |
| 92 | ) -> Option<NullBuffer> { |
| 93 | // Unwrap to BooleanBuffer because BitAndAssign is not implemented for NullBuffer |
| 94 | let mut buffers = nulls.into_iter().filter_map(|nb| nb.map(NullBuffer::inner)); |
| 95 | let first = buffers.next()?; |
| 96 | let mut result = first.clone(); |
| 97 | for buf in buffers { |
| 98 | result &= buf; |
| 99 | } |
| 100 | Some(Self::new(result)) |
| 101 | } |
| 102 | |
| 103 | /// Returns true if all nulls in `other` also exist in self |
| 104 | pub fn contains(&self, other: &NullBuffer) -> bool { |