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

Function create_samplescan_path

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

* create_samplescan_path * Creates a path node for a sampled table scan. */

Source from the content-addressed store, hash-verified

1054 * Creates a path node for a sampled table scan.
1055 */
1056Path *
1057create_samplescan_path(PlannerInfo *root, RelOptInfo *rel, Relids required_outer)
1058{
1059 Path *pathnode = makeNode(Path);
1060
1061 pathnode->pathtype = T_SampleScan;
1062 pathnode->parent = rel;
1063 pathnode->pathtarget = rel->reltarget;
1064 pathnode->param_info = get_baserel_parampathinfo(root, rel,
1065 required_outer);
1066 pathnode->parallel_aware = false;
1067 pathnode->parallel_safe = rel->consider_parallel;
1068 pathnode->parallel_workers = 0;
1069 pathnode->pathkeys = NIL; /* samplescan has unordered result */
1070
1071 pathnode->locus = cdbpathlocus_from_baserel(root, rel, 0);
1072 pathnode->motionHazard = false;
1073 pathnode->barrierHazard = false;
1074 pathnode->rescannable = true;
1075 pathnode->sameslice_relids = rel->relids;
1076
1077 cost_samplescan(pathnode, root, rel, pathnode->param_info);
1078
1079 return pathnode;
1080}
1081
1082/*
1083 * create_index_path

Callers 2

reparameterize_pathFunction · 0.85

Calls 3

cost_samplescanFunction · 0.85

Tested by

no test coverage detected