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

Function MayHaveLogicalNulls

cpp/src/arrow/array/data.h:431–446  ·  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

429 /// ...
430 /// }
431 bool MayHaveLogicalNulls() const {
432 if (buffers[0] != NULLPTR) {
433 return null_count.load() != 0;
434 }
435 const auto t = type->id();
436 if (t == Type::SPARSE_UNION || t == Type::DENSE_UNION) {
437 return internal::UnionMayHaveLogicalNulls(*this);
438 }
439 if (t == Type::RUN_END_ENCODED) {
440 return internal::RunEndEncodedMayHaveLogicalNulls(*this);
441 }
442 if (t == Type::DICTIONARY) {
443 return internal::DictionaryMayHaveLogicalNulls(*this);
444 }
445 return null_count.load() != 0;
446 }
447
448 /// \brief Compute the logical null count for arrays of all types
449 ///

Callers

nothing calls this directly

Calls 5

UnionMayHaveLogicalNullsFunction · 0.85
loadMethod · 0.45
idMethod · 0.45

Tested by

no test coverage detected