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

Function EvalPlanQualSlot

src/backend/executor/execMain.c:3731–3751  ·  view source on GitHub ↗

* Return, and create if necessary, a slot for an EPQ test tuple. * * Note this only requires EvalPlanQualInit() to have been called, * EvalPlanQualBegin() is not necessary. */

Source from the content-addressed store, hash-verified

3729 * EvalPlanQualBegin() is not necessary.
3730 */
3731TupleTableSlot *
3732EvalPlanQualSlot(EPQState *epqstate,
3733 Relation relation, Index rti)
3734{
3735 TupleTableSlot **slot;
3736
3737 Assert(relation);
3738 Assert(rti > 0 && rti <= epqstate->parentestate->es_range_table_size);
3739 slot = &epqstate->relsubs_slot[rti - 1];
3740
3741 if (*slot == NULL)
3742 {
3743 MemoryContext oldcontext;
3744
3745 oldcontext = MemoryContextSwitchTo(epqstate->parentestate->es_query_cxt);
3746 *slot = table_slot_create(relation, &epqstate->tuple_table);
3747 MemoryContextSwitchTo(oldcontext);
3748 }
3749
3750 return *slot;
3751}
3752
3753/*
3754 * Fetch the current row value for a non-locked relation, identified by rti,

Callers 4

EvalPlanQualFunction · 0.85
ExecDeleteFunction · 0.85
ExecUpdateFunction · 0.85
ExecLockRowsFunction · 0.85

Calls 2

MemoryContextSwitchToFunction · 0.85
table_slot_createFunction · 0.85

Tested by

no test coverage detected