jonvex commented on code in PR #12395:
URL: https://github.com/apache/hudi/pull/12395#discussion_r1870162400


##########
hudi-common/src/main/java/org/apache/hudi/common/table/read/HoodieBaseFileGroupRecordBuffer.java:
##########
@@ -253,10 +261,10 @@ protected Option<Pair<T, Map<String, Object>>> 
doProcessNextDataRecord(T record,
             } else {
               Option<Pair<HoodieRecord, Schema>> combinedRecordAndSchemaOpt = 
recordMerger.get().merge(
                   readerContext.constructHoodieRecord(Option.of(record), 
metadata),
-                  (Schema) metadata.get(INTERNAL_META_SCHEMA),
+                  
readerContext.getSchemaHandler().decodeAvroSchema(metadata.get(INTERNAL_META_SCHEMA_ID)),
                   readerContext.constructHoodieRecord(
                       existingRecordMetadataPair.getLeft(), 
existingRecordMetadataPair.getRight()),
-                  (Schema) 
existingRecordMetadataPair.getRight().get(INTERNAL_META_SCHEMA),
+                  
readerContext.getSchemaHandler().decodeAvroSchema(existingRecordMetadataPair.getRight().get(INTERNAL_META_SCHEMA_ID)),

Review Comment:
   instead of having readerContext.getSchemaHandler().decodeAvroSchema(
   make a method in the schema handler getSchemaFromRecordMetadata() that takes 
in the map instead of calling get(INTERNAL_META_SCHEMA_ID) a bunch of times



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