rdblue commented on a change in pull request #2887:
URL: https://github.com/apache/iceberg/pull/2887#discussion_r680572652
##########
File path: core/src/main/java/org/apache/iceberg/TableMetadata.java
##########
@@ -90,6 +103,14 @@ static TableMetadata newTableMetadata(Schema schema,
String location,
Map<String, String> properties,
int formatVersion) {
+ // check if there is format version override in properties
+ Map<String, String> validProperties = properties;
Review comment:
It would be better to rename the method argument (maybe `rawProperties`)
to result in fewer changes and minimize the chance that a reference was missed.
Also, if we are introducing reserved table properties, then we should make this
more generic, like this:
```java
Map<String, String> requestedProperties =
rawProperties.entrySet().stream()
.filter(entry -> !RESERVED_PROPERTIES.contains(entry.getKey()))
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
int formatVersion = PropertyUtil.propertyAsInt(
rawProperties, PROPERTY_FORMAT_VERSION,
DEFAULT_TABLE_FORMAT_VERSION);
```
--
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]