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

Method GetNext

be/src/exec/cardinality-check-node.cc:84–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82}
83
84Status CardinalityCheckNode::GetNext(
85 RuntimeState* state, RowBatch* output_row_batch, bool* eos) {
86 SCOPED_TIMER(runtime_profile_->total_time_counter());
87 ScopedGetNextEventAdder ea(this, eos);
88 RETURN_IF_ERROR(ExecDebugAction(TExecNodePhase::GETNEXT, state));
89 RETURN_IF_CANCELLED(state);
90 RETURN_IF_ERROR(QueryMaintenance(state));
91 DCHECK_LE(row_batch_->num_rows(), 1);
92
93 if (row_batch_->num_rows() == 1) {
94 TupleRow* src_row = row_batch_->GetRow(0);
95 TupleRow* dst_row = output_row_batch->GetRow(output_row_batch->AddRow());
96 output_row_batch->CopyRow(src_row, dst_row);
97 output_row_batch->CommitLastRow();
98 row_batch_->TransferResourceOwnership(output_row_batch);
99 SetNumRowsReturned(1);
100 COUNTER_SET(rows_returned_counter_, rows_returned());
101 }
102 *eos = true;
103 row_batch_->Reset();
104 return Status::OK();
105}
106
107Status CardinalityCheckNode::Reset(RuntimeState* state, RowBatch* row_batch) {
108 row_batch_->Reset();

Callers 1

OpenMethod · 0.45

Calls 9

OKFunction · 0.85
total_time_counterMethod · 0.80
CopyRowMethod · 0.80
CommitLastRowMethod · 0.80
num_rowsMethod · 0.45
GetRowMethod · 0.45
AddRowMethod · 0.45
ResetMethod · 0.45

Tested by

no test coverage detected