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

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

commit a23a337df66155716e60e184a76026cd0abd4ad6
Author: liushengsong <[email protected]>
AuthorDate: Wed Apr 22 14:50:13 2026 +0800

    Fix: adapt ORCA AggInfo to PG16 API changes
    
    PG16 replaced AggInfo.representative_aggref (single pointer) with
    AggInfo.aggrefs (List). Also use makeNode(AggInfo) instead of raw
    GPDBAlloc to properly initialize NodeTag.
---
 src/backend/gpopt/translate/CTranslatorDXLToPlStmt.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/backend/gpopt/translate/CTranslatorDXLToPlStmt.cpp 
b/src/backend/gpopt/translate/CTranslatorDXLToPlStmt.cpp
index b11256369a6..42d3487a925 100644
--- a/src/backend/gpopt/translate/CTranslatorDXLToPlStmt.cpp
+++ b/src/backend/gpopt/translate/CTranslatorDXLToPlStmt.cpp
@@ -2856,10 +2856,10 @@ 
CTranslatorDXLToPlStmt::TranslateAggFillInfo(CContextDXLToPlStmt *ctx,
        }
        else
        {
-               AggInfo *agginfo = (AggInfo *) gpdb::GPDBAlloc(sizeof(AggInfo));
+               AggInfo *agginfo = makeNode(AggInfo);
 
                agginfo->finalfn_oid = aggfinalfn;
-               agginfo->representative_aggref = aggref;
+               agginfo->aggrefs = list_make1(aggref);
                agginfo->shareable = shareable;
 
                aggno = gpdb::ListLength(ctx->GetAggInfos());


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

Reply via email to