You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Doug Cutting (JIRA)" <ji...@apache.org> on 2013/11/06 00:18:18 UTC
[jira] [Commented] (AVRO-1394) Better error information when new
record field has no default
[ https://issues.apache.org/jira/browse/AVRO-1394?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13814386#comment-13814386 ]
Doug Cutting commented on AVRO-1394:
------------------------------------
Thanks for the patch! A unit test would be good to have. This should not be too hard to create using the generic data representation.
> Better error information when new record field has no default
> -------------------------------------------------------------
>
> Key: AVRO-1394
> URL: https://issues.apache.org/jira/browse/AVRO-1394
> Project: Avro
> Issue Type: Improvement
> Reporter: David Carr
> Priority: Minor
> Attachments: AVRO-1394.patch
>
>
> Currently, if you add a field to a schema without a default, and attempt to read a record with the new schema that was written with the old (pre-field-creation) schema, you get an error like this:
> org.apache.avro.AvroTypeException: Found mypackage.MyRecordType, expecting mypackage.MyRecordType
> This message is accurate, but doesn't help the user recognize the real problem: there's a required field that isn't present in the written data. Please enhance the error message to make it more informative.
--
This message was sent by Atlassian JIRA
(v6.1#6144)