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


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/clean/CleanPlanner.java:
##########
@@ -360,8 +363,20 @@ private Pair<Boolean, List<CleanFileInfo>> 
getFilesToCleanKeepingLatestCommits(S
             });
             if (hoodieTable.getMetaClient().getTableType() == 
HoodieTableType.MERGE_ON_READ) {
               // If merge on read, then clean the log files for the commits as 
well
-              deletePaths.addAll(aSlice.getLogFiles().map(lf -> new 
CleanFileInfo(lf.getPath().toString(), false))
-                  .collect(Collectors.toList()));
+              Predicate<HoodieLogFile> notCDCLogFile =
+                  hoodieLogFile -> 
!hoodieLogFile.getFileName().endsWith(HoodieCDCUtils.CDC_LOGFILE_SUFFIX);

Review Comment:
   These predicates can be constant right ? And why we distinguish them here if 
all the log files are appended no matter whether the cdc is enabled or not ?



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