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

Function endCurrentIndexScan

src/backend/executor/execDynamicIndexes.c:204–222  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

202}
203
204static void
205endCurrentIndexScan(DynamicIndexScanState *node)
206{
207 if (node->indexScanState)
208 {
209 ExecEndIndexScan(node->indexScanState);
210 node->indexScanState = NULL;
211 table_close(node->ss.ss_currentRelation, NoLock);
212 }
213 else if (node->indexOnlyScanState)
214 {
215 ExecEndIndexOnlyScan(node->indexOnlyScanState);
216 node->indexOnlyScanState = NULL;
217 table_close(node->ss.ss_currentRelation, NoLock);
218 }
219 ExecResetTupleTable(node->tuptable, true);
220 node->tuptable = NIL;
221 MemoryContextReset(node->partitionMemoryContext);
222}
223
224/*
225 * This function initializes a part and returns true if a new index has been prepared for scanning.

Callers 3

initNextIndexToScanFunction · 0.85
ExecNextDynamicIndexScanFunction · 0.85
ExecEndDynamicIndexScanFunction · 0.85

Calls 5

ExecEndIndexScanFunction · 0.85
table_closeFunction · 0.85
ExecEndIndexOnlyScanFunction · 0.85
ExecResetTupleTableFunction · 0.85
MemoryContextResetFunction · 0.85

Tested by

no test coverage detected