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


##########
hudi-common/src/main/java/org/apache/hudi/common/table/read/HoodieBaseFileGroupRecordBuffer.java:
##########
@@ -84,23 +96,24 @@ public abstract class HoodieBaseFileGroupRecordBuffer<T> 
implements HoodieFileGr
 
   public HoodieBaseFileGroupRecordBuffer(HoodieReaderContext<T> readerContext,
                                          HoodieTableMetaClient 
hoodieTableMetaClient,
+                                         RecordMergeMode recordMergeMode,
                                          Option<String> 
partitionNameOverrideOpt,
                                          Option<String[]> 
partitionPathFieldOpt,
-                                         HoodieRecordMerger recordMerger,
                                          TypedProperties props) {
     this.readerContext = readerContext;
     this.readerSchema = readerContext.getSchemaHandler().getRequiredSchema();
     this.partitionNameOverrideOpt = partitionNameOverrideOpt;
     this.partitionPathFieldOpt = partitionPathFieldOpt;
-    this.recordMergeMode = getRecordMergeMode(props);
-    this.recordMerger = recordMerger;
+    this.recordMergeMode = recordMergeMode;
+    this.recordMerger = readerContext.getRecordMerger();
+    if (recordMerger.isPresent() && 
recordMerger.get().getMergingStrategy().equals(PAYLOAD_BASED_MERGER_STRATEGY_UUID))
 {
+      this.payloadClass = Option.of(ConfigUtils.getAvroPayloadClass(props));
+    } else {
+      this.payloadClass = Option.empty();
+    }

Review Comment:
   A follow-up Jira ticket will be created on this: 
https://github.com/apache/hudi/pull/11943#discussion_r1811089951



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