[ https://issues.apache.org/jira/browse/AVRO-3561?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ryan Skraba resolved AVRO-3561. ------------------------------- Resolution: Duplicate > [Python] Schema resolution fails with equivalent names > ------------------------------------------------------ > > Key: AVRO-3561 > URL: https://issues.apache.org/jira/browse/AVRO-3561 > Project: Apache Avro > Issue Type: Bug > Reporter: Ryan Skraba > Priority: Major > > These schemas are equivalent and should be fully compatible: > {code:json} > {"type": "record", "name": "Record1", "fields": [{"type": ["null", {"type": > "array", "items": {"type": "record", "name": "InnerRecord1", "namespace": > "ns2", "fields": [{"type": "int", "name": "a"}]}}], "name": "f1"}]} > {"type": "record", "name": "Record1", "fields": [{"type": ["null", {"type": > "array", "items": {"type": "record", "name": "ns2.InnerRecord1", "fields": > [{"type": "int", "name": "a"}]}}], "name": "f1"}]}{code} > (Note the way the full name is specified in the {*}innerRecord1{*}) > Currently schema compatibility between the two fails because the name > attributes don't match. In this case the fullnames are {_}identical{_}. > In any case, the specification only needs to match the unqualified name. The > following schema is not equivalent but should be compatible. Note the change > in the namespace. > {code:json} > {"type": "record", "name": "Record1", "fields": [{"type": ["null", {"type": > "array", "items": {"type": "record", "name": "ns3.InnerRecord1", "fields": > [{"type": "int", "name": "a"}]}}], "name": "f1"}]}{code} > It appears that the compatibility logic assumes that [the name attribute has > been > unqualified|https://github.com/apache/avro/blob/6dc6055e04188919886bd1b4ed95a7c6f4fac23e/lang/py/avro/compatibility.py#L376-L378]. -- This message was sent by Atlassian Jira (v8.20.10#820010)