Implementation of compatibility rules

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
Report Content as Inappropriate

Implementation of compatibility rules

Elliot West

I've been attempting to understand the implementation of Avro schema compatibility rules and am slightly confused by the structure of the code. It seems that there are at least two possible entry points:
  • org.apache.avro.SchemaCompatibility.checkReaderWriterCompatibility(Schema, Schema)
  • org.apache.avro.SchemaValidatorBuilder
The code paths of these do not seem to intersect, with one implementing a static set of rule checks and the other seemingly delegating to grammar based approach. Does this imply that there are in fact two implementations of the compatibility rules?

Apologies if this is a naïve question.