difin commented on code in PR #5328:
URL: https://github.com/apache/hive/pull/5328#discussion_r1688475155


##########
ql/src/java/org/apache/hadoop/hive/ql/ddl/table/storage/compact/AlterTableCompactOperation.java:
##########
@@ -135,7 +145,7 @@ private List<Partition> getPartitions(Table table, 
AlterTableCompactDesc desc, D
     List<Partition> partitions = new ArrayList<>();
 
     if (desc.getPartitionSpec() == null) {
-      if (table.isPartitioned()) {
+      if (table.isPartitioned() || (DDLUtils.isIcebergTable(table) && 
table.getStorageHandler().isPartitioned(table))) {

Review Comment:
   because `org.apache.hadoop.hive.ql.metadata.table.isPartitioned()` does not 
work for Iceberg. For Iceberg it will always return False. That's why I added  
a call to check if Iceberg table is partitioned via the storage handler.



-- 
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