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

Function ExecInitAssertOp

src/backend/executor/nodeAssertOp.c:91–130  ·  view source on GitHub ↗

* Init AssertOp, which sets the ProjectInfo and * the Constraints to evaluate. * */

Source from the content-addressed store, hash-verified

89 * the Constraints to evaluate.
90 * */
91AssertOpState*
92ExecInitAssertOp(AssertOp *node, EState *estate, int eflags)
93{
94 AssertOpState *assertOpState;
95
96 /* Check for unsupported flags */
97 Assert(!(eflags & (EXEC_FLAG_BACKWARD | EXEC_FLAG_MARK)));
98 Assert(outerPlan(node) != NULL);
99
100 assertOpState = makeNode(AssertOpState);
101 assertOpState->ps.plan = (Plan *)node;
102 assertOpState->ps.state = estate;
103 assertOpState->ps.ExecProcNode = ExecAssertOp;
104
105 /* Create expression evaluation context */
106 ExecAssignExprContext(estate, &assertOpState->ps);
107
108 /*
109 * Initialize outer plan
110 */
111 Plan *outerPlan = outerPlan(node);
112 outerPlanState(assertOpState) = ExecInitNode(outerPlan, estate, eflags);
113
114 /*
115 * Initialize result type and projection.
116 */
117 ExecInitResultTupleSlotTL(&assertOpState->ps, &TTSOpsMinimalTuple);
118
119 ExecAssignProjectionInfo(&assertOpState->ps, NULL);
120
121 assertOpState->ps.qual =
122 ExecInitQual(node->plan.qual, (PlanState *) assertOpState);
123
124 if (estate->es_instrument & INSTRUMENT_CDB)
125 {
126 assertOpState->ps.cdbexplainbuf = makeStringInfo();
127 }
128
129 return assertOpState;
130}
131
132/* Rescan AssertOp */
133void

Callers 1

ExecInitNodeFunction · 0.85

Calls 6

ExecAssignExprContextFunction · 0.85
ExecInitNodeFunction · 0.85
ExecAssignProjectionInfoFunction · 0.85
ExecInitQualFunction · 0.85
makeStringInfoFunction · 0.85

Tested by

no test coverage detected