| 667 | } |
| 668 | |
| 669 | Status NestedLoopJoinNode::NextProbeRow(RuntimeState* state, RowBatch* output_batch) { |
| 670 | current_probe_row_ = NULL; |
| 671 | matched_probe_ = false; |
| 672 | while (probe_batch_pos_ == probe_batch_->num_rows()) { |
| 673 | probe_batch_->TransferResourceOwnership(output_batch); |
| 674 | probe_batch_pos_ = 0; |
| 675 | // If output_batch_ is at capacity after acquiring probe_batch_'s resources, we |
| 676 | // need to pass it up through the execution before getting a new probe batch. |
| 677 | // Otherwise, subsequent GetNext() calls to the probe input may cause the |
| 678 | // memory referenced by this batch to be deleted (see IMPALA-2191). |
| 679 | if (output_batch->AtCapacity()) return Status::OK(); |
| 680 | if (probe_side_eos_) { |
| 681 | eos_ = !NeedToProcessUnmatchedBuildRows(join_op_); |
| 682 | return Status::OK(); |
| 683 | } else { |
| 684 | RETURN_IF_ERROR(child(0)->GetNext(state, probe_batch_.get(), &probe_side_eos_)); |
| 685 | COUNTER_ADD(probe_row_counter_, probe_batch_->num_rows()); |
| 686 | } |
| 687 | } |
| 688 | current_probe_row_ = probe_batch_->GetRow(probe_batch_pos_++); |
| 689 | // We have a valid probe row; reset the build row iterator. |
| 690 | build_row_iterator_ = build_batches_->Iterator(); |
| 691 | current_build_row_idx_ = 0; |
| 692 | VLOG_ROW << "left row: " << GetLeftChildRowString(current_probe_row_); |
| 693 | return Status::OK(); |
| 694 | } |
nothing calls this directly
no test coverage detected