yihua commented on code in PR #11947:
URL: https://github.com/apache/hudi/pull/11947#discussion_r1805924151
##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/spark/sql/hudi/streaming/HoodieStreamSource.scala:
##########
@@ -186,11 +160,11 @@ class HoodieStreamSource(
}
}
- private def startCommitTime(startOffset: HoodieSourceOffset): String = {
+ private def startCompletionTime(startOffset: HoodieSourceOffset): String = {
startOffset match {
- case INIT_OFFSET => startOffset.commitTime
- case HoodieSourceOffset(commitTime) =>
- commitTime
+ case INIT_OFFSET => startOffset.completionTime
+ case HoodieSourceOffset(completionTime) =>
+ HoodieInstantTimeGenerator.instantTimePlusMillis(completionTime, 1)
Review Comment:
I understand your point now. I've changed the `IncrementalRelation`,
`MergeOnReadIncremetnalRelation`, and `CDCRelation` to take `rangeType` as an
argument so it can be dynamically changed based on different scenarios. Now
the logic in `HoodieStreamSource` is easy to understand, without using
`HoodieInstantTimeGenerator#instantTimePlusMillis`.
--
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]