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

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


The following commit(s) were added to refs/heads/master by this push:
     new 9a087f6c1e [iceberg] Use latest schema when creating and updating Hive 
table (#6655)
9a087f6c1e is described below

commit 9a087f6c1e554250bdbe6c14657c6fb50ba4688f
Author: siadat <[email protected]>
AuthorDate: Mon Nov 24 08:07:22 2025 +0000

    [iceberg] Use latest schema when creating and updating Hive table (#6655)
---
 .../java/org/apache/paimon/iceberg/IcebergHiveMetadataCommitter.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/paimon-hive/paimon-hive-catalog/src/main/java/org/apache/paimon/iceberg/IcebergHiveMetadataCommitter.java
 
b/paimon-hive/paimon-hive-catalog/src/main/java/org/apache/paimon/iceberg/IcebergHiveMetadataCommitter.java
index 944cc94398..0e7e3adb05 100644
--- 
a/paimon-hive/paimon-hive-catalog/src/main/java/org/apache/paimon/iceberg/IcebergHiveMetadataCommitter.java
+++ 
b/paimon-hive/paimon-hive-catalog/src/main/java/org/apache/paimon/iceberg/IcebergHiveMetadataCommitter.java
@@ -161,7 +161,7 @@ public class IcebergHiveMetadataCommitter implements 
IcebergMetadataCommitter {
 
         StorageDescriptor sd = hiveTable.getSd();
         sd.setCols(
-                table.schema().fields().stream()
+                table.copyWithLatestSchema().schema().fields().stream()
                         .map(this::convertToFieldSchema)
                         .collect(Collectors.toList()));
 
@@ -234,7 +234,7 @@ public class IcebergHiveMetadataCommitter implements 
IcebergMetadataCommitter {
         StorageDescriptor sd = hiveTable.getSd();
         sd.setLocation(metadataPath.getParent().getParent().toString());
         sd.setCols(
-                table.schema().fields().stream()
+                table.copyWithLatestSchema().schema().fields().stream()
                         .map(this::convertToFieldSchema)
                         .collect(Collectors.toList()));
         sd.setInputFormat("org.apache.hadoop.mapred.FileInputFormat");

Reply via email to