avro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Patrick Drury (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (AVRO-1654) SpecificDatumReader fails to construct when using a multidimensional array of a custom type
Date Mon, 30 Mar 2015 16:27:52 GMT

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

Patrick Drury updated AVRO-1654:
--------------------------------
    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.

{code}
{
  "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"
            }
          ]
        }
      }
    }
  ]
}
{code}

  was:
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.

{code}
{
  "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"
            }
          ]
        }
      }
    }
  ]
}
{code}


> SpecificDatumReader fails to construct when using a multidimensional array of a custom
type
> -------------------------------------------------------------------------------------------
>
>                 Key: AVRO-1654
>                 URL: https://issues.apache.org/jira/browse/AVRO-1654
>             Project: Avro
>          Issue Type: Bug
>          Components: csharp
>    Affects Versions: 1.7.7
>            Reporter: Patrick Drury
>
> 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.
> {code}
> {
>   "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"
>             }
>           ]
>         }
>       }
>     }
>   ]
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message