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

Function ExecEagerFreeSort

src/backend/executor/nodeSort.c:458–484  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

456} /* ExecSortExplainEnd */
457
458static void
459ExecEagerFreeSort(SortState *node)
460{
461 /* clean out the tuple table */
462 ExecClearTuple(node->ss.ss_ScanTupleSlot);
463
464 /* must drop pointer to sort result tuple */
465 ExecClearTuple(node->ss.ps.ps_ResultTupleSlot);
466
467 if (node->tuplesortstate != NULL)
468 {
469 /*
470 * Save stats like in ExecSortExplainEnd, so that we can display
471 * them later in EXPLAIN ANALYZE.
472 */
473 tuplesort_get_stats(node->tuplesortstate,
474 &node->sortstats);
475 if (node->ss.ps.instrument)
476 {
477 node->ss.ps.instrument->workfileCreated = (node->sortstats.spaceType == SORT_SPACE_TYPE_DISK);
478 node->ss.ps.instrument->workmemused = node->sortstats.workmemused;
479 }
480
481 tuplesort_end((Tuplesortstate *) node->tuplesortstate);
482 node->tuplesortstate = NULL;
483 }
484}
485
486void
487ExecSquelchSort(SortState *node, bool force)

Callers 3

ExecSortFunction · 0.85
ExecEndSortFunction · 0.85
ExecSquelchSortFunction · 0.85

Calls 3

ExecClearTupleFunction · 0.85
tuplesort_get_statsFunction · 0.85
tuplesort_endFunction · 0.85

Tested by

no test coverage detected