rdblue commented on a change in pull request #4140:
URL: https://github.com/apache/iceberg/pull/4140#discussion_r808512728
##########
File path: core/src/main/java/org/apache/iceberg/TableScanContext.java
##########
@@ -131,37 +133,124 @@ Schema projectedSchema() {
TableScanContext project(Schema schema) {
Preconditions.checkState(selectedColumns == null, "Cannot set projection
schema when columns are selected");
- return new TableScanContext(snapshotId, rowFilter, ignoreResiduals,
- caseSensitive, colStats, schema, null, options, fromSnapshotId,
toSnapshotId);
+ return builder().projectedSchema(schema).selectedColumns(null).build();
}
Map<String, String> options() {
return options;
}
TableScanContext withOption(String property, String value) {
- ImmutableMap.Builder<String, String> builder = ImmutableMap.builder();
- builder.putAll(options);
- builder.put(property, value);
- return new TableScanContext(snapshotId, rowFilter, ignoreResiduals,
- caseSensitive, colStats, projectedSchema, selectedColumns,
builder.build(), fromSnapshotId, toSnapshotId);
+ ImmutableMap.Builder<String, String> mapBuilder = ImmutableMap.builder();
+ mapBuilder.putAll(options);
+ mapBuilder.put(property, value);
Review comment:
This rename looks unnecessary.
--
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]