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


##########
core/src/main/java/org/apache/iceberg/BaseTableScan.java:
##########
@@ -45,70 +38,46 @@
 /**
  * Base class for {@link TableScan} implementations.
  */
-abstract class BaseTableScan implements TableScan {
+abstract class BaseTableScan extends BaseScan<TableScan> implements TableScan {
   private static final Logger LOG = 
LoggerFactory.getLogger(BaseTableScan.class);
 
-  private final TableOperations ops;
-  private final Table table;
-  private final Schema schema;
-  private final TableScanContext context;
-
   protected BaseTableScan(TableOperations ops, Table table, Schema schema) {
     this(ops, table, schema, new TableScanContext());
   }
 
   protected BaseTableScan(TableOperations ops, Table table, Schema schema, 
TableScanContext context) {
-    this.ops = ops;
-    this.table = table;
-    this.schema = schema;
-    this.context = context;
-  }
-
-  protected TableOperations tableOps() {
-    return ops;
-  }
-
-  protected Schema tableSchema() {
-    return schema;
+    super(ops, table, schema, context);
   }
 
   protected Long snapshotId() {
-    return context.snapshotId();
+    return context().snapshotId();
   }
 
   protected boolean colStats() {
-    return context.returnColumnStats();
+    return context().returnColumnStats();
   }
 
   protected boolean shouldIgnoreResiduals() {
-    return context.ignoreResiduals();
+    return context().ignoreResiduals();
   }
 
   protected Collection<String> selectedColumns() {
-    return context.selectedColumns();
+    return context().selectedColumns();
   }
 
   protected ExecutorService planExecutor() {
-    return context.planExecutor();
+    return context().planExecutor();
   }
 
   protected Map<String, String> options() {
-    return context.options();
-  }
-
-  protected TableScanContext context() {
-    return context;
+    return context().options();
   }
 
-  @SuppressWarnings("checkstyle:HiddenField")
-  protected abstract TableScan newRefinedScan(TableOperations ops, Table 
table, Schema schema,
-                                              TableScanContext context);
-
   protected abstract CloseableIterable<FileScanTask> doPlanFiles();
 
   @Override
   public Table table() {

Review Comment:
   yeah. `BaseScan#table()` is a protected method. this is a public method.



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