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


##########
ql/src/java/org/apache/hadoop/hive/ql/ddl/table/storage/compact/AlterTableCompactOperation.java:
##########
@@ -104,6 +106,14 @@ public AlterTableCompactOperation(DDLOperationContext 
context, AlterTableCompact
                 compactionRequest, ServerUtils.hostname(), txnHandler, 
context.getConf());
         parseCompactionResponse(compactionResponse, table, 
partitionMapEntry.getKey());
       }
+      // If Iceberg table had partition evolution, it will create compaction 
request without partition specification,
+      // and it will compact all files from old partition specs, besides 
compacting partitions of current spec in parallel.
+      if (DDLUtils.isIcebergTable(table) && 
table.getStorageHandler().isPartitioned(table) &&
+          table.getStorageHandler().isUndergonePartitionEvolution(table)) {
+        compactionRequest.setPartitionname(null);

Review Comment:
   Yes, but it reuses the same compaction request object when submitting 
compaction requests for different partitions modifying the compaction name. 
Existing ACID compaction functionality. Setting partition name to null because 
in that code block it is not null, but may have the value of the previous 
partition that was requested.



-- 
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: gitbox-unsubscr...@hive.apache.org

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


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

Reply via email to