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

Function create_subqueryscan_path

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

* create_subqueryscan_path * Creates a path corresponding to a scan of a subquery, * returning the pathnode. */

Source from the content-addressed store, hash-verified

3041 * returning the pathnode.
3042 */
3043SubqueryScanPath *
3044create_subqueryscan_path(PlannerInfo *root, RelOptInfo *rel, Path *subpath,
3045 List *pathkeys, CdbPathLocus locus, Relids required_outer)
3046{
3047 SubqueryScanPath *pathnode = makeNode(SubqueryScanPath);
3048
3049 pathnode->path.pathtype = T_SubqueryScan;
3050 pathnode->path.parent = rel;
3051 pathnode->path.pathtarget = rel->reltarget;
3052 pathnode->path.param_info = get_baserel_parampathinfo(root, rel,
3053 required_outer);
3054 pathnode->path.parallel_aware = false;
3055 pathnode->path.parallel_safe = rel->consider_parallel &&
3056 subpath->parallel_safe;
3057 pathnode->path.parallel_workers = subpath->parallel_workers;
3058 pathnode->path.pathkeys = pathkeys;
3059 pathnode->subpath = subpath;
3060
3061 pathnode->path.locus = locus;
3062 pathnode->path.motionHazard = subpath->motionHazard;
3063 pathnode->path.barrierHazard = subpath->barrierHazard;
3064 pathnode->path.rescannable = false;
3065 pathnode->path.sameslice_relids = NULL;
3066
3067 pathnode->required_outer = bms_copy(required_outer);
3068 cost_subqueryscan(pathnode, root, rel, pathnode->path.param_info);
3069
3070 return pathnode;
3071}
3072
3073/*
3074 * create_functionscan_path

Callers 4

recurse_set_operationsFunction · 0.85
set_subquery_pathlistFunction · 0.85
reparameterize_pathFunction · 0.85

Calls 3

bms_copyFunction · 0.85
cost_subqueryscanFunction · 0.85

Tested by

no test coverage detected