rajkrrsingh commented on a change in pull request #1085: URL: https://github.com/apache/hive/pull/1085#discussion_r443905797
########## File path: ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Initiator.java ########## @@ -353,6 +354,16 @@ private CompactionType determineCompactionType(CompactionInfo ci, ValidWriteIdLi HiveConf.getFloatVar(conf, HiveConf.ConfVars.HIVE_COMPACTOR_DELTA_PCT_THRESHOLD) : Float.parseFloat(deltaPctProp); boolean bigEnough = (float)deltaSize/(float)baseSize > deltaPctThreshold; + boolean multiBase = dir.getObsolete().stream() + .filter(path -> path.getName().startsWith(AcidUtils.BASE_PREFIX)).count() >= 1; Review comment: incorporated the suggested change. ########## File path: ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Initiator.java ########## @@ -353,6 +354,16 @@ private CompactionType determineCompactionType(CompactionInfo ci, ValidWriteIdLi HiveConf.getFloatVar(conf, HiveConf.ConfVars.HIVE_COMPACTOR_DELTA_PCT_THRESHOLD) : Float.parseFloat(deltaPctProp); boolean bigEnough = (float)deltaSize/(float)baseSize > deltaPctThreshold; + boolean multiBase = dir.getObsolete().stream() + .filter(path -> path.getName().startsWith(AcidUtils.BASE_PREFIX)).count() >= 1; + if ((deltaSize == 0 && dir.getObsolete().size() > 0) && multiBase) { Review comment: incorporated the suggested change. ---------------------------------------------------------------- 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. 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