danny0405 commented on code in PR #14120:
URL: https://github.com/apache/hudi/pull/14120#discussion_r2450308857


##########
hudi-hadoop-mr/src/main/java/org/apache/hudi/hadoop/HiveHoodieReaderContext.java:
##########
@@ -127,8 +128,8 @@ private ClosableIterator<ArrayWritable> 
getFileRecordIterator(StoragePath filePa
     // mdt file schema irregular and does not work with this logic. Also, log 
file evolution is handled inside the log block
     boolean isParquetOrOrc = 
filePath.getFileExtension().equals(HoodieFileFormat.PARQUET.getFileExtension())
         || 
filePath.getFileExtension().equals(HoodieFileFormat.ORC.getFileExtension());
-    Schema avroFileSchema = isParquetOrOrc ? 
HoodieIOFactory.getIOFactory(storage)
-        .getFileFormatUtils(filePath).readAvroSchema(storage, filePath) : 
dataSchema;
+    Schema avroFileSchema = AvroSchemaRepair.repairLogicalTypes(isParquetOrOrc 
? HoodieIOFactory.getIOFactory(storage)

Review Comment:
   if it isn't parquet or orc, there is even no need to call 
`AvroSchemaRepair.repairLogicalTypes`



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