linliu-code commented on code in PR #9819:
URL: https://github.com/apache/hudi/pull/9819#discussion_r1357993749


##########
hudi-common/src/main/java/org/apache/hudi/common/table/read/HoodieFileGroupReader.java:
##########
@@ -128,6 +137,33 @@ public HoodieFileGroupReader(HoodieReaderContext<T> 
readerContext,
     this.readerState.baseFileAvroSchema = avroSchema;
     this.readerState.logRecordAvroSchema = avroSchema;
     this.readerState.mergeProps.putAll(props);
+
+    FileSystem fs = readerContext.getFs(logFilePathList.get().get(0), 
hadoopConf);
+    HoodieTableMetaClient metaClient = HoodieTableMetaClient
+        .builder().setConf(fs.getConf()).setBasePath(tablePath).build();
+
+    HoodieFileGroupRecordBuffer keyBasedRecordBuffer = new 
HoodieKeyBasedFileGroupRecordBuffer(
+        readerContext,
+        readerState.logRecordAvroSchema,
+        readerState.baseFileAvroSchema,
+        Option.of(getRelativePartitionPath(
+            new Path(readerState.tablePath), new 
Path(logFilePathList.get().get(0)).getParent())),
+        Option.of(metaClient.getTableConfig().getPartitionFields()),
+        recordMerger,
+        props,
+        metaClient);
+    HoodieFileGroupRecordBuffer positionBasedRecordBuffer = new 
HoodiePositionBasedFileGroupRecordBuffer(
+        readerContext,

Review Comment:
   Move it out of this this class.



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