You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Anil Mor (JIRA)" <ji...@apache.org> on 2019/04/25 12:47:00 UTC

[jira] [Created] (AVRO-2379) AvroRuntimeException: Not a union

Anil Mor created AVRO-2379:
------------------------------

             Summary: AvroRuntimeException: Not a union
                 Key: AVRO-2379
                 URL: https://issues.apache.org/jira/browse/AVRO-2379
             Project: Apache Avro
          Issue Type: Bug
    Affects Versions: 1.8.2
            Reporter: Anil Mor


We are facing a similar issue which has been already raised.
https://issues.apache.org/jira/browse/AVRO-2125

We are using apache beam(2.11.0).

 
{code:java}
Caused by: org.apache.avro.AvroRuntimeException: Not a union: {"type":"record","name":"URLParameter","namespace":"com.wingify.beamer.models.avro","fields":[{"name":"key","type":["null",{"type":"string","avro.java.string":"String"}],"default":null},{"name":"value","type":["null",{"type":"string","avro.java.string":"String"}],"default":null}]}

{code}
Here are the schemas

URLParameter.avsc

 
{code:java}
{"namespace": "com.test.beamer.models.avro",
 "type": "record",
 "name": "URLParameter",
 "fields": [
        {"name":"key", "type":["null","string"],"default": null},
        {"name":"value", "type":["null","string"],"default": null}
     ]
 }
{code}
 

 

BQEvent.avsc
{code:java}
// code placeholder
{"namespace": "com.test.beamer.models.avro",
 "type": "record",
 "name": "BQEvent",
 "fields": [
         {"name": "queryParams",  "type":{
             "type": "array",
             "items":"URLParameter"
             },
         "default": []
         }
 ]
}{code}



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