danny0405 commented on code in PR #17943:
URL: https://github.com/apache/hudi/pull/17943#discussion_r2791359475


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/clean/CleanPlanner.java:
##########
@@ -184,14 +184,15 @@ private boolean canCleanBeSkipped() {
     }
 
     // Check whether there are any other commits apart from deltacommits 
between last compaction and last clean.
-    int nonDeltaCommitsBetweenCompactionAndClean = activeTimeline
-        .findInstantsAfter(lastCompactionInstant.get().requestedTime())
-        .findInstantsBefore(lastCleanInstant.get().requestedTime())
+    int numNonDeltaCommitsAfterLastClean = activeTimeline

Review Comment:
   I feel like we can just fetch the last completed non delta commit, and 
simplify the comparison as just:
   
   ```java
   
InstantComparison.compareTimestamps(lastNonDeltaCommit.get().getCompletionTime(),
           InstantComparison.LESSER_THAN, 
lastCleanInstant.get().requestedTime())
   ```



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