danny0405 commented on code in PR #9923:
URL: https://github.com/apache/hudi/pull/9923#discussion_r1372927765
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/source/IncrementalInputSplits.java:
##########
@@ -447,8 +447,11 @@ private List<MergeOnReadInputSplit> getInputSplits(
.filter(logPath ->
!logPath.endsWith(HoodieCDCUtils.CDC_LOGFILE_SUFFIX))
.collect(Collectors.toList()));
String basePath =
fileSlice.getBaseFile().map(BaseFile::getPath).orElse(null);
+ String sliceLastInstant =
fileSlice.getLatestLogFile().isPresent()
+ ? fileSlice.getLatestLogFile().get().getDeltaCommitTime()
+ : fileSlice.getBaseInstantTime();
return new MergeOnReadInputSplit(cnt.getAndAdd(1),
- basePath, logPaths, endInstant,
+ basePath, logPaths, sliceLastInstant,
Review Comment:
min(fileSlice.getLatestLogFile().map(HoodieInstant::getInstantTime).orElse(fileSlice.getBaseInstantTime()),
endInstant),
You can move the method in `CompletionTimeQueryView.minInstant` to
`HoodieTimeline` and reuse it here.
And also add a basic UT to check the end commit of the split.
--
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]