[
https://issues.apache.org/jira/browse/AVRO-3649?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17760855#comment-17760855
]
ASF subversion and git services commented on AVRO-3649:
-------------------------------------------------------
Commit b7c03c38375b32ad08792cae9ca3786692745656 in avro's branch
refs/heads/branch-1.11 from Martin Tzvetanov Grigorov
[ https://gitbox.apache.org/repos/asf?p=avro.git;h=b7c03c383 ]
AVRO-3649: default for union inside union
Fix build after cherry-picking
https://github.com/apache/avro/commit/c28dbe9f7d485f5e5d1df41df1bb2c12c838b5db
to branch-1.11
Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>
> [JAVA] reorder union types to match default value
> -------------------------------------------------
>
> Key: AVRO-3649
> URL: https://issues.apache.org/jira/browse/AVRO-3649
> Project: Apache Avro
> Issue Type: Improvement
> Reporter: Daniel Heinrich
> Assignee: Christophe Le Saec
> Priority: Trivial
> Labels: pull-request-available
> Time Spent: 3.5h
> Remaining Estimate: 0h
>
> The Avro specification requires that a default value matches the first schema
> of a union type.
>
> Using @Nullable on a field will return a union type of the form ["null",
> "<something>"].
> @Nullable also sets the default value to "null".
>
> It is not possible to override this default value w{color:#172b4d}ith
> @AvroDefault because of the order of the schemas in the generated
> union.{color}
>
> It would be nice that union types are automatically reordered to match the
> type of the provided default value.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)