avro-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Cutting <cutt...@apache.org>
Subject Re: Passively Converting Null Map to be valid
Date Wed, 27 Aug 2014 22:50:23 GMT
On Wed, Aug 27, 2014 at 11:08 AM, Micah Whitacre <mkwhitacre@gmail.com> wrote:
> We are reading with a BufferedBinaryDecoder and using the new schema as both
> the written and reader schema because the written schema is not preserved
> with the payload so it is not easy to retrieve.
>
> My questions are:
> 1. Is the change we made to add a new defaulted union truly non-passive?

Adding the new union field changes the format for how instances are
written, even those that have a null value for this new field.  (A
union is written as an int indicating the selected schema, then an
instance of that schema.)

> 2. Is there a workaround so I can continue to evolve my schema?

To permit schema evolution, you must pass the schema used to write
when reading.  Avro's data file format and RPC take care of this.  If
you're writing Avro data to some other container then you need to do
this yourself.

Doug

Mime
View raw message