| 167 | // TODO: support lazy evaluation like HashTable::Insert(). |
| 168 | template <HashTable::BucketType TYPE> |
| 169 | inline HashTable::Iterator HashTable::FindBuildRowBucket( |
| 170 | HashTableCtx* __restrict__ ht_ctx, bool* found) { |
| 171 | uint32_t hash = ht_ctx->expr_values_cache()->CurExprValuesHash(); |
| 172 | BucketData bd; |
| 173 | int64_t bucket_idx = Probe<true, true, TYPE>( |
| 174 | buckets_, hash_array_, num_buckets_, ht_ctx, hash, found, &bd); |
| 175 | DuplicateNode* duplicates = NULL; |
| 176 | if (stores_duplicates() && LIKELY(bucket_idx != Iterator::BUCKET_NOT_FOUND)) { |
| 177 | duplicates = bd.duplicates; |
| 178 | } |
| 179 | return Iterator(this, ht_ctx->scratch_row(), bucket_idx, duplicates); |
| 180 | } |
| 181 | |
| 182 | inline HashTable::Iterator HashTable::Begin(const HashTableCtx* ctx) { |
| 183 | int64_t bucket_idx = Iterator::BUCKET_NOT_FOUND; |