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

Function create_bitmap_heap_path

src/backend/optimizer/util/pathnode.c:1163–1197  ·  view source on GitHub ↗

* create_bitmap_heap_path * Creates a path node for a bitmap scan. * * 'bitmapqual' is a tree of IndexPath, BitmapAndPath, and BitmapOrPath nodes. * 'required_outer' is the set of outer relids for a parameterized path. * 'loop_count' is the number of repetitions of the indexscan to factor into * estimates of caching behavior. * * loop_count should match the value used when creating the

Source from the content-addressed store, hash-verified

1161 * IndexPaths.
1162 */
1163BitmapHeapPath *
1164create_bitmap_heap_path(PlannerInfo *root,
1165 RelOptInfo *rel,
1166 Path *bitmapqual,
1167 Relids required_outer,
1168 double loop_count,
1169 int parallel_degree)
1170{
1171 BitmapHeapPath *pathnode = makeNode(BitmapHeapPath);
1172
1173 pathnode->path.pathtype = T_BitmapHeapScan;
1174 pathnode->path.parent = rel;
1175 pathnode->path.pathtarget = rel->reltarget;
1176 pathnode->path.param_info = get_baserel_parampathinfo(root, rel,
1177 required_outer);
1178 pathnode->path.parallel_aware = parallel_degree > 0 ? true : false;
1179 pathnode->path.parallel_safe = rel->consider_parallel;
1180 pathnode->path.pathkeys = NIL; /* always unordered */
1181
1182 /* Distribution is same as the base table. */
1183 pathnode->path.locus = cdbpathlocus_from_baserel(root, rel, parallel_degree);
1184 pathnode->path.parallel_workers = pathnode->path.locus.parallel_workers;
1185 pathnode->path.motionHazard = false;
1186 pathnode->path.barrierHazard = false;
1187 pathnode->path.rescannable = true;
1188 pathnode->path.sameslice_relids = rel->relids;
1189
1190 pathnode->bitmapqual = bitmapqual;
1191
1192 cost_bitmap_heap_scan(&pathnode->path, root, rel,
1193 pathnode->path.param_info,
1194 bitmapqual, loop_count);
1195
1196 return pathnode;
1197}
1198
1199/*
1200 * create_bitmap_and_path

Callers 3

create_index_pathsFunction · 0.85
reparameterize_pathFunction · 0.85

Calls 3

cost_bitmap_heap_scanFunction · 0.85

Tested by

no test coverage detected