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

Function ExecInitLockRows

src/backend/executor/nodeLockRows.c:291–376  ·  view source on GitHub ↗

---------------------------------------------------------------- * ExecInitLockRows * * This initializes the LockRows node state structures and * the node's subplan. * ---------------------------------------------------------------- */

Source from the content-addressed store, hash-verified

289 * ----------------------------------------------------------------
290 */
291LockRowsState *
292ExecInitLockRows(LockRows *node, EState *estate, int eflags)
293{
294 LockRowsState *lrstate;
295 Plan *outerPlan = outerPlan(node);
296 List *epq_arowmarks;
297 ListCell *lc;
298
299 /* check for unsupported flags */
300 Assert(!(eflags & EXEC_FLAG_MARK));
301
302 /*
303 * create state structure
304 */
305 lrstate = makeNode(LockRowsState);
306 lrstate->ps.plan = (Plan *) node;
307 lrstate->ps.state = estate;
308 lrstate->ps.ExecProcNode = ExecLockRows;
309
310 /*
311 * Miscellaneous initialization
312 *
313 * LockRows nodes never call ExecQual or ExecProject, therefore no
314 * ExprContext is needed.
315 */
316
317 /*
318 * Initialize result type.
319 */
320 ExecInitResultTypeTL(&lrstate->ps);
321
322 /*
323 * then initialize outer plan
324 */
325 outerPlanState(lrstate) = ExecInitNode(outerPlan, estate, eflags);
326
327 /* node returns unmodified slots from the outer plan */
328 lrstate->ps.resultopsset = true;
329 lrstate->ps.resultops = ExecGetResultSlotOps(outerPlanState(lrstate),
330 &lrstate->ps.resultopsfixed);
331
332 /*
333 * LockRows nodes do no projections, so initialize projection info for
334 * this node appropriately
335 */
336 lrstate->ps.ps_ProjInfo = NULL;
337
338 /*
339 * Locate the ExecRowMark(s) that this node is responsible for, and
340 * construct ExecAuxRowMarks for them. (InitPlan should already have
341 * built the global list of ExecRowMarks.)
342 */
343 lrstate->lr_arowMarks = NIL;
344 epq_arowmarks = NIL;
345 foreach(lc, node->rowMarks)
346 {
347 PlanRowMark *rc = lfirst_node(PlanRowMark, lc);
348 ExecRowMark *erm;

Callers 1

ExecInitNodeFunction · 0.85

Calls 8

ExecInitResultTypeTLFunction · 0.85
ExecInitNodeFunction · 0.85
ExecGetResultSlotOpsFunction · 0.85
ExecFindRowMarkFunction · 0.85
ExecBuildAuxRowMarkFunction · 0.85
lappendFunction · 0.85
EvalPlanQualInitFunction · 0.85
foreachFunction · 0.50

Tested by

no test coverage detected