amogh-jahagirdar commented on code in PR #10861: URL: https://github.com/apache/iceberg/pull/10861#discussion_r1703406710
########## 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: Curious, what's the rationale behind preventing upgrades from 1 to 3 (or more generally skipping versions)? I think it should technically possible to enable that upgrade safely (let me know if I'm missing something there). In the current approach, a user would just upgrade to 2 and then right to 3 after that since there's no real additional logic. For what it's worth, I don't think it'll be common so maybe this check doesn't really matter in practice, but it just seems unnecessary? -- 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