avro-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Palmer <pal...@cs.vu.nl>
Subject Verifying Valid Schema Evolution.
Date Wed, 14 Mar 2012 09:04:04 GMT
I would like to verify that a new schema version can properly project existing data.

That is, I would like to verify that the new version of a schema doesn't violate the rules
set forth in the "Schema Resolution" portion of the specification: http://avro.apache.org/docs/current/spec.html

I don't see an existing call which does this check in the Java implementation's Schema class.
What I would like to be able to do is something like the following:

if ( !newSchema.canProject(oldSchema) ) {
	throw new SchemaEvolutionError("New schema can't project old data.");

If this doesn't exist I will be happy to write it and contribute it back, but wanted to make
sure there is nothing that does this already and see if it would be desirable to others.

~ Nick
View raw message