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

Function ExecProject

src/include/executor/executor.h:401–426  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

399 */
400#ifndef FRONTEND
401static inline TupleTableSlot *
402ExecProject(ProjectionInfo *projInfo)
403{
404 ExprContext *econtext = projInfo->pi_exprContext;
405 ExprState *state = &projInfo->pi_state;
406 TupleTableSlot *slot = state->resultslot;
407 bool isnull;
408
409 /*
410 * Clear any former contents of the result slot. This makes it safe for
411 * us to use the slot's Datum/isnull arrays as workspace.
412 */
413 ExecClearTuple(slot);
414
415 /* Run the expression, discarding scalar result from the last column. */
416 (void) ExecEvalExprSwitchContext(state, econtext, &isnull);
417
418 /*
419 * Successfully formed a result row. Mark the result slot as containing a
420 * valid virtual tuple (inlined version of ExecStoreVirtualTuple()).
421 */
422 slot->tts_flags &= ~TTS_FLAG_EMPTY;
423 slot->tts_nvalid = slot->tts_tupleDescriptor->natts;
424
425 return slot;
426}
427#endif
428
429/*

Callers 15

MJFillOuterFunction · 0.85
MJFillInnerFunction · 0.85
ExecMergeJoin_gutsFunction · 0.85
ExecWindowAggFunction · 0.85
ExecAssertOpFunction · 0.85
ExecResultFunction · 0.85
ExecProcessReturningFunction · 0.85
ExecGetInsertNewTupleFunction · 0.85
ExecGetUpdateNewTupleFunction · 0.85
ExecOnConflictUpdateFunction · 0.85
ExecGatherMergeFunction · 0.85
ExecTupleSplitFunction · 0.85

Calls 2

ExecClearTupleFunction · 0.85

Tested by

no test coverage detected