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

Function ExecEvalParamExec

src/backend/executor/execExprInterp.c:2487–2502  ·  view source on GitHub ↗

* Evaluate a PARAM_EXEC parameter. * * PARAM_EXEC params (internal executor parameters) are stored in the * ecxt_param_exec_vals array, and can be accessed by array index. */

Source from the content-addressed store, hash-verified

2485 * ecxt_param_exec_vals array, and can be accessed by array index.
2486 */
2487void
2488ExecEvalParamExec(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
2489{
2490 ParamExecData *prm;
2491
2492 prm = &(econtext->ecxt_param_exec_vals[op->d.param.paramid]);
2493 if (unlikely(prm->execPlan != NULL))
2494 {
2495 /* Parameter not evaluated yet, so go do it */
2496 ExecSetParamPlan(prm->execPlan, econtext, NULL);
2497 /* ExecSetParamPlan should have processed this param... */
2498 Assert(prm->execPlan == NULL);
2499 }
2500 *op->resvalue = prm->value;
2501 *op->resnull = prm->isnull;
2502}
2503
2504/*
2505 * Evaluate a PARAM_EXTERN parameter.

Callers 1

ExecInterpExprFunction · 0.85

Calls 1

ExecSetParamPlanFunction · 0.85

Tested by

no test coverage detected