M. Justin created AVRO-3946:
-------------------------------
Summary: Support single-element unions for Java code generation
Key: AVRO-3946
URL: https://issues.apache.org/jira/browse/AVRO-3946
Project: Apache Avro
Issue Type: Improvement
Components: java, tools
Affects Versions: 1.11.3
Environment: [Avro
specification|https://avro.apache.org/docs/1.11.1/specification/#unions]
Reporter: M. Justin
I am writing code to integrate with existing Avro-based data created by someone
else. Their schema currently has one-element unions for their types, rather
than just the specific types. For example:
{code:json}
{
"type": "record",
"name": "Issue",
"namespace": "invalid.example",
"fields": [
{
"name": "long1",
"type": ["long"]
}
]
}
{code}
instead of:
{code:json}
{
"type": "record",
"name": "Issue",
"namespace": "invalid.example",
"fields": [
{
"name": "long1",
"type": "long"
}
]
}
{code}
While this isn't idiomatic, looking at the
--
This message was sent by Atlassian Jira
(v8.20.10#820010)