You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@avro.apache.org by Stanislav Savulchik <s....@gmail.com> on 2016/05/27 09:54:32 UTC
Backward compatibility checking issue
Hello,
I found out that there is a discrepancy in results when using
org.apache.avro.SchemaCompatibility.checkReaderWriterCompatibility and
org.apache.avro.ValidateCanRead.validate for checking backward
compatibility of schemas that use an alias for some field:
writer.avsc { "name": "Foo", "type": "record", "fields": [ { "name": "bar",
"type": "string" } ] }
reader.avsc { "name": "Foo", "type": "record", "fields": [ { "name": "baz",
"type": "string", "aliases": ["bar"] } ] }
The org.apache.avro.SchemaCompatibility.checkReaderWriterCompatibility
reports that the reader schema is compatible with the writer schema.
But org.apache.avro.ValidateCanRead.validate reports otherwise.
I made the sample project
https://github.com/savulchik/avro-compat-issue showing
the issue.
Could someone verify if this behavior is indeed inconsistent?
Regards,
Stanislav.