[
https://issues.apache.org/jira/browse/AVRO-3374?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17489816#comment-17489816
]
ASF subversion and git services commented on AVRO-3374:
-------------------------------------------------------
Commit f126908aa18a2874512067bfc41f14cd8b6f55c4 in avro's branch
refs/heads/branch-1.11 from Martin Tzvetanov Grigorov
[ https://gitbox.apache.org/repos/asf?p=avro.git;h=f126908 ]
AVRO-3374: Fully qualified type reference "ns.int" loses namespace.
Add a unit test showing that the Rust impl behaves as desired.
Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>
(cherry picked from commit 8988196545a17e76a984b07313dd4a86497c9e02)
> [Java] Fully qualified type reference "ns.int" loses namespace.
> ---------------------------------------------------------------
>
> Key: AVRO-3374
> URL: https://issues.apache.org/jira/browse/AVRO-3374
> Project: Apache Avro
> Issue Type: Bug
> Components: java
> Affects Versions: 1.11.0
> Reporter: Ryan Skraba
> Priority: Minor
>
> While brainstorming for AVRO-3370, I came across this special case where a
> type-reference could be considered ambiguous if the SDK is not careful when
> simplifying inherited namespaces:
> {code:json}
> {
> "type" : "record",
> "name" : "ns.int",
> "fields" : [
> {"name" : "value", "type" : "int"},
> {"name" : "next", "type" : [ "null", "ns.int" ]}
> ]
> }
> {code}
> In Java, if this code is parsed, it works as expected (as a linked list).
> If the schema is turned to a String using toString(), the namespace is
> dropped off the last {*}{{ns.int}}{*}, turning it into the primitive. That
> string can still be parsed into a Schema, but the "round-trip" modifies the
> schema in an incompatible way.
> That namespace shouldn't be dropped when producing the JSON string
> representing the Schema in Java.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)