rdblue commented on a change in pull request #2887:
URL: https://github.com/apache/iceberg/pull/2887#discussion_r680573143



##########
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;
+    int formatVersionOverride = formatVersion;

Review comment:
       I think this needs to handle the conflict between `formatVersion` and 
`properties`. Since all of these methods are internal, we can change them 
however we like, but we should not have 2 ways to set the table version. I 
think there are two options:
   
   1. Set `tableVersion` from properties in the 2 overrides and validate that 
properties does not contain `format-version` here.
   2. Move the implementation to the override above that doesn't accept 
`formatVersion`. Then update this override to convert `formatVersion` to a 
property and validate that the properties passed here don't contain 
`format-version`.
   
   I would go for option 2. That makes handling a set of reserved properties 
cleaner.




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

Reply via email to