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

Method GetNext

be/src/exec/system-table-scan-node.cc:59–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57}
58
59Status SystemTableScanNode::GetNext(RuntimeState* state, RowBatch* row_batch, bool* eos) {
60 SCOPED_TIMER(runtime_profile_->total_time_counter());
61 ScopedGetNextEventAdder ea(this, eos);
62 RETURN_IF_ERROR(ExecDebugAction(TExecNodePhase::GETNEXT, state));
63 RETURN_IF_CANCELLED(state);
64 RETURN_IF_ERROR(QueryMaintenance(state));
65
66 int64_t tuple_buffer_size;
67 uint8_t* tuple_mem;
68 RETURN_IF_ERROR(
69 row_batch->ResizeAndAllocateTupleBuffer(state, &tuple_buffer_size, &tuple_mem));
70
71 SCOPED_TIMER(materialize_tuple_timer());
72
73 // copy rows until we hit the limit/capacity or until we exhaust input batch
74 while (!ReachedLimit() && !row_batch->AtCapacity() && !scanner_->eos()) {
75 Tuple* tuple = reinterpret_cast<Tuple*>(tuple_mem);
76 RETURN_IF_ERROR(MaterializeNextTuple(row_batch->tuple_data_pool(), tuple));
77 TupleRow* tuple_row = row_batch->GetRow(row_batch->AddRow());
78 tuple_row->SetTuple(0, tuple);
79
80 if (ExecNode::EvalConjuncts(
81 conjunct_evals_.data(), conjunct_evals_.size(), tuple_row)) {
82 row_batch->CommitLastRow();
83 tuple_mem += tuple_desc_->byte_size();
84 IncrementNumRowsReturned(1);
85 }
86 }
87 COUNTER_SET(rows_returned_counter_, rows_returned());
88 *eos = ReachedLimit() || scanner_->eos();
89 return Status::OK();
90}
91
92Status SystemTableScanNode::Reset(RuntimeState* state, RowBatch* row_batch) {
93 DCHECK(false) << "NYI";

Callers

nothing calls this directly

Calls 13

OKFunction · 0.85
total_time_counterMethod · 0.80
tuple_data_poolMethod · 0.80
CommitLastRowMethod · 0.80
AtCapacityMethod · 0.45
eosMethod · 0.45
GetRowMethod · 0.45
AddRowMethod · 0.45
SetTupleMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected