opwvhk commented on a change in pull request #1355:
URL: https://github.com/apache/avro/pull/1355#discussion_r779371758
##########
File path:
lang/java/avro/src/main/java/org/apache/avro/reflect/ReflectDatumReader.java
##########
@@ -287,6 +288,26 @@ protected void readField(Object record, Field field,
Object oldDatum, ResolvingD
return;
}
}
+
+ if (field.schema().isUnion()) {
Review comment:
This just occurred to me: maybe we should bypass this union issue by
adding the target type property to the schema with the logical type. After all,
the underlying cause is that some conversions (most commonly date/time
conversions) have multiple target types.
Anyway, have a look at the callsites of `makeNullable` and
`getAnnotatedUnion` and choose the best/easiest option.
--
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]