kbendick commented on a change in pull request #3039:
URL: https://github.com/apache/iceberg/pull/3039#discussion_r714439452
##########
File path:
spark3/src/main/java/org/apache/iceberg/spark/source/SparkMicroBatchStream.java
##########
@@ -238,9 +247,8 @@ public StreamingOffset initialOffset() {
}
table.refresh();
- StreamingOffset offset = table.currentSnapshot() == null ?
- StreamingOffset.START_OFFSET :
- new StreamingOffset(SnapshotUtil.oldestSnapshot(table).snapshotId(),
0, false);
+ StreamingOffset offset = isStreamEmpty(table, fromTimestamp) ?
StreamingOffset.START_OFFSET :
+ new StreamingOffset(SnapshotUtil.oldestSnapshot(table,
fromTimestamp).snapshotId(), 0, false);
Review comment:
That doesn't sound like the intended behavior - or at least the expected
behavior to me.
I would expect that if currentSnapshot is 25 and we request fromTimestamp of
30, the stream would not read anything. It would be assumed the user does not
want any new updates as they wanted all changed data after 30, for which there
is none.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]