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



##########
File path: core/src/main/java/org/apache/iceberg/BaseTableScan.java
##########
@@ -167,59 +154,52 @@ public TableScan asOfTime(long timestampMillis) {
   @Override
   public TableScan option(String property, String value) {
     ImmutableMap.Builder<String, String> builder = ImmutableMap.builder();
-    builder.putAll(options);
+    builder.putAll(context.options());
     builder.put(property, value);
 
     return newRefinedScan(
-        ops, table, snapshotId, schema, rowFilter, ignoreResiduals,
-        caseSensitive, colStats, selectedColumns, builder.build());
+        ops, table, schema, context.options(builder.build()));
   }
 
   @Override
   public TableScan project(Schema projectedSchema) {
     return newRefinedScan(
-        ops, table, snapshotId, projectedSchema, rowFilter, ignoreResiduals,
-        caseSensitive, colStats, selectedColumns, options);
+        ops, table, projectedSchema, context.copy());
   }
 
   @Override
   public TableScan caseSensitive(boolean scanCaseSensitive) {
     return newRefinedScan(
-        ops, table, snapshotId, schema, rowFilter, ignoreResiduals,
-        scanCaseSensitive, colStats, selectedColumns, options);
+        ops, table, schema, context.caseSensitive(scanCaseSensitive));
   }
 
   @Override
   public TableScan includeColumnStats() {
     return newRefinedScan(
-        ops, table, snapshotId, schema, rowFilter, ignoreResiduals,
-        caseSensitive, true, selectedColumns, options);
+        ops, table, schema, context.colStats(true));
   }
 
   @Override
   public TableScan select(Collection<String> columns) {
     return newRefinedScan(
-        ops, table, snapshotId, schema, rowFilter, ignoreResiduals,
-        caseSensitive, colStats, columns, options);
+        ops, table, schema, context.selectedColumns(columns));
   }
 
   @Override
   public TableScan filter(Expression expr) {
-    return newRefinedScan(
-        ops, table, snapshotId, schema, Expressions.and(rowFilter, expr),
-        ignoreResiduals, caseSensitive, colStats, selectedColumns, options);
+    return newRefinedScan(ops, table, schema,
+        context.rowFilter(Expressions.and(context.rowFilter(), expr)));
   }
 
   @Override
   public Expression filter() {
-    return rowFilter;
+    return context.rowFilter();
   }
 
   @Override
   public TableScan ignoreResiduals() {
     return newRefinedScan(
-        ops, table, snapshotId, schema, rowFilter, true,
-        caseSensitive, colStats, selectedColumns, options);
+        ops, table, schema, context.ignoreResiduals(true));

Review comment:
       Done.




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