mxm commented on code in PR #18348:
URL: https://github.com/apache/iceberg/pull/18348#discussion_r4195788365
##########
spark/v4.2/spark/src/main/java/org/apache/iceberg/spark/source/AsyncSparkMicroBatchPlanner.java:
##########
@@ -267,10 +269,16 @@ public synchronized StreamingOffset
latestOffset(StreamingOffset startOffset, Re
// if we want to read all available we don't need to scan files, just
snapshots
if (limit instanceof ReadAllAvailable) {
+ // A START_OFFSET cap only means that no snapshot matched
stream-from-timestamp when the run
+ // started. Returned as the end offset of a resumed stream, it would
reset the stream.
+ boolean capResetsStream =
Review Comment:
Thanks for the suggestion! I've changed `prepareForTriggerAvailableNow` to
cap a resumed stream at the newest append snapshot when no snapshot matched the
timestamp. I didn't use the current snapshot because it can be a replace from
compaction, which the async planner never processes. A new stream still reads
nothing in that run, now with both planners. I've added your test plus one for
the replace case.
--
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]