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

Method GetNextRightAntiJoin

be/src/exec/nested-loop-join-node.cc:485–522  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

483}
484
485Status NestedLoopJoinNode::GetNextRightAntiJoin(RuntimeState* state,
486 RowBatch* output_batch) {
487 ScalarExprEvaluator* const* join_conjunct_evals = join_conjunct_evals_.data();
488 size_t num_join_conjuncts = join_conjuncts_.size();
489 DCHECK_EQ(num_join_conjuncts, join_conjunct_evals_.size());
490 DCHECK(matching_build_rows_ != NULL);
491 const int N = BitUtil::RoundUpToPowerOfTwo(state->batch_size());
492
493 while (!eos_ && HasMoreProbeRows()) {
494 DCHECK(HasValidProbeRow());
495 while (!build_row_iterator_.AtEnd()) {
496 DCHECK(current_probe_row_ != NULL);
497 // This loop can go on for a long time if the conjuncts are very selective.
498 // Do query maintenance every N iterations.
499 if ((current_build_row_idx_ & (N - 1)) == 0) {
500 RETURN_IF_CANCELLED(state);
501 RETURN_IF_ERROR(QueryMaintenance(state));
502 }
503
504 if (matching_build_rows_->Get(current_build_row_idx_)) {
505 build_row_iterator_.Next();
506 ++current_build_row_idx_;
507 continue;
508 }
509 CreateOutputRow(semi_join_staging_row_, current_probe_row_,
510 build_row_iterator_.GetRow());
511 if (EvalConjuncts(
512 join_conjunct_evals, num_join_conjuncts, semi_join_staging_row_)) {
513 matching_build_rows_->Set(current_build_row_idx_, true);
514 }
515 build_row_iterator_.Next();
516 ++current_build_row_idx_;
517 }
518 RETURN_IF_ERROR(NextProbeRow(state, output_batch));
519 if (output_batch->AtCapacity()) return Status::OK();
520 }
521 return ProcessUnmatchedBuildRows(state, output_batch);
522}
523
524Status NestedLoopJoinNode::GetNextFullOuterJoin(RuntimeState* state,
525 RowBatch* output_batch) {

Callers

nothing calls this directly

Calls 10

OKFunction · 0.85
batch_sizeMethod · 0.80
dataMethod · 0.45
sizeMethod · 0.45
AtEndMethod · 0.45
GetMethod · 0.45
NextMethod · 0.45
GetRowMethod · 0.45
SetMethod · 0.45
AtCapacityMethod · 0.45

Tested by

no test coverage detected