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

Method NextProbeRowBatchFromChild

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

Source from the content-addressed store, hash-verified

390}
391
392Status PartitionedHashJoinNode::NextProbeRowBatchFromChild(
393 RuntimeState* state, RowBatch* out_batch, bool* eos) {
394 DCHECK_ENUM_EQ(builder_->state(), HashJoinState::PARTITIONING_PROBE);
395 DCHECK_ENUM_EQ(probe_state_, ProbeState::PROBING_END_BATCH);
396 DCHECK(probe_batch_pos_ == probe_batch_->num_rows() || probe_batch_pos_ == -1);
397 *eos = false;
398 do {
399 // Loop until we find a non-empty row batch.
400 probe_batch_->TransferResourceOwnership(out_batch);
401 if (out_batch->AtCapacity()) {
402 // This out batch is full. Need to return it before getting the next batch.
403 probe_batch_pos_ = -1;
404 return Status::OK();
405 }
406 if (probe_side_eos_) {
407 current_probe_row_ = nullptr;
408 probe_batch_pos_ = -1;
409 *eos = true;
410 return Status::OK();
411 }
412 RETURN_IF_ERROR(child(0)->GetNext(state, probe_batch_.get(), &probe_side_eos_));
413 COUNTER_ADD(probe_row_counter_, probe_batch_->num_rows());
414 } while (probe_batch_->num_rows() == 0);
415
416 ResetForProbe();
417 return Status::OK();
418}
419
420Status PartitionedHashJoinNode::NextSpilledProbeRowBatch(
421 RuntimeState* state, RowBatch* out_batch, bool* eos) {

Callers

nothing calls this directly

Calls 7

OKFunction · 0.85
getMethod · 0.65
stateMethod · 0.45
num_rowsMethod · 0.45
AtCapacityMethod · 0.45
GetNextMethod · 0.45

Tested by

no test coverage detected