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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]