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

Method Get

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

Source from the content-addressed store, hash-verified

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