This is an automated email from the ASF dual-hosted git repository. yjhjstz pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/cloudberry.git
commit 72e22ec2e41c1a5a08cc19c37077940eec179f2e Author: xuejing zhao <[email protected]> AuthorDate: Thu Oct 26 10:52:50 2023 +0800 fix GPDB_96_MERGE_FIXME in create_ctescan_path (#16649) fixme in create_ctescan_path is as bellow: ``` // GPDB_96_MERGE_FIXME: Why do we set pathkeys in GPDB, but not in Postgres? // pathnode->pathkeys = NIL; /* XXX for now, result is always unordered */ pathnode->pathkeys = pathkeys; ``` By now we can not find the commit info of why we use pathkeys in GPDB, but not in Postgres. The codes "pathnode->pathkeys = pathkeys;" are already introduced after commit: 6b0e52bead. And I can not find much more infos in historical repos too. Sometimes we can reduce extra sort path when the pathkeys of cte node and the pathkeys of subpath node are the same. So we should keep these codes. Just remove GPDB_96_MERGE_FIXME. --- src/backend/optimizer/util/pathnode.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/backend/optimizer/util/pathnode.c b/src/backend/optimizer/util/pathnode.c index 5b6572e1e3..d8702cfa84 100644 --- a/src/backend/optimizer/util/pathnode.c +++ b/src/backend/optimizer/util/pathnode.c @@ -3402,8 +3402,6 @@ create_ctescan_path(PlannerInfo *root, RelOptInfo *rel, pathnode->parallel_aware = false; pathnode->parallel_safe = rel->consider_parallel; pathnode->parallel_workers = 0; - // GPDB_96_MERGE_FIXME: Why do we set pathkeys in GPDB, but not in Postgres? - // pathnode->pathkeys = NIL; /* XXX for now, result is always unordered */ pathnode->pathkeys = pathkeys; pathnode->locus = locus; --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
