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


##########
hudi-common/src/main/java/org/apache/hudi/common/table/cdc/HoodieCDCFileSplit.java:
##########
@@ -126,8 +126,7 @@ public Option<FileSlice> getAfterFileSlice() {
   @Override
   public int compareTo(HoodieCDCFileSplit o) {
     int cmpResult = this.instant.compareTo(o.instant);
-    if (cmpResult == 0 && this.cdcInferCase == HoodieCDCInferenceCase.LOG_FILE
-        && this.beforeFileSlice.isPresent() && 
o.getBeforeFileSlice().isPresent()) {
+    if (cmpResult == 0 && this.cdcInferCase == 
HoodieCDCInferenceCase.LOG_FILE) {

Review Comment:
   for the first log append in a file slice, could the `beforeFileSlice` be 
empty? we could use `this.beforeFileSlice.map(slice -> 
slice.getLogFiles().count()).orElse(0)`.



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