rdblue commented on a change in pull request #1115:
URL: https://github.com/apache/iceberg/pull/1115#discussion_r441177115
##########
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));
+ validateSnapshotIds(table, context.fromSnapshotId(),
context.toSnapshotId());
Review comment:
I agree with you. If the validation is checking that to and from
snapshot IDs are valid, then that makes sense. But for validations like
snapshot ID should be null if from snapshot ID is set can be done in the
context.
----------------------------------------------------------------
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]