MCPcopy Create free account
hub / github.com/apache/arrow / LogicalNullCount

Function LogicalNullCount

cpp/src/arrow/util/ree_util.cc:32–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30
31template <typename RunEndCType>
32int64_t LogicalNullCount(const ArraySpan& span) {
33 const auto& values = ValuesArray(span);
34 const auto& values_bitmap = values.buffers[0].data;
35 int64_t null_count = 0;
36
37 RunEndEncodedArraySpan<RunEndCType> ree_span(span);
38 auto end = ree_span.end();
39 for (auto it = ree_span.begin(); it != end; ++it) {
40 const bool is_null =
41 values_bitmap &&
42 !bit_util::GetBit(values_bitmap, values.offset + it.index_into_array());
43 if (is_null) {
44 null_count += it.run_length();
45 }
46 }
47 return null_count;
48}
49
50} // namespace
51

Callers 1

Calls 6

GetBitFunction · 0.70
endMethod · 0.45
beginMethod · 0.45
index_into_arrayMethod · 0.45
run_lengthMethod · 0.45
idMethod · 0.45

Tested by

no test coverage detected