| 98 | } |
| 99 | |
| 100 | inline 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 | |
| 118 | inline bool HashTable::Insert(HashTableCtx* __restrict__ ht_ctx, |
| 119 | BufferedTupleStream::FlatRowPtr flat_row, TupleRow* row, Status* status) { |
nothing calls this directly
no test coverage detected