[
https://issues.apache.org/jira/browse/AVRO-2115?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16289106#comment-16289106
]
Miguel commented on AVRO-2115:
------------------------------
I have prepared a patch. Check it out at
[GitHub|https://github.com/elmendavies/avro/commit/c412267d1d32ab10a929f189cb53cfb3cc619300].
It is applied into master (I did not know where to apply it). Hope it helps.
> Support @Union in members too
> -----------------------------
>
> Key: AVRO-2115
> URL: https://issues.apache.org/jira/browse/AVRO-2115
> Project: Avro
> Issue Type: Improvement
> Reporter: Miguel
> Priority: Minor
>
> Allow defining unions in members:
> {code:java}
> class MyDatum {
> @Nullable
> @Union({String.class, Long.class, Other.class,...})
> Object o;
> }
> {code}
> It can currently be implemented using @AvroSchema like this, but it is seems
> in my oppinion more verbose and more difficult to maintain:
> {code:java}
> @AvroSchema("[\"null\",\"string\",...")
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)