nsivabalan commented on code in PR #17601:
URL: https://github.com/apache/hudi/pull/17601#discussion_r2730139359


##########
hudi-common/src/main/java/org/apache/hudi/avro/AvroSchemaUtils.java:
##########
@@ -471,4 +494,15 @@ public static Schema asNullable(Schema schema) {
         (change, field) -> change.updateColumnNullability(field, true));
     return convert(SchemaChangeUtils.applyTableChanges2Schema(internalSchema, 
schemaChange), schema.getFullName());
   }
+
+  public static Schema getRepairedSchema(Schema writerSchema, Schema 
readerSchema) {
+    try {
+      Class<?> avroSchemaRepairClass = 
Class.forName("org.apache.parquet.schema.AvroSchemaRepair");
+      Method repairMethod = 
avroSchemaRepairClass.getMethod("repairLogicalTypes", Schema.class, 
Schema.class);
+      return (Schema) repairMethod.invoke(null, writerSchema, readerSchema);

Review Comment:
   isn't the 1st arg avroSchemaRepairClass?



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