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

Method InsertInternal

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

Source from the content-addressed store, hash-verified

98}
99
100inline HashTable::Bucket* HashTable::InsertInternal(
101 HashTableCtx* __restrict__ ht_ctx, Status* status) {
102 bool found = false;
103 uint32_t hash = ht_ctx->expr_values_cache()->CurExprValuesHash();
104 BucketData bd;
105 int64_t bucket_idx =
106 Probe<true, true>(buckets_, hash_array_, num_buckets_, ht_ctx, hash, &found, &bd);
107 DCHECK_NE(bucket_idx, Iterator::BUCKET_NOT_FOUND);
108 if (found) {
109 // We need to insert a duplicate node, note that this may fail to allocate memory.
110 DuplicateNode* new_node = InsertDuplicateNode(bucket_idx, status, &bd);
111 if (UNLIKELY(new_node == NULL)) return NULL;
112 } else {
113 PrepareBucketForInsert(bucket_idx, hash);
114 }
115 return &buckets_[bucket_idx];
116}
117
118inline bool HashTable::Insert(HashTableCtx* __restrict__ ht_ctx,
119 BufferedTupleStream::FlatRowPtr flat_row, TupleRow* row, Status* status) {

Callers

nothing calls this directly

Calls 2

CurExprValuesHashMethod · 0.80
expr_values_cacheMethod · 0.80

Tested by

no test coverage detected