yittg commented on code in PR #4529:
URL: https://github.com/apache/iceberg/pull/4529#discussion_r849068303


##########
core/src/test/java/org/apache/iceberg/TestIncrementalDataTableScan.java:
##########
@@ -303,10 +306,8 @@ private List<String> appendsAfterScan(long fromSnapshotId) 
{
     return filesToScan(appendsAfter);
   }
 
-  private List<String> appendsBetweenScan(long fromSnapshotId, long 
toSnapshotId) {
-    Snapshot s1 = table.snapshot(fromSnapshotId);
-    Snapshot s2 = table.snapshot(toSnapshotId);
-    TableScan appendsBetween = table.newScan().appendsBetween(s1.snapshotId(), 
s2.snapshotId());
+  private List<String> appendsBetweenScan(Long fromSnapshotId, long 
toSnapshotId) {
+    TableScan appendsBetween = table.newScan().appendsInRange(fromSnapshotId, 
toSnapshotId);
     return filesToScan(appendsBetween);
   }

Review Comment:
   How about adding another method, and keeping the original?
   ```suggestion
   
     private List<String> appendsBeforeScan(long toSnapshotId) {
       TableScan appendsBetween = table.newScan().appendsInRange(null, 
toSnapshotId);
       return filesToScan(appendsBetween);
     }
   
     private List<String> appendsBetweenScan(long fromSnapshotId, long 
toSnapshotId) {
       TableScan appendsBetween = 
table.newScan().appendsInRange(fromSnapshotId, toSnapshotId);
       return filesToScan(appendsBetween);
     }
   ```



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