MCPcopy Create free account
hub / github.com/apache/arrow-rs / union_many

Method union_many

arrow-buffer/src/buffer/null.rs:90–101  ·  view source on GitHub ↗

Computes the union of the nulls in multiple optional [`NullBuffer`]s See [`union`](Self::union)

(
        nulls: impl IntoIterator<Item = Option<&'a NullBuffer>>,
    )

Source from the content-addressed store, hash-verified

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 {

Callers

nothing calls this directly

Calls 3

into_iterMethod · 0.45
nextMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected