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

Method GetOrInsertNull

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

Source from the content-addressed store, hash-verified

605
606 template <typename Func1, typename Func2>
607 int32_t GetOrInsertNull(Func1&& on_found, Func2&& on_not_found) {
608 auto memo_index = GetNull();
609 if (memo_index == kKeyNotFound) {
610 memo_index = value_to_index_[cardinality] = size();
611 index_to_value_.push_back(0);
612 on_not_found(memo_index);
613 } else {
614 on_found(memo_index);
615 }
616 return memo_index;
617 }
618
619 int32_t GetOrInsertNull() {
620 return GetOrInsertNull([](int32_t i) {}, [](int32_t i) {});

Callers

nothing calls this directly

Calls 2

push_backMethod · 0.80
sizeFunction · 0.50

Tested by

no test coverage detected