You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@avro.apache.org by Nick Palmer <pa...@cs.vu.nl> on 2012/03/14 10:04:04 UTC

Verifying Valid Schema Evolution.

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.

Thanks,
~ Nick