KiteSoar commented on code in PR #17772:
URL: https://github.com/apache/hudi/pull/17772#discussion_r2658788547


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/commit/HoodieMergeHelper.java:
##########
@@ -208,9 +208,9 @@ private Option<Function<HoodieRecord, HoodieRecord>> 
composeSchemaEvolutionTrans
         Map<String, String> renameCols = 
InternalSchemaUtils.collectRenameCols(writeInternalSchema, querySchema);
         return Option.of(record -> {
           return record.rewriteRecordWithNewSchema(
-              recordSchema.toAvroSchema(),
+              recordSchema,
               writeConfig.getProps(),
-              newWriterSchema, renameCols);
+              HoodieSchema.fromAvroSchema(newWriterSchema), renameCols);

Review Comment:
   Ok, I've applied this change in the latest commit. However, although the 
`.getAvroSchema()` call was removed on line 203, a call to `.toAvroSchema()` 
needed to be added on line 206 because 
`SchemaCompatibility.checkReaderWriterCompatibility()` requires an Avro Schema 
parameter. So, the conversion was simply moved to a different location.



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