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

Function create_material_path

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

* create_material_path * Creates a path corresponding to a Material plan, returning the * pathnode. */

Source from the content-addressed store, hash-verified

2235 * pathnode.
2236 */
2237MaterialPath *
2238create_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

Callers 5

bring_to_singleQEFunction · 0.85
match_unsorted_outerFunction · 0.85
create_nestloop_pathFunction · 0.85

Calls 1

cost_materialFunction · 0.85

Tested by

no test coverage detected