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

Function ExecConditionalAssignProjectionInfo

src/backend/executor/execUtils.c:611–636  ·  view source on GitHub ↗

---------------- * ExecConditionalAssignProjectionInfo * * as ExecAssignProjectionInfo, but store NULL rather than building projection * info if no projection is required * ---------------- */

Source from the content-addressed store, hash-verified

609 * ----------------
610 */
611void
612ExecConditionalAssignProjectionInfo(PlanState *planstate, TupleDesc inputDesc,
613 Index varno)
614{
615 if (tlist_matches_tupdesc(planstate,
616 planstate->plan->targetlist,
617 varno,
618 inputDesc))
619 {
620 planstate->ps_ProjInfo = NULL;
621 planstate->resultopsset = planstate->scanopsset;
622 planstate->resultopsfixed = planstate->scanopsfixed;
623 planstate->resultops = planstate->scanops;
624 }
625 else
626 {
627 if (!planstate->ps_ResultTupleSlot)
628 {
629 ExecInitResultSlot(planstate, &TTSOpsVirtual);
630 planstate->resultops = &TTSOpsVirtual;
631 planstate->resultopsfixed = true;
632 planstate->resultopsset = true;
633 }
634 ExecAssignProjectionInfo(planstate, inputDesc);
635 }
636}
637
638static bool
639tlist_matches_tupdesc(PlanState *ps, List *tlist, Index varno, TupleDesc tupdesc)

Callers 4

ExecInitGatherMergeFunction · 0.85
ExecInitGatherFunction · 0.85

Calls 3

tlist_matches_tupdescFunction · 0.85
ExecInitResultSlotFunction · 0.85
ExecAssignProjectionInfoFunction · 0.85

Tested by

no test coverage detected