avro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Cutting <cutt...@apache.org>
Subject Re: Check for schema backwards compatibility
Date Mon, 19 Nov 2012 18:54:02 GMT
I don't feel strongly: a method on Schema would be fine with me as
would an auxiliary tool class.  Schema.java is a huge file already,
but I'm not sure that really causes any problems.

On Sat, Nov 17, 2012 at 8:04 PM, Jeff Kolesky <jeff@kolesky.com> wrote:
> Would it be appropriate to add this method to the Schema class itself in
> the same way `subsume` and `unify` were, or would you rather see a separate
> tool, similar to SchemaNormalization?
> On Fri, Nov 16, 2012 at 3:54 PM, Doug Cutting <cutting@apache.org> wrote:
>> On Fri, Nov 16, 2012 at 3:37 PM, Jeff Kolesky <jeff.kolesky@gmail.com>
>> wrote:
>> > Has there been discussion of the need fot this type of tool?  Would other
>> > people find it useful?
>> I have not seen this discussed, but I can see the utility.  One could
>> automatically check new schemas for compatibility with prior versions
>> before using them, to ensure that both old and new data can be read
>> with the new schema.  This would require checking that any added
>> fields have default values specified.
>> Related is the ability to tell if an old schema can be used to read
>> data written with a newer.  This would require that any removed fields
>> have a default value specified.
>> In general, to ensure readability in both cases, one should always
>> provide a default value for every field.  So a method that traversed a
>> schema and verified that each field has a default value might suffice.
>> Doug

View raw message