avro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AVRO-1931) SchemaCompatibility fails to recognize reader compatible with all branches of a union
Date Fri, 18 Aug 2017 14:58:02 GMT

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

ASF subversion and git services commented on AVRO-1931:
-------------------------------------------------------

Commit 15651fc95e058d1b3cc165a70c367d1dc2bad8b7 in avro's branch refs/heads/master from [~epkanol]
[ https://git-wip-us.apache.org/repos/asf?p=avro.git;h=15651fc ]

AVRO-1931: Reader is now compatible if able to read all branches of union

Closes #199

Signed-off-by: Sriharsha Chintalapani <sriharsha@apache.org>
Signed-off-by: Nandor Kollar <nkollar@cloudera.com>
Signed-off-by: Sean Busbey <busbey@apache.org>


> SchemaCompatibility fails to recognize reader compatible with all branches of a union
> -------------------------------------------------------------------------------------
>
>                 Key: AVRO-1931
>                 URL: https://issues.apache.org/jira/browse/AVRO-1931
>             Project: Avro
>          Issue Type: Bug
>          Components: java
>    Affects Versions: 1.7.7, 1.8.1
>         Environment: Java
>            Reporter: Anders Sundelin
>            Assignee: Anders Sundelin
>            Priority: Minor
>              Labels: patch
>             Fix For: 1.7.8, 1.9.0, 1.8.3
>
>         Attachments: AVRO-1931-2.patch
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> It is stated in the Avro spec
> "if writer's is a union, but reader's is not:
> If the reader's schema matches the selected writer's schema, it is recursively resolved
against it. If they do not match, an error is signalled."
> In case a the chosen reader is compatible with all branches of the union in the writer,
then the class SchemaCompatibility should reflect this. Currently it does not.
> The submitted patch corrects this (also added tests showing this behaviour in Avro)
> The new tests, in the class TestReadingWritingDataInEvolvedSchemas, could be redundant,
but they were very useful when exploring how Avro actually works during de-/serialization
> I will try to continue working a little bit on the SchemaCompatibility class, adding
more user-friendly error messages (suitable for deeper structures than todays error message).
Feel free to contact me if you have any ideas or pointers to existing work.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message