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

Function ExprEvalPushStep

src/backend/executor/execExpr.c:2521–2537  ·  view source on GitHub ↗

* Add another expression evaluation step to ExprState->steps. * * Note that this potentially re-allocates es->steps, therefore no pointer * into that array may be used while the expression is still being built. */

Source from the content-addressed store, hash-verified

2519 * into that array may be used while the expression is still being built.
2520 */
2521void
2522ExprEvalPushStep(ExprState *es, const ExprEvalStep *s)
2523{
2524 if (es->steps_alloc == 0)
2525 {
2526 es->steps_alloc = 16;
2527 es->steps = palloc(sizeof(ExprEvalStep) * es->steps_alloc);
2528 }
2529 else if (es->steps_alloc == es->steps_len)
2530 {
2531 es->steps_alloc *= 2;
2532 es->steps = repalloc(es->steps,
2533 sizeof(ExprEvalStep) * es->steps_alloc);
2534 }
2535
2536 memcpy(&es->steps[es->steps_len++], s, sizeof(ExprEvalStep));
2537}
2538
2539/*
2540 * Perform setup necessary for the evaluation of a function-like expression,

Callers 15

plpgsql_param_compileFunction · 0.85
ExecInitExprFunction · 0.85
ExecInitExprWithParamsFunction · 0.85
ExecInitQualFunction · 0.85
ExecBuildProjectionInfoFunction · 0.85
ExecInitExprRecFunction · 0.85
ExecPushExprSlotsFunction · 0.85
ExecInitSubscriptingRefFunction · 0.85
ExecInitCoerceToDomainFunction · 0.85
ExecBuildAggTransFunction · 0.85

Calls 2

pallocFunction · 0.50
repallocFunction · 0.50

Tested by

no test coverage detected