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

Function MayHaveLogicalNulls

cpp/src/arrow/array/data.h:470–485  ·  view source on GitHub ↗

\brief Return true if the array may have logical nulls Unlike `MayHaveNulls`, this method checks for null child values for types without a validity bitmap, such as unions and run-end encoded types, and for null dictionary values for dictionary types. This implies that `MayHaveLogicalNulls` may return true for arrays that don't have a top-level validity bitmap. It is therefore necessary to call `

Source from the content-addressed store, hash-verified

468 /// ...
469 /// }
470 bool MayHaveLogicalNulls() const {
471 if (buffers[0] != NULLPTR) {
472 return null_count.load() != 0;
473 }
474 const auto t = type->id();
475 if (t == Type::SPARSE_UNION || t == Type::DENSE_UNION) {
476 return internal::UnionMayHaveLogicalNulls(*this);
477 }
478 if (t == Type::RUN_END_ENCODED) {
479 return internal::RunEndEncodedMayHaveLogicalNulls(*this);
480 }
481 if (t == Type::DICTIONARY) {
482 return internal::DictionaryMayHaveLogicalNulls(*this);
483 }
484 return null_count.load() != 0;
485 }
486
487 /// \brief Compute the logical null count for arrays of all types
488 ///

Callers

nothing calls this directly

Calls 5

UnionMayHaveLogicalNullsFunction · 0.85
loadMethod · 0.45
idMethod · 0.45

Tested by

no test coverage detected