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

Method Insert

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

Source from the content-addressed store, hash-verified

270 }
271
272 Status Insert(Entry* entry, hash_t h, const Payload& payload) {
273 // Ensure entry is empty before inserting
274 assert(!*entry);
275 entry->h = FixHash(h);
276 entry->payload = payload;
277 ++size_;
278
279 if (ARROW_PREDICT_FALSE(NeedUpsizing())) {
280 // Resize less frequently since it is expensive
281 return Upsize(capacity_ * kLoadFactor * 2);
282 }
283 return Status::OK();
284 }
285
286 uint64_t size() const { return size_; }
287

Callers 2

GetOrInsertMethod · 0.45
GetOrInsertMethod · 0.45

Calls 1

OKFunction · 0.50

Tested by

no test coverage detected