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

xuba pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/amoro.git


The following commit(s) were added to refs/heads/master by this push:
     new b81d3e104 [Hotfix] Set table properties in GenericTaskWriters (#3442)
b81d3e104 is described below

commit b81d3e104de235cf2b5bf4e12a602959af36a2b3
Author: Xu Bai <[email protected]>
AuthorDate: Tue Feb 25 19:51:07 2025 +0800

    [Hotfix] Set table properties in GenericTaskWriters (#3442)
    
    * set table properties in GenericTaskWriters
    
    * update stats
---
 .../main/java/org/apache/amoro/io/writer/GenericTaskWriters.java    | 6 +++---
 .../src/test/java/org/apache/amoro/trino/mixed/TestKeyedTable.java  | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git 
a/amoro-format-iceberg/src/main/java/org/apache/amoro/io/writer/GenericTaskWriters.java
 
b/amoro-format-iceberg/src/main/java/org/apache/amoro/io/writer/GenericTaskWriters.java
index 7a655092a..5857402f5 100644
--- 
a/amoro-format-iceberg/src/main/java/org/apache/amoro/io/writer/GenericTaskWriters.java
+++ 
b/amoro-format-iceberg/src/main/java/org/apache/amoro/io/writer/GenericTaskWriters.java
@@ -131,7 +131,7 @@ public class GenericTaskWriters {
               - 1;
       return new GenericBaseTaskWriter(
           fileFormat,
-          new GenericAppenderFactory(base.schema(), table.spec()),
+          new GenericAppenderFactory(base.schema(), 
table.spec()).setAll(table.properties()),
           new CommonOutputFileFactory(
               base.location(),
               table.spec(),
@@ -161,7 +161,7 @@ public class GenericTaskWriters {
                       TableProperties.BASE_FILE_FORMAT, 
TableProperties.BASE_FILE_FORMAT_DEFAULT)
                   .toUpperCase(Locale.ENGLISH)));
       GenericAppenderFactory appenderFactory =
-          new GenericAppenderFactory(base.schema(), table.spec());
+          new GenericAppenderFactory(base.schema(), 
table.spec()).setAll(table.properties());
       appenderFactory.set(
           org.apache.iceberg.TableProperties.METRICS_MODE_COLUMN_CONF_PREFIX
               + MetadataColumns.DELETE_FILE_PATH.name(),
@@ -219,7 +219,7 @@ public class GenericTaskWriters {
       Schema changeWriteSchema = SchemaUtil.changeWriteSchema(change.schema());
       return new GenericChangeTaskWriter(
           fileFormat,
-          new GenericAppenderFactory(changeWriteSchema, table.spec()),
+          new GenericAppenderFactory(changeWriteSchema, 
table.spec()).setAll(table.properties()),
           new CommonOutputFileFactory(
               change.location(),
               table.spec(),
diff --git 
a/amoro-format-mixed/amoro-mixed-trino/src/test/java/org/apache/amoro/trino/mixed/TestKeyedTable.java
 
b/amoro-format-mixed/amoro-mixed-trino/src/test/java/org/apache/amoro/trino/mixed/TestKeyedTable.java
index a6e474f3c..a33f05ab2 100644
--- 
a/amoro-format-mixed/amoro-mixed-trino/src/test/java/org/apache/amoro/trino/mixed/TestKeyedTable.java
+++ 
b/amoro-format-mixed/amoro-mixed-trino/src/test/java/org/apache/amoro/trino/mixed/TestKeyedTable.java
@@ -62,7 +62,7 @@ public class TestKeyedTable extends 
TableTestBaseWithInitDataForTrino {
         .matches(
             "VALUES "
                 + "('id', NULL, NULL, 0e0, NULL, '1', '4'), "
-                + "('name$name', 548e0, NULL, 0e0, NULL, NULL, NULL), "
+                + "('name$name', 429e0, NULL, 0e0, NULL, NULL, NULL), "
                 + "('op_time', NULL, NULL, 0e0, NULL, '2022-01-01 
12:00:00.000000', '2022-01-04 12:00:00.000000'), "
                 + "(NULL, NULL, NULL, NULL, 4e0, NULL, NULL)");
   }

Reply via email to