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

SpecificDatumReader fails to construct when using a multidimensional array of a custom type

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Critical
    • Resolution: Unresolved
    • 1.7.7
    • None
    • csharp
    • None

    Description

      Using generated C# code from a schema like the example below I get an AvroException in ObjectCreator.FindType when attempting to construct a SpecificDatumReader. The exception text for the example below will mention not being able to find the type "System.Collections.Generic.IList`1[mynamespace.Item]" in all loaded assemblies. I've seen that a similar issue AVRO-1109 has been raised and resolved before, and multidimensional arrays of simple types seem to be ok but complex types seem to still be a problem. The same applies to maps of arrays. I assume that maps of maps also have the same issue but I haven't tested this.

      {
        "type": "record",
        "name": "Test",
        "namespace": "mynamespace",
        "fields": [
          "name" : "multidimensional",
          "type" : {
            "type" : "array",
            "items": {
              "type": "array",
              "items" : {
                "type" : "record",
                "name" : "Item",
                "fields" : [
                  {
                    "name": "some_field",
                    "type": "string"
                  },
                  {
                    "name": "another_field",
                    "type": "string"
                  }
                ]
              }
            }
          }
        ]
      }
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            PaddyD Patrick Drury
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: