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

Function create_seqscan_path

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

* create_seqscan_path * Creates a path corresponding to a sequential scan, returning the * pathnode. */

Source from the content-addressed store, hash-verified

1023 * pathnode.
1024 */
1025Path *
1026create_seqscan_path(PlannerInfo *root, RelOptInfo *rel,
1027 Relids required_outer, int parallel_workers)
1028{
1029 Path *pathnode = makeNode(Path);
1030
1031 pathnode->pathtype = T_SeqScan;
1032 pathnode->parent = rel;
1033 pathnode->pathtarget = rel->reltarget;
1034 pathnode->param_info = get_baserel_parampathinfo(root, rel,
1035 required_outer);
1036 pathnode->parallel_aware = parallel_workers > 0 ? true : false;
1037 pathnode->parallel_safe = rel->consider_parallel;
1038 pathnode->pathkeys = NIL; /* seqscan has unordered result */
1039
1040 pathnode->locus = cdbpathlocus_from_baserel(root, rel, parallel_workers);
1041 pathnode->parallel_workers = pathnode->locus.parallel_workers;
1042 pathnode->motionHazard = false;
1043 pathnode->barrierHazard = false;
1044 pathnode->rescannable = true;
1045 pathnode->sameslice_relids = rel->relids;
1046
1047 cost_seqscan(pathnode, root, rel, pathnode->param_info);
1048
1049 return pathnode;
1050}
1051
1052/*
1053 * create_samplescan_path

Callers 5

plan_cluster_use_sortFunction · 0.85
set_plain_rel_pathlistFunction · 0.85
reparameterize_pathFunction · 0.85
set_plain_rel_pathlistFunction · 0.85

Calls 3

cost_seqscanFunction · 0.85

Tested by

no test coverage detected