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


##########
hudi-common/src/main/java/org/apache/hudi/common/util/ConfigUtils.java:
##########
@@ -151,7 +151,13 @@ public static TypedProperties 
supplementOrderingFields(TypedProperties props, Li
    * Ensures that the prefixed merge properties are populated for mergers.
    */
   public static TypedProperties getMergeProps(TypedProperties props, 
HoodieTableConfig tableConfig) {
-    Map<String, String> mergeProps = tableConfig.getTableMergeProperties();
+    // Resolve the effective payload class from the reader/write props first 
-- it may be set only
+    // there (e.g. hoodie.datasource.write.payload.class for a pre-v9 table 
that never persisted the
+    // payload class into its table config), falling back to the table config. 
This ensures the
+    // pre-v9 delete-marker derivation in getTableMergeProperties fires for 
such tables.
+    String payloadClass = 
HoodieRecordPayload.getPayloadClassNameIfPresent(props)

Review Comment:
   It makes more sense to use table config first and then get the payload class 
name from write configs.



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