cshuo commented on code in PR #13536:
URL: https://github.com/apache/hudi/pull/13536#discussion_r2196351795


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/compact/plan/generators/BaseHoodieCompactionPlanGenerator.java:
##########
@@ -147,6 +148,10 @@ public HoodieCompactionPlan generateCompactionPlan(String 
compactionInstant) thr
               // for both OCC and NB-CC, this is in-correct.
               .filter(logFile -> 
completionTimeQueryView.isCompletedBefore(compactionInstant, 
logFile.getDeltaCommitTime()))
               .sorted(HoodieLogFile.getLogFileComparator()).collect(toList());
+          if (logFiles.isEmpty()) {
+            // compaction is not needed if there is no log file.
+            return null;

Review Comment:
   UT added.



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

Reply via email to