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

Function ExecEndFunctionScan

src/backend/executor/nodeFunctionscan.c:659–681  ·  view source on GitHub ↗

---------------------------------------------------------------- * ExecEndFunctionScan * * frees any storage allocated through C routines. * ---------------------------------------------------------------- */

Source from the content-addressed store, hash-verified

657 * ----------------------------------------------------------------
658 */
659void
660ExecEndFunctionScan(FunctionScanState *node)
661{
662 /*
663 * Free the exprcontext
664 */
665 ExecFreeExprContext(&node->ss.ps);
666
667 /*
668 * clean out the tuple table
669 */
670 if (node->ss.ps.ps_ResultTupleSlot)
671 ExecClearTuple(node->ss.ps.ps_ResultTupleSlot);
672 ExecClearTuple(node->ss.ss_ScanTupleSlot);
673
674 ExecEagerFreeFunctionScan(node);
675
676 /*
677 * destroy tuplestore reader if exists
678 */
679 if (node->ts_state != NULL)
680 tuplestore_end(node->ts_state);
681}
682
683/* ----------------------------------------------------------------
684 * ExecReScanFunctionScan

Callers 1

ExecEndNodeFunction · 0.85

Calls 4

ExecFreeExprContextFunction · 0.85
ExecClearTupleFunction · 0.85
tuplestore_endFunction · 0.85

Tested by

no test coverage detected