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

Function ExecPrepareExpr

src/backend/executor/execExpr.c:757–772  ·  view source on GitHub ↗

* ExecPrepareExpr --- initialize for expression execution outside a normal * Plan tree context. * * This differs from ExecInitExpr in that we don't assume the caller is * already running in the EState's per-query context. Also, we run the * passed expression tree through expression_planner() to prepare it for * execution. (In ordinary Plan trees the regular planning process will have * ma

Source from the content-addressed store, hash-verified

755 * expressions this won't have happened.)
756 */
757ExprState *
758ExecPrepareExpr(Expr *node, EState *estate)
759{
760 ExprState *result;
761 MemoryContext oldcontext;
762
763 oldcontext = MemoryContextSwitchTo(estate->es_query_cxt);
764
765 node = expression_planner(node);
766
767 result = ExecInitExpr(node, NULL);
768
769 MemoryContextSwitchTo(oldcontext);
770
771 return result;
772}
773
774/*
775 * ExecPrepareQual --- initialize for qual execution outside a normal

Callers 12

compute_expr_statsFunction · 0.85
validateDomainConstraintFunction · 0.85
ExecuteCallStmtFunction · 0.85
ATAocsWriteNewColumnsFunction · 0.85
ATRewriteTableFunction · 0.85
ExecRelCheckFunction · 0.85
ExecPrepareExprListFunction · 0.85
StoreAttrDefaultFunction · 0.85
ExternalConstraintCheckFunction · 0.85

Calls 3

MemoryContextSwitchToFunction · 0.85
expression_plannerFunction · 0.85
ExecInitExprFunction · 0.85

Tested by

no test coverage detected