MCPcopy Create free account
hub / github.com/apache/cloudberry / ExecInitPartitionSelector

Function ExecInitPartitionSelector

src/backend/executor/nodePartitionSelector.c:77–108  ·  view source on GitHub ↗

---------------------------------------------------------------- * ExecInitPartitionSelector * * Create the run-time state information for PartitionSelector node * produced by Orca and initializes outer child if exists. * * ---------------------------------------------------------------- */

Source from the content-addressed store, hash-verified

75 * ----------------------------------------------------------------
76 */
77PartitionSelectorState *
78ExecInitPartitionSelector(PartitionSelector *node, EState *estate, int eflags)
79{
80 PartitionSelectorState *psstate;
81
82 /* check for unsupported flags */
83 Assert (!(eflags & (EXEC_FLAG_MARK | EXEC_FLAG_BACKWARD)));
84
85 psstate = makeNode(PartitionSelectorState);
86 psstate->ps.plan = (Plan *) node;
87 psstate->ps.state = estate;
88
89 /* ExprContext initialization */
90 ExecAssignExprContext(estate, &psstate->ps);
91
92 psstate->ps.ExecProcNode = ExecPartitionSelector;
93
94 /* tuple table initialization */
95 ExecInitResultTypeTL(&psstate->ps);
96 ExecAssignProjectionInfo(&psstate->ps, NULL);
97
98 /*
99 * initialize outer plan
100 */
101 outerPlanState(psstate) = ExecInitNode(outerPlan(node), estate, eflags);
102
103 /* Create the working data structure for pruning. */
104 psstate->prune_state = ExecCreatePartitionPruneState(&psstate->ps,
105 node->part_prune_info);
106
107 return psstate;
108}
109
110/* ----------------------------------------------------------------
111 * ExecPartitionSelector(node)

Callers 1

ExecInitNodeFunction · 0.85

Calls 5

ExecAssignExprContextFunction · 0.85
ExecInitResultTypeTLFunction · 0.85
ExecAssignProjectionInfoFunction · 0.85
ExecInitNodeFunction · 0.85

Tested by

no test coverage detected