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

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

commit 88552c820aef8e18dca328fd6b147b0765bc5983
Author: reshke <[email protected]>
AuthorDate: Wed Jan 22 06:24:27 2025 +0000

    Fix populate_rel_col_encodings
---
 src/backend/commands/tablecmds.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c
index 437b2d31fe..6d196fb21a 100644
--- a/src/backend/commands/tablecmds.c
+++ b/src/backend/commands/tablecmds.c
@@ -4826,6 +4826,7 @@ static void populate_rel_col_encodings(Relation rel, List 
*stenc, List *withOpti
 {
        int             attno;
        List            *colDefs = NIL;
+       const TableAmRoutine *tam;
        TupleDesc       tupdesc = RelationGetDescr(rel);
 
        /* Figure out the column definition list. */
@@ -4839,12 +4840,16 @@ static void populate_rel_col_encodings(Relation rel, 
List *stenc, List *withOpti
                colDefs = lappend(colDefs, cd);
        }
 
-       List *attr_encodings = transformColumnEncoding(rel,
+       tam = GetTableAmRoutineByAmId(rel->rd_rel->relam);
+
+       List *attr_encodings = transformColumnEncoding(tam /* TableAmRoutine 
*/, rel,
                                                        colDefs /*column 
clauses*/,
                                                        stenc /*encoding 
clauses*/,
                                                        withOptions 
/*withOptions*/,
-                                                       rel->rd_rel->relkind == 
RELKIND_PARTITIONED_TABLE /*rootpartition*/,
-                                                       false 
/*errorOnEncodingClause*/);
+                                                       NULL,
+                                                       false,
+                                                       RelationIsAoCols(rel));
+
        AddRelationAttributeEncodings(rel, attr_encodings);
 }
 


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

Reply via email to