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

Method Prepare

be/src/exec/exec-node.cc:299–327  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

297}
298
299Status ExecNode::Prepare(RuntimeState* state) {
300 RETURN_IF_ERROR(ExecDebugAction(TExecNodePhase::PREPARE, state));
301 DCHECK(runtime_profile_ != NULL);
302 mem_tracker_.reset(new MemTracker(runtime_profile_, -1, runtime_profile_->name(),
303 state->instance_mem_tracker()));
304 expr_mem_tracker_.reset(new MemTracker(-1, "Exprs", mem_tracker_.get(), false));
305 expr_perm_pool_.reset(new MemPool(expr_mem_tracker_.get()));
306 expr_results_pool_.reset(new MemPool(expr_mem_tracker_.get()));
307 rows_returned_counter_ = ADD_COUNTER(runtime_profile_, "RowsReturned", TUnit::UNIT);
308 rows_returned_rate_ = runtime_profile()->AddDerivedCounter(
309 ROW_THROUGHPUT_COUNTER, TUnit::UNIT_PER_SECOND,
310 bind<int64_t>(&RuntimeProfile::UnitsPerSecond, rows_returned_counter_,
311 runtime_profile()->total_time_counter()));
312 RETURN_IF_ERROR(ScalarExprEvaluator::Create(conjuncts_, state, pool_, expr_perm_pool(),
313 expr_results_pool(), &conjunct_evals_));
314 DCHECK_EQ(conjunct_evals_.size(), conjuncts_.size());
315 for (int i = 0; i < children_.size(); ++i) {
316 RETURN_IF_ERROR(children_[i]->Prepare(state));
317 }
318 reservation_manager_.Init(
319 Substitute("$0 id=$1 ptr=$2", PrintValue(type_), id_, this), runtime_profile_,
320 state->instance_buffer_reservation(), mem_tracker_.get(), resource_profile_,
321 debug_options_);
322 if (!IsInSubplan()) {
323 events_ = runtime_profile_->AddEventSequence("Node Lifecycle Event Timeline");
324 events_->Start(state->query_state()->fragment_events_start_time());
325 }
326 return Status::OK();
327}
328
329Status ExecNode::Open(RuntimeState* state) {
330 RETURN_IF_ERROR(ExecDebugAction(TExecNodePhase::OPEN, state));

Callers

nothing calls this directly

Calls 15

CreateClass · 0.85
SubstituteFunction · 0.85
PrintValueFunction · 0.85
OKFunction · 0.85
instance_mem_trackerMethod · 0.80
AddDerivedCounterMethod · 0.80
total_time_counterMethod · 0.80
AddEventSequenceMethod · 0.80
resetMethod · 0.65
getMethod · 0.65

Tested by

no test coverage detected