nk1506 commented on code in PR #8907:
URL: https://github.com/apache/iceberg/pull/8907#discussion_r1462790142


##########
hive-metastore/src/main/java/org/apache/iceberg/hive/HiveTableOperations.java:
##########
@@ -341,19 +359,20 @@ private void setHmsTableParameters(
               String hmsKey = ICEBERG_TO_HMS_TRANSLATION.getOrDefault(key, 
key);
               parameters.put(hmsKey, entry.getValue());
             });
-    if (metadata.uuid() != null) {
-      parameters.put(TableProperties.UUID, metadata.uuid());
-    }
 
     // remove any props from HMS that are no longer present in Iceberg table 
props
     obsoleteProps.forEach(parameters::remove);
 
-    parameters.put(TABLE_TYPE_PROP, 
ICEBERG_TABLE_TYPE_VALUE.toUpperCase(Locale.ENGLISH));
-    parameters.put(METADATA_LOCATION_PROP, newMetadataLocation);
+    setHmsParameters(
+        tbl,
+        
BaseMetastoreTableOperations.ICEBERG_TABLE_TYPE_VALUE.toUpperCase(Locale.ENGLISH),
+        newMetadataLocation,
+        metadata.schema(),
+        metadata.uuid(),
+        obsoleteProps,
+        this::currentMetadataLocation);
 
-    if (currentMetadataLocation() != null && 
!currentMetadataLocation().isEmpty()) {
-      parameters.put(PREVIOUS_METADATA_LOCATION_PROP, 
currentMetadataLocation());
-    }
+    parameters.put(TABLE_TYPE_PROP, 
ICEBERG_TABLE_TYPE_VALUE.toUpperCase(Locale.ENGLISH));

Review Comment:
   I think in case of Hive-Table is should be always `ICEBERG_TABLE_TYPE_VALUE 
= "iceberg";`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to