You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "aokolnychyi (via GitHub)" <gi...@apache.org> on 2023/08/23 19:58:16 UTC

[GitHub] [iceberg] aokolnychyi commented on a diff in pull request #8381: Core: Use V2 format in new tables by default

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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org