[ 
https://issues.apache.org/jira/browse/AVRO-4211?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Long Tang reassigned AVRO-4211:
-------------------------------


> IDLUtils cannot generate schema for union fields with a default value that is 
> NOT the 1st element
> -------------------------------------------------------------------------------------------------
>
>                 Key: AVRO-4211
>                 URL: https://issues.apache.org/jira/browse/AVRO-4211
>             Project: Apache Avro
>          Issue Type: Improvement
>            Reporter: Long Tang
>            Assignee: Christophe Le Saec
>            Priority: Trivial
>              Labels: pull-request-available
>             Fix For: 1.12.0
>
>
> 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)

Reply via email to