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

Function ComputeNullBitmap

cpp/src/arrow/util/hashing.h:952–969  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

950
951template <typename MemoTableType>
952static inline Status ComputeNullBitmap(MemoryPool* pool, const MemoTableType& memo_table,
953 int64_t start_offset, int64_t* null_count,
954 std::shared_ptr<Buffer>* null_bitmap) {
955 int64_t dict_length = static_cast<int64_t>(memo_table.size()) - start_offset;
956 int64_t null_index = memo_table.GetNull();
957
958 *null_count = 0;
959 *null_bitmap = nullptr;
960
961 if (null_index != kKeyNotFound && null_index >= start_offset) {
962 null_index -= start_offset;
963 *null_count = 1;
964 ARROW_ASSIGN_OR_RAISE(*null_bitmap,
965 internal::BitmapAllButOne(pool, dict_length, null_index));
966 }
967
968 return Status::OK();
969}
970
971struct StringViewHash {
972 // std::hash compatible hasher for use with std::unordered_*

Callers 3

Calls 5

BitmapAllButOneFunction · 0.85
ARROW_ASSIGN_OR_RAISEFunction · 0.50
OKFunction · 0.50
sizeMethod · 0.45
GetNullMethod · 0.45

Tested by

no test coverage detected