Moritz Hoffmann created AVRO-3155:
-------------------------------------

             Summary: Schema specification inconsistently describes default 
value for types
                 Key: AVRO-3155
                 URL: https://issues.apache.org/jira/browse/AVRO-3155
             Project: Apache Avro
          Issue Type: Bug
    Affects Versions: 1.10.2, 1.10.1, 1.10.0
            Reporter: Moritz Hoffmann


The Avro schema describes that types have default values, which seems to be 
inconsistent. Previously to 1.10, only fields had default values, but types did 
not. Since 1.10, the documentation for the map type states:

For example, a map from string to long is declared with:
{code:java}
{
 "type": "map",
 "values" : "long",
 "default": {}
 }{code}
Notice that the type declaration now carries a default value.

The change was introduced with AVRO-2574. However, the parser currently 
(1.10.x) does not accept default values on types, but only on fields. The spec 
for the array type was modified in a similar fashion.

We encountered this problem when implementing Avro support for Materialize, see 
[https://github.com/MaterializeInc/materialize/issues/6433] for a bug on our 
end.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to