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

Reply via email to