danny0405 commented on code in PR #19205:
URL: https://github.com/apache/hudi/pull/19205#discussion_r3672834036


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/upgrade/NineToTenUpgradeHandler.java:
##########
@@ -34,6 +46,12 @@ public UpgradeDowngrade.TableConfigChangeSet upgrade(
       HoodieEngineContext context,
       String instantTime,
       SupportsUpgradeDowngrade upgradeDowngradeHelper) {
-    return new UpgradeDowngrade.TableConfigChangeSet();
+    HoodieTableConfig tableConfig =
+        upgradeDowngradeHelper.getTable(config, 
context).getMetaClient().getTableConfig();
+    // Resolves from the legacy boolean for a version 9 table, since the mode 
property is absent.
+    MetaFieldsMode metaFieldsMode = tableConfig.getMetaFieldsMode();
+    Map<ConfigProperty, String> propertiesToUpdate = Collections.singletonMap(
+        HoodieTableConfig.META_FIELDS_MODE, metaFieldsMode.name());
+    return new UpgradeDowngrade.TableConfigChangeSet(propertiesToUpdate, 
Collections.emptySet());

Review Comment:
   reached concensus offline with @voonhous that my suggestions works.



-- 
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]

Reply via email to