ahmedabu98 commented on code in PR #38834:
URL: https://github.com/apache/beam/pull/38834#discussion_r3547070762


##########
sdks/java/io/iceberg/src/main/java/org/apache/beam/sdk/io/iceberg/ReadUtils.java:
##########
@@ -161,10 +161,11 @@ public static CloseableIterable<Record> createReader(
     // incremental append scan can only be configured with an *exclusive* 
starting snapshot,
     // so we need to provide this snapshot's parent id.
     if (fromSnapshot != null) {
-      fromSnapshot = table.snapshot(fromSnapshot).parentId();
+      Snapshot snapshot = table.snapshot(fromSnapshot);
+      fromSnapshot = snapshot != null ? snapshot.parentId() : null;

Review Comment:
   This PR's watch transform keeps track of the snapshot sequence number 
(stateful), so on restart it should skip everything up to the last processed 
snapshot



-- 
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]

Reply via email to