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

Function ExecPrepareQual

src/backend/executor/execExpr.c:785–800  ·  view source on GitHub ↗

* ExecPrepareQual --- initialize for qual execution outside a normal * Plan tree context. * * This differs from ExecInitQual 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 * made the

Source from the content-addressed store, hash-verified

783 * expressions this won't have happened.)
784 */
785ExprState *
786ExecPrepareQual(List *qual, EState *estate)
787{
788 ExprState *result;
789 MemoryContext oldcontext;
790
791 oldcontext = MemoryContextSwitchTo(estate->es_query_cxt);
792
793 qual = (List *) expression_planner((Expr *) qual);
794
795 result = ExecInitQual(qual, NULL);
796
797 MemoryContextSwitchTo(oldcontext);
798
799 return result;
800}
801
802/*
803 * ExecPrepareCheck -- initialize check constraint for execution outside a

Callers 10

IndexBuildRangeScanMethod · 0.85
compute_index_statsFunction · 0.85
TriggerEnabledFunction · 0.85
ExecInsertIndexTuplesFunction · 0.85
IndexCheckExclusionFunction · 0.85

Calls 3

MemoryContextSwitchToFunction · 0.85
expression_plannerFunction · 0.85
ExecInitQualFunction · 0.85

Tested by

no test coverage detected