codope commented on code in PR #12327:
URL: https://github.com/apache/hudi/pull/12327#discussion_r1861464249
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/upgrade/SevenToEightUpgradeHandler.java:
##########
@@ -62,19 +78,38 @@ public class SevenToEightUpgradeHandler implements
UpgradeHandler {
@Override
public Map<ConfigProperty, String> upgrade(HoodieWriteConfig config,
HoodieEngineContext context,
String instantTime,
SupportsUpgradeDowngrade upgradeDowngradeHelper) {
+ Map<ConfigProperty, String> tablePropsToAdd = new HashMap<>();
HoodieTable table = upgradeDowngradeHelper.getTable(config, context);
HoodieTableMetaClient metaClient = table.getMetaClient();
HoodieTableConfig tableConfig = metaClient.getTableConfig();
+ // If auto upgrade is disabled, set initial version and writer version to
6 and return
+ if (!config.autoUpgrade()) {
+ setInitialVersion(config, table.getMetaClient().getTableConfig(),
tablePropsToAdd);
Review Comment:
It is not strictly needed. I just thought it would be nice to keep initial
version consistent with writer table version.
--
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]