rdblue commented on a change in pull request #2887:
URL: https://github.com/apache/iceberg/pull/2887#discussion_r681880940
##########
File path: core/src/main/java/org/apache/iceberg/TableMetadata.java
##########
@@ -752,9 +760,15 @@ public TableMetadata buildReplacement(Schema
updatedSchema, PartitionSpec update
sortOrdersBuilder.add(freshSortOrder);
}
- Map<String, String> newProperties = Maps.newHashMap();
- newProperties.putAll(this.properties);
- newProperties.putAll(updatedProperties);
+ // prepare new table properties
+ Map<String, String> newRawProperties = Maps.newHashMap();
+ newRawProperties.putAll(this.properties);
+ newRawProperties.putAll(updatedProperties);
+ Map<String, String> newProperties = unreservedProperties(newRawProperties);
Review comment:
I think it would be better to construct the properties directly rather
than building a map and then rebuilding it. You should be able to use the same
`filter` to add just the non-reserved properties from `updatedProperties`.
--
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]