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

Function ExecEndBitmapIndexScan

src/backend/executor/nodeBitmapIndexscan.c:212–242  ·  view source on GitHub ↗

---------------------------------------------------------------- * ExecEndBitmapIndexScan * ---------------------------------------------------------------- */

Source from the content-addressed store, hash-verified

210 * ----------------------------------------------------------------
211 */
212void
213ExecEndBitmapIndexScan(BitmapIndexScanState *node)
214{
215 Relation indexRelationDesc;
216 IndexScanDesc indexScanDesc;
217
218 /*
219 * extract information from the node
220 */
221 indexRelationDesc = node->biss_RelationDesc;
222 indexScanDesc = node->biss_ScanDesc;
223
224 /*
225 * Free the exprcontext(s) ... now dead code, see ExecFreeExprContext
226 *
227 * GPDB: This is not dead code in GPDB, because we don't want to leak
228 * exprcontexts in a dynamic bitmap index scan.
229 */
230#if 1
231 if (node->biss_RuntimeContext)
232 FreeExprContext(node->biss_RuntimeContext, true);
233#endif
234
235 /*
236 * close the index relation (no-op if we didn't open it)
237 */
238 if (indexScanDesc)
239 index_endscan(indexScanDesc);
240 if (indexRelationDesc)
241 index_close(indexRelationDesc, NoLock);
242}
243
244/* ----------------------------------------------------------------
245 * ExecInitBitmapIndexScan

Callers 3

ExecEndNodeFunction · 0.85

Calls 3

FreeExprContextFunction · 0.85
index_endscanFunction · 0.85
index_closeFunction · 0.85

Tested by

no test coverage detected