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

Method GetOrInsertNull

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

Source from the content-addressed store, hash-verified

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