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

Function ExecSetParamPlanMulti

src/backend/executor/nodeSubplan.c:1489–1507  ·  view source on GitHub ↗

* ExecSetParamPlanMulti * * Apply ExecSetParamPlan to evaluate any not-yet-evaluated initplan output * parameters whose ParamIDs are listed in "params". Any listed params that * are not initplan outputs are ignored. * * As with ExecSetParamPlan, any ExprContext belonging to the current EState * can be used, but in principle a shorter-lived ExprContext is better than a * longer-lived one.

Source from the content-addressed store, hash-verified

1487 * longer-lived one.
1488 */
1489void
1490ExecSetParamPlanMulti(const Bitmapset *params, ExprContext *econtext, QueryDesc *queryDesc)
1491{
1492 int paramid;
1493
1494 paramid = -1;
1495 while ((paramid = bms_next_member(params, paramid)) >= 0)
1496 {
1497 ParamExecData *prm = &(econtext->ecxt_param_exec_vals[paramid]);
1498
1499 if (prm->execPlan != NULL)
1500 {
1501 /* Parameter not evaluated yet, so go do it */
1502 ExecSetParamPlan(prm->execPlan, econtext, queryDesc);
1503 /* ExecSetParamPlan should have processed this param... */
1504 Assert(prm->execPlan == NULL);
1505 }
1506 }
1507}
1508
1509/*
1510 * Mark an initplan as needing recalculation

Callers 4

EvalPlanQualBeginFunction · 0.85
EvalPlanQualStartFunction · 0.85
ExecInitParallelPlanFunction · 0.85
ExecParallelReinitializeFunction · 0.85

Calls 2

bms_next_memberFunction · 0.85
ExecSetParamPlanFunction · 0.85

Tested by

no test coverage detected