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

Method FirstUnmatched

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

Source from the content-addressed store, hash-verified

187}
188
189inline HashTable::Iterator HashTable::FirstUnmatched(HashTableCtx* ctx) {
190 int64_t bucket_idx = Iterator::BUCKET_NOT_FOUND;
191 DuplicateNode* node = NULL;
192 NextFilledBucket(&bucket_idx, &node);
193 Iterator it(this, ctx->scratch_row(), bucket_idx, node);
194 // Check whether the bucket, or its first duplicate node, is matched. If it is not
195 // matched, then return. Otherwise, move to the first unmatched entry (node or bucket).
196 Bucket* bucket = &buckets_[bucket_idx];
197 bool has_duplicates = stores_duplicates() && bucket->HasDuplicates();
198 if ((!has_duplicates && bucket->IsMatched()) || (has_duplicates && node->IsMatched())) {
199 it.NextUnmatched();
200 }
201 return it;
202}
203
204inline void HashTable::NextFilledBucket(int64_t* bucket_idx, DuplicateNode** node) {
205 ++*bucket_idx;

Callers 2

DoneProbingMethod · 0.80

Calls 4

scratch_rowMethod · 0.80
NextUnmatchedMethod · 0.80
HasDuplicatesMethod · 0.45
IsMatchedMethod · 0.45

Tested by

no test coverage detected