You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Oscar Westra van Holthe - Kind (Jira)" <ji...@apache.org> on 2021/11/23 16:54:00 UTC
[jira] [Assigned] (AVRO-2866) Avro IDL: idl2schemata does not respect enum defaults on record fields
[ https://issues.apache.org/jira/browse/AVRO-2866?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Oscar Westra van Holthe - Kind reassigned AVRO-2866:
----------------------------------------------------
Assignee: Oscar Westra van Holthe - Kind
> Avro IDL: idl2schemata does not respect enum defaults on record fields
> ----------------------------------------------------------------------
>
> Key: AVRO-2866
> URL: https://issues.apache.org/jira/browse/AVRO-2866
> Project: Apache Avro
> Issue Type: Bug
> Reporter: Roger
> Assignee: Oscar Westra van Holthe - Kind
> Priority: Major
>
> I ran the idl2schemata tool (using avro-tools release-1.10.0-rc1) on this avdl file:
> {code:none}
> protocol p {
> record R {
> Color col = "RED";
> }
> enum Color {
> RED,
> BLUE
> }
> }
> {code}
> I get this resulting file in R.avsc:
> {code:json}
> {
> "type" : "record",
> "name" : "R",
> "fields" : [ {
> "name" : "col",
> "type" : {
> "type" : "enum",
> "name" : "Color",
> "symbols" : [ "RED", "BLUE" ]
> }
> } ]
> }
> {code}
> There is no "default" in the R.col field, which means there's no way to specify an enum-valued field that can later be removed in a backwardly compatible way, or to add an enum-valued field that's compatible with old schemas.
> I'd expect to see a {{"default": "RED"}} entry.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)