---------------------------------------------------------------- * ExecInitPartitionSelector * * Create the run-time state information for PartitionSelector node * produced by Orca and initializes outer child if exists. * * ---------------------------------------------------------------- */
| 75 | * ---------------------------------------------------------------- |
| 76 | */ |
| 77 | PartitionSelectorState * |
| 78 | ExecInitPartitionSelector(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) |
no test coverage detected