codope commented on code in PR #12327:
URL: https://github.com/apache/hudi/pull/12327#discussion_r1861032273


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/upgrade/EightToSevenDowngradeHandler.java:
##########
@@ -168,6 +156,168 @@ private static void 
downgradePartitionFields(HoodieWriteConfig config,
     }
   }
 
+  static void unsetInitialVersion(HoodieTableConfig tableConfig, 
Map<ConfigProperty, String> tablePropsToAdd) {
+    tableConfig.getProps().remove(HoodieTableConfig.INITIAL_VERSION.key());
+  }
+
+  static void unsetRecordMergeMode(HoodieTableConfig tableConfig, 
Map<ConfigProperty, String> tablePropsToAdd) {
+    Triple<RecordMergeMode, String, String> mergingConfigs =
+        
HoodieTableConfig.inferCorrectMergingBehavior(tableConfig.getRecordMergeMode(), 
tableConfig.getPayloadClass(), tableConfig.getRecordMergeStrategyId());
+    if (StringUtils.nonEmpty(mergingConfigs.getMiddle())) {
+      tablePropsToAdd.put(HoodieTableConfig.PAYLOAD_CLASS_NAME, 
mergingConfigs.getMiddle());
+    }
+    if (StringUtils.nonEmpty(mergingConfigs.getRight())) {
+      tablePropsToAdd.put(HoodieTableConfig.RECORD_MERGE_STRATEGY_ID, 
mergingConfigs.getRight());
+    }
+    tableConfig.getProps().remove(HoodieTableConfig.RECORD_MERGE_MODE.key());
+  }

Review Comment:
   @linliu-code Please check the merge mode downgrade



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