---------------------------------------------------------------- * ExecEndBitmapIndexScan * ---------------------------------------------------------------- */
| 210 | * ---------------------------------------------------------------- |
| 211 | */ |
| 212 | void |
| 213 | ExecEndBitmapIndexScan(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 |
no test coverage detected