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

Method Get

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

Source from the content-addressed store, hash-verified

424
425 template <typename Value>
426 int32_t Get(Value&& v) const {
427 const Scalar value(std::forward<Value>(v));
428 auto cmp_func = [value](const Payload* payload) -> bool {
429 return ScalarHelper<Scalar, 0>::CompareScalars(payload->value, value);
430 };
431 hash_t h = ComputeHash(value);
432 auto p = hash_table_.Lookup(h, cmp_func);
433 if (p.second) {
434 return p.first->payload.memo_index;
435 } else {
436 return kKeyNotFound;
437 }
438 }
439
440 template <typename Value, typename Func1, typename Func2>
441 Status GetOrInsert(Value&& v, Func1&& on_found, Func2&& on_not_found,

Callers

nothing calls this directly

Calls 1

LookupMethod · 0.45

Tested by

no test coverage detected