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

Method NextUnmatched

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

Source from the content-addressed store, hash-verified

381}
382
383inline void HashTable::Iterator::NextUnmatched() {
384 DCHECK(!AtEnd());
385 Bucket* bucket = &table_->buckets_[bucket_idx_];
386 // Check if there is any remaining unmatched duplicate node in the current bucket.
387 if (table_->stores_duplicates() && bucket->HasDuplicates()) {
388 auto next_node = node_->Next();
389 while (next_node != NULL) {
390 node_ = next_node;
391 if (!node_->IsMatched()) return;
392 next_node = next_node->Next();
393 }
394 }
395 // Move to the next filled bucket and return if this bucket is not matched or
396 // iterate to the first not matched duplicate node.
397 table_->NextFilledBucket(&bucket_idx_, &node_);
398 while (bucket_idx_ != Iterator::BUCKET_NOT_FOUND) {
399 bucket = &table_->buckets_[bucket_idx_];
400 if (!table_->stores_duplicates() || !bucket->HasDuplicates()) {
401 if (!bucket->IsMatched()) return;
402 } else {
403 auto next_node = node_->Next();
404 while (node_->IsMatched() && next_node != NULL) {
405 node_ = next_node;
406 next_node = next_node->Next();
407 }
408 if (!node_->IsMatched()) return;
409 }
410 table_->NextFilledBucket(&bucket_idx_, &node_);
411 }
412}
413
414inline void HashTableCtx::set_level(int level) {
415 DCHECK_GE(level, 0);

Callers 2

FirstUnmatchedMethod · 0.80

Calls 5

stores_duplicatesMethod · 0.80
NextFilledBucketMethod · 0.80
HasDuplicatesMethod · 0.45
NextMethod · 0.45
IsMatchedMethod · 0.45

Tested by

no test coverage detected