edgarRd commented on a change in pull request #1115:
URL: https://github.com/apache/iceberg/pull/1115#discussion_r441158866



##########
File path: core/src/main/java/org/apache/iceberg/IncrementalDataTableScan.java
##########
@@ -19,55 +19,43 @@
 
 package org.apache.iceberg;
 
-import java.util.Collection;
 import java.util.List;
 import java.util.Set;
-import org.apache.iceberg.expressions.Expression;
 import org.apache.iceberg.io.CloseableIterable;
 import org.apache.iceberg.relocated.com.google.common.base.Preconditions;
 import org.apache.iceberg.relocated.com.google.common.collect.FluentIterable;
-import org.apache.iceberg.relocated.com.google.common.collect.ImmutableMap;
 import org.apache.iceberg.relocated.com.google.common.collect.Iterables;
 import org.apache.iceberg.relocated.com.google.common.collect.Lists;
 import org.apache.iceberg.relocated.com.google.common.collect.Sets;
 import org.apache.iceberg.util.SnapshotUtil;
 import org.apache.iceberg.util.ThreadPools;
 
 class IncrementalDataTableScan extends DataTableScan {
-  private long fromSnapshotId;
-  private long toSnapshotId;
-
-  IncrementalDataTableScan(TableOperations ops, Table table, Schema schema, 
Expression rowFilter,
-                           boolean ignoreResiduals, boolean caseSensitive, 
boolean colStats,
-                           Collection<String> selectedColumns, 
ImmutableMap<String, String> options,
-                           long fromSnapshotId, long toSnapshotId) {
-    super(ops, table, null, schema, rowFilter, ignoreResiduals, caseSensitive, 
colStats, selectedColumns, options);
-    validateSnapshotIds(table, fromSnapshotId, toSnapshotId);
-    this.fromSnapshotId = fromSnapshotId;
-    this.toSnapshotId = toSnapshotId;
+
+  IncrementalDataTableScan(TableOperations ops, Table table, Schema schema, 
TableScanContext context) {
+    super(ops, table, schema, context.useSnapshotId(null));

Review comment:
       This change was done following the previous code that did pass `null` in 
the `super` constructor. `TableScanContext` does start as null, but there's no 
guarantee that it's still `null` in this part since it's only receiving a 
context as argument, not creating one from scratch, right?




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