MCPcopy Create free account
hub / github.com/apache/impala / InsertIfNotPresent

Method InsertIfNotPresent

be/src/util/fixed-size-hash-table.h:98–106  ·  view source on GitHub ↗

Insert entry if entry with same key not present. key should not be null. Return true if insert occurred.

Source from the content-addressed store, hash-verified

96 /// Insert entry if entry with same key not present. key should not be null.
97 /// Return true if insert occurred.
98 bool InsertIfNotPresent(const K key, const V& val) {
99 DCHECK_LT(size_, capacity_);
100 Entry* entry = FindEntry(key);
101 if (entry->key != NULL) return false;
102 entry->key = key;
103 entry->val = val;
104 ++size_;
105 return true;
106 }
107
108 /// Try to find entry, and insert default_val if not present. Return a pointer to the
109 /// value. key should not be null.

Callers 2

TotalByteSizeMethod · 0.80
TESTFunction · 0.80

Calls

no outgoing calls

Tested by 1

TESTFunction · 0.64