aokolnychyi commented on code in PR #8381:
URL: https://github.com/apache/iceberg/pull/8381#discussion_r1303481043


##########
core/src/main/java/org/apache/iceberg/TableMetadata.java:
##########
@@ -124,7 +124,7 @@ static TableMetadata newTableMetadata(
     MetricsConfig.fromProperties(properties).validateReferencedColumns(schema);
 
     return new Builder()
-        .upgradeFormatVersion(formatVersion)
+        .setFormatVersion(formatVersion)

Review Comment:
   The builder inits the format version to the default format version (2 now) 
and if users explicitly pass 1 as the desired format version, create table 
statements start to fail as it is not allowed to downgrade.
   
   We can make this package-private given that it is only used during table 
creation. Or we could lazily init the default format version. Either way would 
work for me.



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