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

Function ExecReScanTableFuncScan

src/backend/executor/nodeTableFuncscan.c:242–265  ·  view source on GitHub ↗

---------------------------------------------------------------- * ExecReScanTableFuncscan * * Rescans the relation. * ---------------------------------------------------------------- */

Source from the content-addressed store, hash-verified

240 * ----------------------------------------------------------------
241 */
242void
243ExecReScanTableFuncScan(TableFuncScanState *node)
244{
245 Bitmapset *chgparam = node->ss.ps.chgParam;
246
247 if (node->ss.ps.ps_ResultTupleSlot)
248 ExecClearTuple(node->ss.ps.ps_ResultTupleSlot);
249 ExecScanReScan(&node->ss);
250
251 /*
252 * Recompute when parameters are changed.
253 */
254 if (chgparam)
255 {
256 if (node->tupstore != NULL)
257 {
258 tuplestore_end(node->tupstore);
259 node->tupstore = NULL;
260 }
261 }
262
263 if (node->tupstore != NULL)
264 tuplestore_rescan(node->tupstore);
265}
266
267/* ----------------------------------------------------------------
268 * tfuncFetchRows

Callers 1

ExecReScanFunction · 0.85

Calls 4

ExecClearTupleFunction · 0.85
ExecScanReScanFunction · 0.85
tuplestore_endFunction · 0.85
tuplestore_rescanFunction · 0.85

Tested by

no test coverage detected