yihua commented on code in PR #13615:
URL: https://github.com/apache/hudi/pull/13615#discussion_r2277463859


##########
hudi-common/src/main/java/org/apache/hudi/common/model/HoodieRecordPayload.java:
##########
@@ -182,16 +184,32 @@ static String getPayloadClassName(HoodieConfig config) {
   }
 
   static String getPayloadClassName(Properties props) {
-    return 
getPayloadClassNameIfPresent(props).orElse(HoodieTableConfig.DEFAULT_PAYLOAD_CLASS_NAME);
+    Option<String> payloadOpt = getPayloadClassNameIfPresent(props);
+    if (payloadOpt.isPresent()) {
+      return payloadOpt.get();
+    }
+    // Note: starting from version 9, payload class is not necessary set, but
+    //       merge mode must exist. Therefore, we use merge mode to infer
+    //       the payload class for certain corner cases, like for MIT command.
+    if (props.containsKey(RECORD_MERGE_MODE.key())

Review Comment:
   Fixed



##########
hudi-common/src/main/java/org/apache/hudi/common/table/HoodieTableConfig.java:
##########
@@ -121,10 +132,34 @@ public class HoodieTableConfig extends HoodieConfig {
   public static final String PARTIAL_UPDATE_CUSTOM_MARKER = 
"hoodie.write.partial.update.custom.marker";
   public static final String DEBEZIUM_UNAVAILABLE_VALUE = 
"__debezium_unavailable_value";
   // This prefix is used to set merging related properties.
-  // A reader might need to read some merger properties to function as 
expected,
-  // and Hudi stores properties with this prefix so the reader parses these 
properties,
-  // and produces a map of key value pairs (Key1->Value1, Key2->Value2, ...) 
to use.
-  public static final String MERGE_PROPERTIES_PREFIX = 
"hoodie.table.merge.properties.";
+  // A reader might need to read some writer properties to function as 
expected,
+  // and Hudi stores properties with this prefix so the reader parses these 
properties to fetch any custom property.
+  public static final String MERGE_CUSTOM_PROPERTY_PREFIX = 
"hoodie.merge.custom.property.";
+  public static final Set<String> PAYLOADS_UNDER_DEPRECATION = 
Collections.unmodifiableSet(
+      new HashSet<>(Arrays.asList(
+          AWSDmsAvroPayload.class.getName(),
+          DefaultHoodieRecordPayload.class.getName(),
+          EventTimeAvroPayload.class.getName(),
+          MySqlDebeziumAvroPayload.class.getName(),
+          OverwriteNonDefaultsWithLatestAvroPayload.class.getName(),
+          OverwriteWithLatestAvroPayload.class.getName(),
+          PartialUpdateAvroPayload.class.getName(),
+          PostgresDebeziumAvroPayload.class.getName())));
+
+  public static final Set<String> EVENT_TIME_BASED_PAYLOADS = 
Collections.unmodifiableSet(

Review Comment:
   Fixed



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