* create_index_path * Creates a path node for an index scan. * * 'index' is a usable index. * 'indexclauses' is a list of IndexClause nodes representing clauses * to be enforced as qual conditions in the scan. * 'indexorderbys' is a list of bare expressions (no RestrictInfos) * to be used as index ordering operators in the scan. * 'indexorderbycols' is an integer list of index column
| 1103 | * Returns the new path node. |
| 1104 | */ |
| 1105 | IndexPath * |
| 1106 | create_index_path(PlannerInfo *root, |
| 1107 | IndexOptInfo *index, |
| 1108 | List *indexclauses, |
| 1109 | List *indexorderbys, |
| 1110 | List *indexorderbycols, |
| 1111 | List *pathkeys, |
| 1112 | ScanDirection indexscandir, |
| 1113 | bool indexonly, |
| 1114 | Relids required_outer, |
| 1115 | double loop_count, |
| 1116 | bool partial_path) |
| 1117 | { |
| 1118 | IndexPath *pathnode = makeNode(IndexPath); |
| 1119 | RelOptInfo *rel = index->rel; |
| 1120 | |
| 1121 | pathnode->path.pathtype = indexonly ? T_IndexOnlyScan : T_IndexScan; |
| 1122 | pathnode->path.parent = rel; |
| 1123 | pathnode->path.pathtarget = rel->reltarget; |
| 1124 | pathnode->path.param_info = get_baserel_parampathinfo(root, rel, |
| 1125 | required_outer); |
| 1126 | pathnode->path.parallel_aware = false; |
| 1127 | /* GPDB_12_MERGE_FEATURE_NOT_SUPPORTED: the parallel StreamBitmap scan is not implemented */ |
| 1128 | pathnode->path.parallel_safe = rel->consider_parallel && !IsIndexAccessMethod(index->relam, BITMAP_AM_OID); |
| 1129 | pathnode->path.parallel_workers = 0; |
| 1130 | pathnode->path.pathkeys = pathkeys; |
| 1131 | |
| 1132 | pathnode->indexinfo = index; |
| 1133 | pathnode->indexclauses = indexclauses; |
| 1134 | pathnode->indexorderbys = indexorderbys; |
| 1135 | pathnode->indexorderbycols = indexorderbycols; |
| 1136 | pathnode->indexscandir = indexscandir; |
| 1137 | |
| 1138 | /* Distribution is same as the base table. */ |
| 1139 | pathnode->path.motionHazard = false; |
| 1140 | pathnode->path.barrierHazard = false; |
| 1141 | pathnode->path.rescannable = true; |
| 1142 | pathnode->path.sameslice_relids = rel->relids; |
| 1143 | |
| 1144 | cost_index(pathnode, root, loop_count, partial_path); |
| 1145 | |
| 1146 | pathnode->path.locus = cdbpathlocus_from_baserel(root, rel, partial_path ? pathnode->path.parallel_workers : 0); |
| 1147 | |
| 1148 | return pathnode; |
| 1149 | } |
| 1150 | |
| 1151 | /* |
| 1152 | * create_bitmap_heap_path |
no test coverage detected