kbendick commented on a change in pull request #2617:
URL: https://github.com/apache/iceberg/pull/2617#discussion_r637831166



##########
File path: core/src/main/java/org/apache/iceberg/StaticTableScan.java
##########
@@ -25,16 +25,33 @@
 
 class StaticTableScan extends BaseTableScan {
   private final Function<StaticTableScan, DataTask> buildTask;
+  // Metadata table name that the buildTask that this StaticTableScan will 
return data for.
+  private final String scannedTableName;
 
-  StaticTableScan(TableOperations ops, Table table, Schema schema, 
Function<StaticTableScan, DataTask> buildTask) {
+  StaticTableScan(TableOperations ops, Table table, Schema schema,  String 
scannedTableName,
+                  Function<StaticTableScan, DataTask> buildTask) {
     super(ops, table, schema);
     this.buildTask = buildTask;
+    this.scannedTableName = scannedTableName;
   }
 
-  private StaticTableScan(TableOperations ops, Table table, Schema schema,
+  private StaticTableScan(TableOperations ops, Table table, Schema schema,  
String scannedTableName,
                           Function<StaticTableScan, DataTask> buildTask, 
TableScanContext context) {
     super(ops, table, schema, context);
     this.buildTask = buildTask;
+    this.scannedTableName = scannedTableName;
+  }
+
+  @Override
+  public TableScan appendsBetween(long fromSnapshotId, long toSnapshotId) {
+    throw new UnsupportedOperationException(
+        String.format("Incremental scan is not supported for metadata table 
%s", scannedTableName));
+  }
+
+  @Override
+  public TableScan appendsAfter(long fromSnapshotId) {
+    throw new UnsupportedOperationException(
+        String.format("Incremental scan is not supported for metadata table 
%s", scannedTableName));

Review comment:
       I can update this PR so that `FilesTableScan` and `EntiresTableScan` 
inherit from `StaticTableScan`, or I can add a specific override without 
touching the inheritance further (or at all in this PR) for the ones you 
mentioned, or handle some of it in a follow up PR.
   
   I know that's a lot, but I've looked over it quite a bit and I think this 
would make things a lot cleaner. There's a decent amount of code that could be 
refactored and slimmed down to be more DRY.




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

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