Uploaded image for project: 'Avro'
  1. Avro
  2. AVRO-2010

multi dimensional array schema is not generated as expected

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: c++
    • Labels:
      None
    • Environment:

      Ubuntu 14.04, boost 1.62

      Description

      I made the following change to the unittest.cc, adding a two dimensional array to the buildSchema() test:

      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);
      

      It creates the following JSON schema output:

      {
          "name": "myarray",
          "type": {
              "type": "array",
              "items": "double"
          }
      },
      {
          "name": "my2dimarray",
          "type": {
              "type": "array",
              "items": "double"
          }
      }
      

      Even tough I would expect the following output for the two dimensional case:

      {
          "name": "my2dimarray",
          "type": {
              "type": "array",
              "items": {
                  "type": "array",
                  "items": "double"
              }
          }
      }
      

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            phhe Philip Henzler
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:

              Development