avro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AVRO-1473) Nested schema reference with empty namespace cannot be parsed
Date Thu, 13 Mar 2014 19:37:47 GMT

    [ https://issues.apache.org/jira/browse/AVRO-1473?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13933935#comment-13933935
] 

Hudson commented on AVRO-1473:
------------------------------

SUCCESS: Integrated in AvroJava #445 (See [https://builds.apache.org/job/AvroJava/445/])
AVRO-1473. Java: Fix references to names in the empty namespace.  Contributed by Gabriel Reid.
(cutting: rev 1577275)
* /avro/trunk/CHANGES.txt
* /avro/trunk/lang/java/avro/src/main/java/org/apache/avro/Schema.java
* /avro/trunk/lang/java/ipc/src/test/java/org/apache/avro/TestSchema.java


> Nested schema reference with empty namespace cannot be parsed
> -------------------------------------------------------------
>
>                 Key: AVRO-1473
>                 URL: https://issues.apache.org/jira/browse/AVRO-1473
>             Project: Avro
>          Issue Type: Bug
>          Components: java
>            Reporter: Gabriel Reid
>            Assignee: Gabriel Reid
>             Fix For: 1.7.7
>
>         Attachments: AVRO-1473.patch
>
>
> Related to AVRO-1295, a reference to a nested named schema with an empty namespace cannot
be parsed. An example of such a schema is as follows:
> {code}
> {
>   "type" : "record",
>   "name" : "Outer",
>   "namespace" : "space",
>   "fields" : [ {
>     "name" : "f1",
>     "type" : {
>       "type" : "record",
>       "name" : "Inner",
>       "namespace" : "",
>       "fields" : [ ]
>     }
>   }, {
>     "name" : "f2",
>     "type" : "Inner"
>   } ]
> }
> {code}
> Attempting to parse this results in the following exception:
> org.apache.avro.SchemaParseException: "Inner" is not a defined name. The type of the
"f2" field must be a defined name or a \{"type": ...\} expression.
> The issue seems to be that the lookup for the name "Inner" is done with the namspace
of the encoding record, and not with the empty namespace for this case.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message