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


##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/compaction/evaluator/IcebergCompactionEvaluator.java:
##########
@@ -52,37 +52,33 @@ private IcebergCompactionEvaluator() {
 
   private static final Logger LOG = 
LoggerFactory.getLogger(IcebergCompactionEvaluator.class);
 
-  public static boolean isEligibleForCompaction(Table icebergTable, String 
partitionPath,
-      CompactionType compactionType, HiveConf conf) {
+  public static boolean isEligibleForCompaction(Table icebergTable, 
CompactionInfo ci, HiveConf conf) {
 
     if (icebergTable.currentSnapshot() == null) {
       LOG.info("Table {}{} doesn't require compaction because it is empty", 
icebergTable,
-          partitionPath == null ? "" : " partition " + partitionPath);
+          ci.partName == null ? "" : " partition " + ci.partName);
       return false;
     }
 
-    CommonPartitionEvaluator partitionEvaluator = 
createCommonPartitionEvaluator(icebergTable, partitionPath, conf);
+    CommonPartitionEvaluator partitionEvaluator = 
createCommonPartitionEvaluator(icebergTable, ci, conf);
 
     if (partitionEvaluator == null) {
       return false;
     }
 
-    switch (compactionType) {
+    switch (ci.type) {
       case MINOR:
-        return partitionEvaluator.isMinorNecessary();
+        return partitionEvaluator.isMinorNecessary() || 
partitionEvaluator.isMajorNecessary();

Review Comment:
   I changed this part mapping Amoro minor to Hive minor and Amoro Major to 
Hive major.



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