You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gobblin.apache.org by GitBox <gi...@apache.org> on 2021/09/14 15:55:01 UTC

[GitHub] [gobblin] sv2000 commented on a change in pull request #3396: [GOBBLIN-1544] Fix edge case when current hour == datepartition hour

sv2000 commented on a change in pull request #3396:
URL: https://github.com/apache/gobblin/pull/3396#discussion_r708411162



##########
File path: gobblin-iceberg/src/main/java/org/apache/gobblin/iceberg/writer/IcebergMetadataWriter.java
##########
@@ -895,7 +896,8 @@ private long computeCompletenessWatermark(String table, SortedSet<ZonedDateTime>
       while (iterator.hasNext()) {
         ZonedDateTime timestampDT = iterator.next();
         if (timestampDT.isAfter(prevWatermarkDT)
-            && TimeIterator.durationBetween(prevWatermarkDT, now, granularity) > 1) {
+            && TimeIterator.durationBetween(prevWatermarkDT, now, granularity) > 1
+            && TimeIterator.durationBetween(timestampDT, now, granularity) > 0) {

Review comment:
       To make the code readable and for future fixes: it maybe worthwhile to wrap this condition into a method called "isCurrentTimeAfterCompletenessWindow" or something more intuitive?




-- 
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: dev-unsubscribe@gobblin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org