* create_material_path * Creates a path corresponding to a Material plan, returning the * pathnode. */
| 2235 | * pathnode. |
| 2236 | */ |
| 2237 | MaterialPath * |
| 2238 | create_material_path(RelOptInfo *rel, Path *subpath) |
| 2239 | { |
| 2240 | MaterialPath *pathnode = makeNode(MaterialPath); |
| 2241 | |
| 2242 | Assert(subpath->parent == rel); |
| 2243 | |
| 2244 | pathnode->path.pathtype = T_Material; |
| 2245 | pathnode->path.parent = rel; |
| 2246 | pathnode->path.pathtarget = rel->reltarget; |
| 2247 | pathnode->path.param_info = subpath->param_info; |
| 2248 | pathnode->path.parallel_aware = false; |
| 2249 | pathnode->path.parallel_safe = rel->consider_parallel && |
| 2250 | subpath->parallel_safe; |
| 2251 | pathnode->path.parallel_workers = subpath->parallel_workers; |
| 2252 | pathnode->path.pathkeys = subpath->pathkeys; |
| 2253 | |
| 2254 | pathnode->path.locus = subpath->locus; |
| 2255 | pathnode->path.motionHazard = subpath->motionHazard; |
| 2256 | pathnode->path.barrierHazard = subpath->barrierHazard; |
| 2257 | pathnode->cdb_strict = false; |
| 2258 | pathnode->path.rescannable = true; /* Independent of sub-path */ |
| 2259 | pathnode->path.sameslice_relids = subpath->sameslice_relids; |
| 2260 | |
| 2261 | pathnode->subpath = subpath; |
| 2262 | |
| 2263 | cost_material(&pathnode->path, |
| 2264 | subpath->startup_cost, |
| 2265 | subpath->total_cost, |
| 2266 | subpath->rows, |
| 2267 | subpath->pathtarget->width); |
| 2268 | |
| 2269 | return pathnode; |
| 2270 | } |
| 2271 | |
| 2272 | /* |
| 2273 | * create_memoize_path |
no test coverage detected