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:52:42 GMT

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

graham sanderson commented on AVRO-1385:

Doug - we wrote responses at the same time, but - I was wondering about other cases too, but
just read the spec, because enum is a case I particularly care about (though haven't had to
remove yet). I agree with you, but to be specific in this situation; I think that if at least
a single possible datum exists written in the writer's schema that can be read by the reader's
schema, then the failure should only be at runtime. Of course there may be some cases where
for one reason or another you might choose to make further restriction for implementation

> 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