avro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "graham sanderson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AVRO-1385) Enum reader/writer resolution doesn't report errors
Date Fri, 11 Oct 2013 02:08:41 GMT

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

graham sanderson commented on AVRO-1385:

Note I didn't write the spec, but notice it is very clear that in the enum section, it doesn't
used the word "schema" at all whereas it does in others.

Personally I think this is desirable behavior for enums (and indeed the code appears to have
been written this way), i.e. the reader's enum schema can be different from the writer's enum
schema, as long as you don't attempt to read records containing enum values not in the reader's
enum schema. Otherwise evolving schemas to remove enum values would be impossible.

> Enum reader/writer resolution doesn't report errors
> ---------------------------------------------------
>                 Key: AVRO-1385
>                 URL: https://issues.apache.org/jira/browse/AVRO-1385
>             Project: Avro
>          Issue Type: Bug
>          Components: java
>    Affects Versions: 1.7.5
>            Reporter: Christophe Taton
>         Attachments: AVRO-1385.base=a56e7f13c4fa976b7926649b058665f42850a349.20131010-182234.patch
> According to the specification, when a reader enum does not contain all symbols from
the writer enum, an error should be signaled.
> ResolvingGrammarGenerator fails to report such errors.
> In particular, mkEnumAdjust() silently maps unknown symbols of the writers with symbols
named "No match for [writer symbol]".
> https://github.com/apache/avro/blob/trunk/lang/java/avro/src/main/java/org/apache/avro/io/parsing/ResolvingGrammarGenerator.java#L409
> Shouldn't this instead create an ErrorAction?

This message was sent by Atlassian JIRA

View raw message