xicm commented on code in PR #8873:
URL: https://github.com/apache/hudi/pull/8873#discussion_r1213997462
##########
hudi-hadoop-mr/src/main/java/org/apache/hudi/hadoop/utils/HiveAvroSerializer.java:
##########
@@ -336,8 +337,12 @@ private Object serializeList(ListTypeInfo typeInfo,
ListObjectInspector fieldOI,
// NOTE: We have to resolve nullable schema, since Avro permits array
elements
// to be null
Schema arrayNestedType = resolveNullableSchema(schema.getElementType());
- Schema elementType = arrayNestedType.getField("element") == null ?
arrayNestedType : arrayNestedType.getField("element").schema();
-
+ Schema elementType;
+ if (listElementObjectInspector.getCategory() ==
ObjectInspector.Category.PRIMITIVE) {
+ elementType = arrayNestedType;
+ } else {
+ elementType = arrayNestedType.getField("element") == null ?
arrayNestedType : arrayNestedType.getField("element").schema();
Review Comment:
Hi @xiarixiaoyao , Can you help explain when the `element` will be available?
--
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]