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

Method SetContainingSubplan

be/src/exec/subplan-node.cc:37–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35}
36
37Status SubplanPlanNode::SetContainingSubplan(
38 FragmentState* state, SubplanPlanNode* ancestor, PlanNode* node) {
39 node->containing_subplan_ = ancestor;
40 if (node->tnode_->node_type == TPlanNodeType::SUBPLAN_NODE) {
41 // Only traverse the first child and not the second one, because the Subplan
42 // parent of nodes inside it should be 'node' and not 'ancestor'.
43 RETURN_IF_ERROR(SetContainingSubplan(state, ancestor, node->children_[0]));
44 } else {
45 if (node->tnode_->node_type == TPlanNodeType::UNNEST_NODE) {
46 UnnestPlanNode* unnest_node = reinterpret_cast<UnnestPlanNode*>(node);
47 RETURN_IF_ERROR(unnest_node->InitCollExprs(state));
48 }
49 int num_children = node->children_.size();
50 for (int i = 0; i < num_children; ++i) {
51 RETURN_IF_ERROR(SetContainingSubplan(state, ancestor, node->children_[i]));
52 }
53 }
54 return Status::OK();
55}
56
57Status SubplanPlanNode::CreateExecNode(RuntimeState* state, ExecNode** node) const {
58 ObjectPool* pool = state->obj_pool();

Callers

nothing calls this directly

Calls 7

OKFunction · 0.85
InitCollExprsMethod · 0.80
childMethod · 0.80
num_childrenMethod · 0.80
sizeMethod · 0.45
typeMethod · 0.45

Tested by

no test coverage detected