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

Method AggregationNodeBase

be/src/exec/aggregation-node-base.cc:67–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65}
66
67AggregationNodeBase::AggregationNodeBase(
68 ObjectPool* pool, const AggregationPlanNode& pnode, const DescriptorTbl& descs)
69 : ExecNode(pool, pnode, descs),
70 replicate_input_(pnode.tnode_->agg_node.replicate_input) {
71 // Create the Aggregator nodes from their configs.
72 int num_aggs = pnode.aggs_.size();
73 for (int i = 0; i < num_aggs; ++i) {
74 const AggregatorConfig* agg = pnode.aggs_[i];
75 unique_ptr<Aggregator> node;
76 if (agg->GetNumGroupingExprs() == 0) {
77 const NonGroupingAggregatorConfig* non_grouping_config =
78 static_cast<const NonGroupingAggregatorConfig*>(agg);
79 node.reset(new NonGroupingAggregator(this, pool_, *non_grouping_config));
80 } else {
81 const GroupingAggregatorConfig* grouping_config =
82 static_cast<const GroupingAggregatorConfig*>(agg);
83 DCHECK(grouping_config != nullptr);
84 node.reset(new GroupingAggregator(this, pool_, *grouping_config,
85 pnode.tnode_->agg_node.estimated_input_cardinality));
86 }
87 aggs_.push_back(std::move(node));
88 runtime_profile_->AddChild(aggs_[i]->runtime_profile());
89 }
90 fast_limit_check_ = pnode.tnode_->agg_node.fast_limit_check;
91}
92
93Status AggregationNodeBase::Prepare(RuntimeState* state) {
94 SCOPED_TIMER(runtime_profile_->total_time_counter());

Callers

nothing calls this directly

Calls 7

moveFunction · 0.85
push_backMethod · 0.80
AddChildMethod · 0.80
resetMethod · 0.65
sizeMethod · 0.45
GetNumGroupingExprsMethod · 0.45
runtime_profileMethod · 0.45

Tested by

no test coverage detected