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


##########
hudi-common/src/main/java/org/apache/hudi/common/table/log/block/HoodieAvroDataBlock.java:
##########
@@ -187,11 +188,12 @@ private RecordIterator(Schema readerSchema, Schema 
writerSchema, byte[] content)
         this.totalRecords = this.dis.readInt();
       }
 
-      if (recordNeedsRewriteForExtendedAvroTypePromotion(writerSchema, 
readerSchema)) {
-        this.reader = new GenericDatumReader<>(writerSchema, writerSchema);
+      Schema repairedWriterSchema = 
AvroSchemaRepair.repairLogicalTypes(writerSchema, readerSchema);

Review Comment:
   yeah, looks like a legacy code, from the constructor in line 200, it looks 
like the same schemas:
   
   ```java
       public static RecordIterator getInstance(HoodieAvroDataBlock dataBlock, 
byte[] content) throws IOException {
         return new RecordIterator(dataBlock.readerSchema, 
dataBlock.getSchemaFromHeader(), content);
       }
   ```



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