stevenzwu commented on code in PR #4744:
URL: https://github.com/apache/iceberg/pull/4744#discussion_r883981634


##########
core/src/main/java/org/apache/iceberg/BaseIncrementalAppendScan.java:
##########
@@ -77,35 +76,52 @@ public CloseableIterable<FileScanTask> planFiles() {
       toSnapshotIdInclusive = context().toSnapshotId();
     } else if (table().currentSnapshot() != null) {
       toSnapshotIdInclusive = table().currentSnapshot().snapshotId();
+    } else if (context().fromSnapshotId() != null) {
+      throw new IllegalArgumentException(
+          "Invalid config: end snapshot is not set, start snapshot is set, and 
table has no current snapshot");
     } else {
-      throw new IllegalArgumentException("End snapshot is not set and table 
has no current snapshot");
+      // It is an empty table (no current snapshot). Both from and to 
snapshots aren't set either.
+      // In this case, listener notification is also skipped
+      return CloseableIterable.empty();
     }
 
-
+    // fromSnapshotIdExclusive can be null. appendsBetween handles null 
fromSnapshotIdExclusive properly
+    // by finding the oldest ancestor of end snapshot.
+    Long fromSnapshotIdExclusive = context().fromSnapshotId();

Review Comment:
   addressed in PR #4886 



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

Reply via email to