yihua commented on code in PR #11943:
URL: https://github.com/apache/hudi/pull/11943#discussion_r1811463937
##########
hudi-common/src/main/java/org/apache/hudi/common/util/ConfigUtils.java:
##########
@@ -89,11 +92,17 @@ public static String getOrderingField(Properties
properties) {
return orderField;
}
+ public static RecordMergeMode getRecordMergeMode(Properties properties) {
+ return RecordMergeMode.getValue(getStringWithAltKeys(properties,
RECORD_MERGE_MODE, RECORD_MERGE_MODE.defaultValue().name()));
+ }
+
/**
* Get payload class.
*/
- public static String getPayloadClass(Properties properties) {
- return RecordPayloadType.getPayloadClassName(new HoodieConfig(properties));
+ public static String getAvroPayloadClass(Properties properties) {
+ HoodieConfig hoodieConfig = new HoodieConfig(properties);
+ return RecordPayloadType.getPayloadClassName(hoodieConfig).orElseGet(() ->
+
HoodieRecordPayload.getAvroPayloadForMergeMode(getRecordMergeMode(properties)));
}
Review Comment:
This will be taken by HUDI-8407.
--
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]