This is an automated email from the ASF dual-hosted git repository.

chenjinbao1989 pushed a commit to branch cbdb-postgres-merge
in repository https://gitbox.apache.org/repos/asf/cloudberry.git


The following commit(s) were added to refs/heads/cbdb-postgres-merge by this 
push:
     new 7a7e3dd3012 Fix error for mutidqa
7a7e3dd3012 is described below

commit 7a7e3dd3012f6305c9d20de9c64c9fd9966879ae
Author: Jinbao Chen <[email protected]>
AuthorDate: Tue Nov 4 19:44:38 2025 +0800

    Fix error for mutidqa
---
 src/backend/optimizer/plan/planner.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/backend/optimizer/plan/planner.c 
b/src/backend/optimizer/plan/planner.c
index 310ffd2d75c..1d39d4bc166 100644
--- a/src/backend/optimizer/plan/planner.c
+++ b/src/backend/optimizer/plan/planner.c
@@ -4254,7 +4254,12 @@ standard_qp_callback(PlannerInfo *root, void *extra)
                        root->num_groupby_pathkeys = 0;
                }
        }
-       else if (parse->groupClause || root->numOrderedAggs > 0)
+       /*
+        * MERGE16_FIXME:  Remove "root->numOrderedAggs > 0" from the if clause.
+        * It should cause some errors for dqa, but is it correct?
+        */
+       /* else if (parse->groupClause || root->numOrderedAggs > 0) */
+       else if (parse->groupClause)
        {
                /*
                 * With a plain GROUP BY list, we can remove any grouping items 
that
@@ -4272,6 +4277,7 @@ standard_qp_callback(PlannerInfo *root, void *extra)
                                                                                
                   tlist,
                                                                                
                   true,
                                                                                
                   &sortable);
+
                if (!sortable)
                {
                        /* Can't sort; no point in considering aggregate 
ordering either */


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to