rdblue commented on a change in pull request #1115:
URL: https://github.com/apache/iceberg/pull/1115#discussion_r441031494
##########
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()));
Review comment:
I think it would be better to add `withOption(String property, String
value)` to context and move the map builder there, instead of replacing all
options. That keeps this simple and delegates work to the class with the most
context (tell, don't ask).
----------------------------------------------------------------
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]