avro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Carr (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (AVRO-1394) Better error information when new record field has no default
Date Tue, 05 Nov 2013 22:24:17 GMT

     [ https://issues.apache.org/jira/browse/AVRO-1394?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

David Carr updated AVRO-1394:
-----------------------------

    Attachment: AVRO-1394.patch

Patch attached with proposed enhanced error.  Please review according to the code review checklist.
 No test is included, as wording of error symbols doesn't seem to be something that is currently
tested.  If that is not the case, I'd be happy to provide a test.

I grant license to the ASF to include this patch in ASF works as per the Apache license.

> 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)

Mime
View raw message