yihua commented on code in PR #11947:
URL: https://github.com/apache/hudi/pull/11947#discussion_r1805926310


##########
hudi-utilities/src/main/java/org/apache/hudi/utilities/sources/SnapshotLoadQuerySplitter.java:
##########
@@ -118,6 +124,32 @@ public QueryInfo getNextCheckpoint(Dataset<Row> df, 
QueryInfo queryInfo, Option<
         .orElse(queryInfo);
   }
 
+  public Option<CheckpointWithPredicates> getNextCheckpoint(Dataset<Row> df, 
QueryContext queryContext,
+                                                            
Option<SourceProfileSupplier> sourceProfileSupplier) {
+    // the start instant would be included into the final query result. So we 
need to get
+    // a strictly lower timestamp to have query splitter include the start 
instant
+    Option<CheckpointWithPredicates> nextCheckpointWithPredicates =
+        getNextCheckpointWithPredicates(df, 
instantTimeMinusMillis(queryContext.getBeginInstant().get(), 1));

Review Comment:
   The `getNextCheckpointWithPredicates` API in `SnapshotLoadQuerySplitter` is 
changed to take `QueryContext` and return completion time as the checkpoint 
directly, so all such logic of conversion between instant time and completion 
is no longer needed.



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