jackye1995 commented on a change in pull request #3259:
URL: https://github.com/apache/iceberg/pull/3259#discussion_r727395028



##########
File path: core/src/main/java/org/apache/iceberg/IncrementalDataTableScan.java
##########
@@ -128,8 +126,8 @@ protected TableScan newRefinedScan(TableOperations ops, 
Table table, Schema sche
   }
 
   private void validateSnapshotIdsRefinement(long newFromSnapshotId, long 
newToSnapshotId) {
-    Set<Long> snapshotIdsRange = Sets.newHashSet(
-        SnapshotUtil.snapshotIdsBetween(table(), context().fromSnapshotId(), 
context().toSnapshotId()));
+    Set<Long> snapshotIdsRange = Sets.newHashSet(SnapshotUtil.toIds(
+        SnapshotUtil.ancestorsBetween(context().toSnapshotId(), 
context().fromSnapshotId(), table()::snapshot)));

Review comment:
       looks like we can have a util `SnapshotUtil.ancestorIdsBetween`?




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