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

Thiruvalluvan M. G. updated AVRO-2010:
--------------------------------------
    Fix Version/s: 1.9.0

> multi dimensional array schema is not generated as expected
> -----------------------------------------------------------
>
>                 Key: AVRO-2010
>                 URL: https://issues.apache.org/jira/browse/AVRO-2010
>             Project: Apache Avro
>          Issue Type: Bug
>          Components: c++
>         Environment: Ubuntu 14.04, boost 1.62
>            Reporter: Philip Henzler
>            Assignee: Thiruvalluvan M. G.
>            Priority: Major
>             Fix For: 1.9.0
>
>
> I made the following change to the unittest.cc, adding a two dimensional 
> array to the buildSchema() test:
> {code}
> ArraySchema array = ArraySchema(DoubleSchema());
> const std::string s("myarray");
> record.addField(s, array);
> ArraySchema array2 = ArraySchema(ArraySchema(DoubleSchema()));
> const std::string s2("my2dimarray");
> record.addField(s2, array2);
> {code}
> It creates the following JSON schema output:
> {code}
> {
>     "name": "myarray",
>     "type": {
>         "type": "array",
>         "items": "double"
>     }
> },
> {
>     "name": "my2dimarray",
>     "type": {
>         "type": "array",
>         "items": "double"
>     }
> }
> {code}
> Even tough I would expect the following output for the two dimensional case:
> {code}
> {
>     "name": "my2dimarray",
>     "type": {
>         "type": "array",
>         "items": {
>             "type": "array",
>             "items": "double"
>         }
>     }
> }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to