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

Function count_nulls

arrow-data/src/data.rs:51–62  ·  view source on GitHub ↗
(
    null_bit_buffer: Option<&NullBuffer>,
    offset: usize,
    len: usize,
)

Source from the content-addressed store, hash-verified

49
50#[inline]
51pub(crate) fn count_nulls(
52 null_bit_buffer: Option<&NullBuffer>,
53 offset: usize,
54 len: usize,
55) -> usize {
56 if let Some(buf) = null_bit_buffer {
57 let buffer = buf.buffer();
58 len - buffer.count_set_bits_offset(offset + buf.offset(), len)
59 } else {
60 0
61 }
62}
63
64/// creates 2 [`MutableBuffer`]s with a given `capacity` (in slots).
65#[inline]

Callers 3

test_count_nullsFunction · 0.85
list_view_equalFunction · 0.85
list_equalFunction · 0.85

Calls 3

count_set_bits_offsetMethod · 0.80
bufferMethod · 0.45
offsetMethod · 0.45

Tested by 1

test_count_nullsFunction · 0.68