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

Method contains

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

Returns true if all nulls in `other` also exist in self

(&self, other: &NullBuffer)

Source from the content-addressed store, hash-verified

102
103 /// Returns true if all nulls in `other` also exist in self
104 pub fn contains(&self, other: &NullBuffer) -> bool {
105 if other.null_count == 0 {
106 return true;
107 }
108 let lhs = self.inner().bit_chunks().iter_padded();
109 let rhs = other.inner().bit_chunks().iter_padded();
110 lhs.zip(rhs).all(|(l, r)| (l & !r) == 0)
111 }
112
113 /// Returns a new [`NullBuffer`] where each bit in the current null buffer
114 /// is repeated `count` times. This is useful for masking the nulls of

Callers

nothing calls this directly

Calls 5

iter_paddedMethod · 0.80
allMethod · 0.80
zipMethod · 0.80
bit_chunksMethod · 0.45
innerMethod · 0.45

Tested by

no test coverage detected