bvaradar commented on code in PR #10336:
URL: https://github.com/apache/hudi/pull/10336#discussion_r1428393493


##########
hudi-utilities/src/main/java/org/apache/hudi/utilities/sources/GcsEventsHoodieIncrSource.java:
##########
@@ -181,8 +181,8 @@ public Pair<Option<Dataset<Row>>, String> 
fetchNextBatch(Option<String> lastChec
         IncrSourceHelper.filterAndGenerateCheckpointBasedOnSourceLimit(
             filteredSourceData, sourceLimit, queryInfo, 
cloudObjectIncrCheckpoint);
     if (!checkPointAndDataset.getRight().isPresent()) {
-      LOG.info("Empty source, returning endpoint:" + 
queryInfo.getEndInstant());
-      return Pair.of(Option.empty(), queryInfo.getEndInstant());
+      LOG.info("Empty source, returning endpoint:" + 
checkPointAndDataset.getLeft().toString());

Review Comment:
   nit: .toString() is not needed in log message



##########
hudi-utilities/src/main/java/org/apache/hudi/utilities/sources/S3EventsHoodieIncrSource.java:
##########
@@ -178,8 +178,8 @@ public Pair<Option<Dataset<Row>>, String> 
fetchNextBatch(Option<String> lastChec
         IncrSourceHelper.filterAndGenerateCheckpointBasedOnSourceLimit(
             filteredSourceData, sourceLimit, queryInfo, 
cloudObjectIncrCheckpoint);
     if (!checkPointAndDataset.getRight().isPresent()) {
-      LOG.info("Empty source, returning endpoint:" + 
queryInfo.getEndInstant());
-      return Pair.of(Option.empty(), queryInfo.getEndInstant());
+      LOG.info("Empty source, returning endpoint:" + 
checkPointAndDataset.getLeft().toString());

Review Comment:
   nit: .toString() is not needed in log message



##########
hudi-utilities/src/main/java/org/apache/hudi/utilities/sources/helpers/IncrSourceHelper.java:
##########
@@ -183,7 +183,8 @@ public static Pair<CloudObjectIncrCheckpoint, 
Option<Dataset<Row>>> filterAndGen
                                                                                
                                     long sourceLimit, QueryInfo queryInfo,
                                                                                
                                     CloudObjectIncrCheckpoint 
cloudObjectIncrCheckpoint) {
     if (sourceData.isEmpty()) {
-      return Pair.of(cloudObjectIncrCheckpoint, Option.empty());
+      // There is no file matching the prefix.
+      return Pair.of(new CloudObjectIncrCheckpoint(queryInfo.getEndInstant(), 
null), Option.empty());

Review Comment:
   Why can't we use the cloudObjectIncrCheckpoint that is being passed to this 
function ?



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