avro-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Hayes <m...@greybird.com>
Subject Re: Why is the String type a Schema property?
Date Thu, 24 May 2012 20:33:40 GMT
On Thu, May 24, 2012 at 11:51 AM, Doug Cutting <cutting@apache.org> wrote:

> No, there are two schemas involved in reading, the writer's and the
> reader's.  The reader's schema can determine what string representation is
> used.  This is the case with reflect and specific, which resolve the schema
> used when writing against the schema of the class that's being used to
> represent things when reading.  So you don't need to worry about reflect or
> specific, since they supply their own schema that has the string
> representation they expect.
>
> So you only need to worry about different string representations if you're
> using the generic representation and do not specify a distinct reader's
> schema that you expect to see things as, or if you use some other kind of
> datum reader (e.g., one you've written yourself) that subclasses
> GenericDatumReader, doesn't override readString(), and you don't pass an
> expected, reader's schema.
>
>
Yes, you're right, it's only use of GenericRecord that is impacted.  Sorry
to confuse the issue.

Thanks for your help!
--mark

Mime
View raw message