Details
Description
When a reader schema has a type mismatch with a writer schema where the writer schema type is a union, the location information for the schema compatibility is lost in Python. This was fixed in Java as a part of AVRO-3612.
Given a reader record schema with int field a:
{ "type": "record", "name": "Record1", "fields": [ { "name": "a", "type": "int" } ] }
and a writer record schema with an optional int (union of int and null) field a:
{ "type": "record", "name": "Record1", "fields": [ { "name": "a", "type": ["null", "int"], "default": "null" } ] }
I would expect to get the follow message and location on invoking get_compatibility(reader, writer):
message: "reader type: int not compatible with writer type: null" location: "/fields/0/type/0"
Instead, we currently get:
message: "reader type: int not compatible with writer type: null" location: "/"
losing all location information.