Computes the union of the nulls in two optional [`NullBuffer`] This is commonly used by binary operations where the result is NULL if either of the input values is NULL. Handling the null mask separately in this way can yield significant performance improvements over an iterator approach
(lhs: Option<&NullBuffer>, rhs: Option<&NullBuffer>)
| 77 | /// of the input values is NULL. Handling the null mask separately in this way |
| 78 | /// can yield significant performance improvements over an iterator approach |
| 79 | pub fn union(lhs: Option<&NullBuffer>, rhs: Option<&NullBuffer>) -> Option<NullBuffer> { |
| 80 | match (lhs, rhs) { |
| 81 | (Some(lhs), Some(rhs)) => Some(Self::new(lhs.inner() & rhs.inner())), |
| 82 | (Some(n), None) | (None, Some(n)) => Some(n.clone()), |
| 83 | (None, None) => None, |
| 84 | } |
| 85 | } |
| 86 | |
| 87 | /// Computes the union of the nulls in multiple optional [`NullBuffer`]s |
| 88 | /// |
no test coverage detected