ramitg254 commented on code in PR #6413:
URL: https://github.com/apache/hive/pull/6413#discussion_r3415002867


##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergStorageHandler.java:
##########
@@ -2296,13 +2295,12 @@ public boolean 
canPerformMetadataDelete(org.apache.hadoop.hive.ql.metadata.Table
 
   @Override
   public List<FieldSchema> 
getPartitionKeys(org.apache.hadoop.hive.ql.metadata.Table hmsTable) {
-    if (BaseHiveIcebergMetaHook.isIcebergView(hmsTable.getTTable()) ||
-        !MetaStoreUtils.isIcebergTable(hmsTable.getParameters())) {
-      return hmsTable.getPartitionKeys();
-    }
     if (hmsTable.getMetaTable() != null || !hmsTable.getTTable().isSetId()) {
       return Collections.emptyList();
     }
+    if (MetaStoreUtils.lacksIcebergPartSpec(hmsTable.getTTable())) {
+      return hmsTable.getPartitionKeys();

Review Comment:
   I agree usesNativePartSpec is better name but we should keep it in 
`MetaStoreUtils.java` as it is more concerned with HMS metadata rather than  
iceberg table itself and we should not return `Collections.emptyList()` and 
should return `return hmsTable.getPartitionKeys();` which is required for 
logical views as well as when the table is not registered yet as iceberg( in 
case of alter convert).
   WDYT?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to