rahil-c commented on code in PR #13644:
URL: https://github.com/apache/hudi/pull/13644#discussion_r2243199176
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/upgrade/UpgradeDowngrade.java:
##########
@@ -275,4 +280,25 @@ protected Pair<Map<ConfigProperty, String>,
List<ConfigProperty>> downgrade(Hood
throw new HoodieUpgradeDowngradeException(fromVersion.versionCode(),
toVersion.versionCode(), false);
}
}
+
+ /**
+ * Handles the case when auto-upgrade is disabled for upgrade operations.
+ * Sets compatible writer version and determines if upgrade logic should be
skipped.
+ *
+ * @param fromVersion current table version
+ * @param toVersion target table version
+ * @return true if upgrade logic should be skipped, false otherwise
+ */
+ private boolean handleAutoUpgradeDisabled(HoodieTableVersion fromVersion,
HoodieTableVersion toVersion) {
+ if (!config.autoUpgrade() && fromVersion.versionCode() <
toVersion.versionCode()) {
+ // Set appropriate writer version based on upgrade transition to
maintain compatibility
+ if (fromVersion == HoodieTableVersion.SEVEN && toVersion ==
HoodieTableVersion.EIGHT) {
Review Comment:
I think you might be correct, so you are saying the case the fromVersion is
six or 7 and toVersion is 9. We would need to account for those differences
here as well, if autoUpgrade is disabled.
--
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]