You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2022/06/13 08:35:00 UTC
[jira] [Work logged] (AVRO-3374) [Java] Fully qualified type reference "ns.int" loses namespace.
[ https://issues.apache.org/jira/browse/AVRO-3374?focusedWorklogId=780743&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-780743 ]
ASF GitHub Bot logged work on AVRO-3374:
----------------------------------------
Author: ASF GitHub Bot
Created on: 13/Jun/22 08:34
Start Date: 13/Jun/22 08:34
Worklog Time Spent: 10m
Work Description: clesaec commented on PR #1688:
URL: https://github.com/apache/avro/pull/1688#issuecomment-1153635003
@RyanSkraba : friendly reminder, if you have time to see this PR.
Issue Time Tracking
-------------------
Worklog Id: (was: 780743)
Time Spent: 20m (was: 10m)
> [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
> Assignee: Christophe Le Saec
> Priority: Minor
> Labels: pull-requests-available
> Fix For: 1.12.0
>
> Attachments: AVRO-3374.patch
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> 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.7#820007)