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

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


The following commit(s) were added to refs/heads/master by this push:
     new 436639a86f6 HIVE-28543: Iceberg: Previous snapshotId is stored in 
backend database (Raghav Aggarwal, reviewed by Ayush Saxena, Butao Zhang, Denys 
Kuzmenko)
436639a86f6 is described below

commit 436639a86f6099fe9a4e692a0b88db906064a450
Author: Raghav Aggarwal <[email protected]>
AuthorDate: Thu Oct 10 00:47:06 2024 +0530

    HIVE-28543: Iceberg: Previous snapshotId is stored in backend database 
(Raghav Aggarwal, reviewed by Ayush Saxena, Butao Zhang, Denys Kuzmenko)
    
    This commit is essentially the revert of HIVE-27049
    
    Closes #5475
---
 .../main/java/org/apache/iceberg/mr/hive/HiveIcebergMetaHook.java    | 5 -----
 1 file changed, 5 deletions(-)

diff --git 
a/iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergMetaHook.java
 
b/iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergMetaHook.java
index bb44b86734c..b82143954d6 100644
--- 
a/iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergMetaHook.java
+++ 
b/iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergMetaHook.java
@@ -89,7 +89,6 @@ import org.apache.iceberg.PartitionSpecParser;
 import org.apache.iceberg.PartitionsTable;
 import org.apache.iceberg.Schema;
 import org.apache.iceberg.SchemaParser;
-import org.apache.iceberg.Snapshot;
 import org.apache.iceberg.Table;
 import org.apache.iceberg.TableMetadata;
 import org.apache.iceberg.TableMetadataParser;
@@ -1062,10 +1061,6 @@ public class HiveIcebergMetaHook implements HiveMetaHook 
{
     if (hmsTable != null) {
       try {
         Table tbl = IcebergTableUtil.getTable(conf, hmsTable);
-        Snapshot snapshot = tbl.currentSnapshot();
-        if (snapshot != null) {
-          hmsTable.getParameters().put("current-snapshot-id", 
String.valueOf(snapshot.snapshotId()));
-        }
         String formatVersion = String.valueOf(((BaseTable) 
tbl).operations().current().formatVersion());
         hmsTable.getParameters().put(TableProperties.FORMAT_VERSION, 
formatVersion);
         // Set the serde info

Reply via email to