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


##########
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?
   
   The current behavior is `beforeFileSlice` is still present, but the file 
slice itself is empty, i.e., no base file and no log files. 
   
   @qq726658006 maybe you can add a test to reproduce the problem you 
encountered.



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