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 2010/08/03 20:26:24 UTC

[jira] Commented: (AVRO-603) SpecificDatumReader requires the reader's schema to be set manually

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

Doug Cutting commented on AVRO-603:
-----------------------------------

SpecificDatumReader's constructor may set both the expected and actual, but DataFileReader should reset the actual schema from the file.

Can you provide a test case that illustrates the problem?  Or some sample code that shows what you'd like to be able to do?

Yes, there is some confusing terminology.  Expected is reader's, and actual is writer's.  (Originally actual/expected was used, but, over time, folks have found reader's/writer's to be more intuitive, so that's crept into docs.  Probably we should update javadocs for GenericDatumReader to define expected as reader's and actual as writer's.

> SpecificDatumReader requires the reader's schema to be set manually
> -------------------------------------------------------------------
>
>                 Key: AVRO-603
>                 URL: https://issues.apache.org/jira/browse/AVRO-603
>             Project: Avro
>          Issue Type: Improvement
>          Components: java
>            Reporter: Stu Hood
>            Priority: Minor
>
> Since SpecificDatumReader has actual objects with schemas attached to them, it would seem that you wouldn't need to set the reader's schema: the default constructor only takes one schema argument, so it seems to support this, but behind the scenes, it sets the readers/writers to the same schema.
> Additionally, since DatumReader and its implementations use the terms 'expected' and 'actual' to refer to the 'reader' and 'writer' schemas, determining that you need to set the reader's schema requires a code dive, rather than a glance at the javadocs.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.