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

Function ExecEndIndexOnlyScan

src/backend/executor/nodeIndexonlyscan.c:367–409  ·  view source on GitHub ↗

---------------------------------------------------------------- * ExecEndIndexOnlyScan * ---------------------------------------------------------------- */

Source from the content-addressed store, hash-verified

365 * ----------------------------------------------------------------
366 */
367void
368ExecEndIndexOnlyScan(IndexOnlyScanState *node)
369{
370 Relation indexRelationDesc;
371 IndexScanDesc indexScanDesc;
372
373 /*
374 * extract information from the node
375 */
376 indexRelationDesc = node->ioss_RelationDesc;
377 indexScanDesc = node->ioss_ScanDesc;
378
379 /* Release VM buffer pin, if any. */
380 if (node->ioss_VMBuffer != InvalidBuffer)
381 {
382 ReleaseBuffer(node->ioss_VMBuffer);
383 node->ioss_VMBuffer = InvalidBuffer;
384 }
385
386 /*
387 * Free the exprcontext(s) ... now dead code, see ExecFreeExprContext
388 */
389#ifdef NOT_USED
390 ExecFreeExprContext(&node->ss.ps);
391 if (node->ioss_RuntimeContext)
392 FreeExprContext(node->ioss_RuntimeContext, true);
393#endif
394
395 /*
396 * clear out tuple table slots
397 */
398 if (node->ss.ps.ps_ResultTupleSlot)
399 ExecClearTuple(node->ss.ps.ps_ResultTupleSlot);
400 ExecClearTuple(node->ss.ss_ScanTupleSlot);
401
402 /*
403 * close the index relation (no-op if we didn't open it)
404 */
405 if (indexScanDesc)
406 index_endscan(indexScanDesc);
407 if (indexRelationDesc)
408 index_close(indexRelationDesc, NoLock);
409}
410
411/* ----------------------------------------------------------------
412 * ExecIndexOnlyMarkPos

Callers 3

endCurrentIndexScanFunction · 0.85
ExecReScanDynamicIndexFunction · 0.85
ExecEndNodeFunction · 0.85

Calls 6

ReleaseBufferFunction · 0.85
ExecFreeExprContextFunction · 0.85
FreeExprContextFunction · 0.85
ExecClearTupleFunction · 0.85
index_endscanFunction · 0.85
index_closeFunction · 0.85

Tested by

no test coverage detected