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

avamingli pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudberry.git

commit 5851f9876b6b6bed9177785e1cdc40feef2164fd
Author: chaotian <[email protected]>
AuthorDate: Mon May 29 15:37:53 2023 +0800

    Remove fixme from cdbpathlocus_for_insert (#15574)
    
    The codes around FIXME tend to figure out bugs as merging from upstream.
    ```
    if (pathtarget->sortgrouprefs[attno - 1] == 0 &&
            contain_volatile_functions((Node *) expr))
    {
            /*
             * GPDB_96_MERGE_FIXME: this modifies the subpath's targetlist in 
place.
             * That's a bit ugly.
             */
            pathtarget->sortgrouprefs[attno - 1] = ++maxRef;
    }
    ```
    If we don't have these codes, ERROR **"volatile EquivalenceClass has no 
sortref"** is raised.
    That's caused by an assumption that has been added to solve issues in 
upstream.
---
 src/backend/cdb/cdbpathlocus.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/backend/cdb/cdbpathlocus.c b/src/backend/cdb/cdbpathlocus.c
index b148761350..3ba08d977d 100644
--- a/src/backend/cdb/cdbpathlocus.c
+++ b/src/backend/cdb/cdbpathlocus.c
@@ -259,8 +259,7 @@ cdbpathlocus_for_insert(PlannerInfo *root, GpPolicy *policy,
                        contain_volatile_functions((Node *) expr))
                {
                        /*
-                        * GPDB_96_MERGE_FIXME: this modifies the subpath's 
targetlist in place.
-                        * That's a bit ugly.
+                        * sortgrouprefs should never be zero if the expression 
is volatile!
                         */
                        pathtarget->sortgrouprefs[attno - 1] = ++maxRef;
                }


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

Reply via email to