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

Function contains_nulls

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

Source from the content-addressed store, hash-verified

32
33#[inline]
34pub(crate) fn contains_nulls(
35 null_bit_buffer: Option<&NullBuffer>,
36 offset: usize,
37 len: usize,
38) -> bool {
39 match null_bit_buffer {
40 Some(buffer) => {
41 match BitSliceIterator::new(buffer.validity(), buffer.offset() + offset, len).next() {
42 Some((start, end)) => start != 0 || end != len,
43 None => len != 0, // No non-null values
44 }
45 }
46 None => false, // No null buffer
47 }
48}
49
50#[inline]
51pub(crate) fn count_nulls(

Callers 8

variable_sized_equalFunction · 0.85
equal_nullsFunction · 0.85
fixed_binary_equalFunction · 0.85
primitive_equalFunction · 0.85
boolean_equalFunction · 0.85
fixed_list_equalFunction · 0.85
dictionary_equalFunction · 0.85
struct_equalFunction · 0.85

Calls 3

validityMethod · 0.80
nextMethod · 0.45
offsetMethod · 0.45

Tested by

no test coverage detected