yihua commented on code in PR #13687:
URL: https://github.com/apache/hudi/pull/13687#discussion_r2261661598
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/upgrade/UpgradeDowngrade.java:
##########
@@ -95,6 +95,16 @@ public static boolean needsUpgrade(HoodieTableMetaClient
metaClient, HoodieWrite
throw new HoodieUpgradeDowngradeException(
String.format("Please upgrade table from version %s to %s before
upgrading to version %s.", fromTableVersion,
HoodieTableVersion.SIX.versionCode(), toWriteVersion));
}
+ // for table versions greater than or equal to six, if we are attempting
to do an upgrade and auto-upgrade is disabled
+ if (fromTableVersion.greaterThanOrEquals(HoodieTableVersion.SIX) &&
fromTableVersion.versionCode() < config.getWriteVersion().versionCode() &&
!config.autoUpgrade()) {
Review Comment:
@rahil-c and I discussed the following cases:
(1) autoUpgrade=true, `hoodie.write.table.version` / toVersion should be at
least SIX.
(2) autoUpgrade=false, existing table version has to match
`hoodie.write.table.version`, and `hoodie.write.table.version` has to be at
least SIX.
If autoUpgrade=true and `hoodie.write.table.version=SIX`, it is OK for
existing table version to be below SIX, e.g., FIVE.
--
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]