HuangZhenQiu commented on code in PR #17562:
URL: https://github.com/apache/hudi/pull/17562#discussion_r2625593322


##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/source/IncrementalInputSplits.java:
##########
@@ -303,6 +310,33 @@ public Result inputSplits(
     }
   }
 
+  /**
+   * Returns the incremental Hoodie source split batch.
+   *
+   * @param metaClient    The meta client
+   * @param startInstant  The start Instant of the splits
+   * @param cdcEnabled    Whether cdc is enabled
+   *
+   * @return The list of incremental input splits or empty if there are no new 
instants
+   */
+  public HoodieContinuousSplitBatch inputHoodieSourceSplits(
+      HoodieTableMetaClient metaClient,
+      @Nullable String startInstant,
+      boolean cdcEnabled) {
+    Result result = inputSplits(metaClient, startInstant, cdcEnabled);
+    List<HoodieSourceSplit> splits = result.inputSplits.stream().map(split ->
+      new HoodieSourceSplit(
+          HoodieSourceSplit.SPLIT_COUNTER.incrementAndGet(),
+          split.getBasePath().orElse(null),
+          split.getLogPaths(), split.getTablePath(),
+          split.getMergeType(), split.getFileId()
+      )
+    ).collect(Collectors.toList());
+
+    return new HoodieContinuousSplitBatch(splits, startInstant == null ? 
this.conf.get(FlinkOptions.READ_START_COMMIT) : startInstant,

Review Comment:
   Make sense. Moved accordingly. 



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