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


##########
hudi-common/src/main/java/org/apache/hudi/avro/AvroSchemaUtils.java:
##########
@@ -206,6 +207,18 @@ private static boolean isProjectionOfInternal(Schema 
sourceSchema,
     return atomicTypeEqualityPredicate.apply(sourceSchema, targetSchema);
   }
 
+  public static Option<Schema.Type> findNestedFieldType(Schema schema, String 
fieldName) {

Review Comment:
   `HoodieAvroUtils .getNestedFieldSchemaFromRecord` uses the actual generic 
record. I would have thought `HoodieAvroUtils 
.getNestedFieldSchemaFromWriteSchema` would do exactly that, but it doesn't. I 
honestly confused af about what `TestHoodieAvroUtils.testGetNestedFieldSchema` 
is trying to do. It puts firstname and lastname as both top level and nested 
fields, and then it's just getting the schema from the top level fields and not 
the nested ones. 



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