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

Method Insert

be/src/exec/hash-table.inline.h:118–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

116}
117
118inline bool HashTable::Insert(HashTableCtx* __restrict__ ht_ctx,
119 BufferedTupleStream::FlatRowPtr flat_row, TupleRow* row, Status* status) {
120 Bucket* bucket = InsertInternal(ht_ctx, status);
121 if (UNLIKELY(bucket == NULL)) return false;
122 // If successful insert, update the contents of the newly inserted entry with 'idx'.
123 if (bucket->HasDuplicates()) {
124 DuplicateNode* node = bucket->GetDuplicate();
125 if (UNLIKELY(node == NULL)) return false;
126 if (stores_tuples()) {
127 node->htdata.tuple = row->GetTuple(0);
128 } else {
129 node->htdata.flat_row = flat_row;
130 }
131 } else {
132 if (stores_tuples()) {
133 Tuple* tuple = row->GetTuple(0);
134 bucket->SetTuple(tuple);
135 } else {
136 bucket->SetFlatRow(flat_row);
137 }
138 }
139 return true;
140}
141
142template <const bool READ>
143inline void HashTable::PrefetchBucket(uint32_t hash) {

Callers

nothing calls this directly

Calls 5

SetFlatRowMethod · 0.80
HasDuplicatesMethod · 0.45
GetDuplicateMethod · 0.45
GetTupleMethod · 0.45
SetTupleMethod · 0.45

Tested by

no test coverage detected