| 418 | } |
| 419 | |
| 420 | Status PartitionedHashJoinNode::NextSpilledProbeRowBatch( |
| 421 | RuntimeState* state, RowBatch* out_batch, bool* eos) { |
| 422 | DCHECK(input_partition_ != nullptr); |
| 423 | DCHECK(builder_->state() == HashJoinState::PROBING_SPILLED_PARTITION |
| 424 | || builder_->state() == HashJoinState::REPARTITIONING_PROBE); |
| 425 | DCHECK_ENUM_EQ(probe_state_, ProbeState::PROBING_END_BATCH); |
| 426 | *eos = false; |
| 427 | probe_batch_->TransferResourceOwnership(out_batch); |
| 428 | if (out_batch->AtCapacity()) { |
| 429 | // The out_batch has resources associated with it that will be recycled on the |
| 430 | // next call to GetNext() on the probe stream. Return this batch now. |
| 431 | probe_batch_pos_ = -1; |
| 432 | return Status::OK(); |
| 433 | } |
| 434 | BufferedTupleStream* probe_rows = input_partition_->probe_rows(); |
| 435 | if (LIKELY(probe_rows->rows_returned() < probe_rows->num_rows())) { |
| 436 | // Continue from the current probe stream. |
| 437 | RETURN_IF_ERROR(probe_rows->GetNext(probe_batch_.get(), eos)); |
| 438 | DCHECK_GT(probe_batch_->num_rows(), 0); |
| 439 | ResetForProbe(); |
| 440 | } else { |
| 441 | // Finished processing spilled probe rows from this partition. |
| 442 | current_probe_row_ = nullptr; |
| 443 | probe_batch_pos_ = -1; |
| 444 | *eos = true; |
| 445 | } |
| 446 | return Status::OK(); |
| 447 | } |
| 448 | |
| 449 | Status PartitionedHashJoinNode::BeginSpilledProbe() { |
| 450 | VLOG(2) << "BeginSpilledProbe\n" << NodeDebugString(); |
nothing calls this directly
no test coverage detected