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

Method NextSpilledProbeRowBatch

be/src/exec/partitioned-hash-join-node.cc:420–447  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

418}
419
420Status 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
449Status PartitionedHashJoinNode::BeginSpilledProbe() {
450 VLOG(2) << "BeginSpilledProbe\n" << NodeDebugString();

Callers

nothing calls this directly

Calls 9

OKFunction · 0.85
probe_rowsMethod · 0.80
getMethod · 0.65
stateMethod · 0.45
AtCapacityMethod · 0.45
rows_returnedMethod · 0.45
num_rowsMethod · 0.45
GetNextMethod · 0.45

Tested by

no test coverage detected