wombatu-kun commented on code in PR #18375:
URL: https://github.com/apache/hudi/pull/18375#discussion_r3205800159


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/io/HoodieReadHandle.java:
##########
@@ -68,14 +70,18 @@ protected HoodieBaseFile getLatestBaseFile() {
   }
 
   protected HoodieFileReader createNewFileReader() throws IOException {
-    return HoodieIOFactory.getIOFactory(hoodieTable.getStorage())
-        .getReaderFactory(this.config.getRecordMerger().getRecordType())
-        .getFileReader(config, getLatestBaseFile().getStoragePath());
+    return createNewFileReader(getLatestBaseFile());
   }
 
   protected HoodieFileReader createNewFileReader(HoodieBaseFile 
hoodieBaseFile) throws IOException {
+    String extension = hoodieBaseFile.getStoragePath().getFileExtension();
+    HoodieFileFormat format = 
HoodieFileFormat.fromFileExtensionOrNull(extension);
+    HoodieRecord.HoodieRecordType mergerRecordType = 
this.config.getRecordMerger().getRecordType();
+    HoodieRecord.HoodieRecordType recordType = format != null

Review Comment:
   Done in `632207766a33`. Added 
`HoodieFileFormat.resolveRecordTypeForExtension(extension, fallback)`; folded 
`HoodieReadHandle.createNewFileReader`, 
`HoodieFileWriterFactory.getFileWriter`, and 
`HoodieIndexUtils.filterKeysFromFile` into one-liners.



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