RussellSpitzer commented on code in PR #10861:
URL: https://github.com/apache/iceberg/pull/10861#discussion_r1703464805


##########
core/src/main/java/org/apache/iceberg/TableMetadata.java:
##########
@@ -1015,6 +1015,11 @@ public Builder upgradeFormatVersion(int 
newFormatVersion) {
           "Cannot downgrade v%s table to v%s",
           formatVersion,
           newFormatVersion);
+      Preconditions.checkArgument(
+          newFormatVersion <= formatVersion + 1,
+          "Cannot skip format version(s) to upgrade v%s table to v%s",
+          formatVersion,
+          newFormatVersion);

Review Comment:
   I guess we could allow this and just internally do the upgrade to 2 first? 
My only goal here would be to make sure that we don't support 2 different 
upgrade paths. 
   
   ` 1 -> 3` and `1 -> 2 -> 3`
   
   But if upgrading 1 ->3 is just syntatic sugar for 1 -> 2 -> 3 I don't see 
the issue
   



-- 
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-unsubscr...@iceberg.apache.org

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


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

Reply via email to