Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.10.2
Description
Hello
I came across some unexpected errors after a deployment and have been digging into the Apache Avro source code.
I think this comparison in the Enum resolver should use getName rather than getFullName
The 1.10.2 specification says, under Schema Resolution:
It is an error if the two schemas do not match. To match, one of the following must hold: - both schemas are arrays whose item types match - both schemas are maps whose value types match - both schemas are enums whose (unqualified) names match - both schemas are fixed whose sizes and (unqualified) names match - both schemas are records with the same (unqualified) name
i.e. unqualified names should be compared, whereas the linked code compares qualified names
SchemaCompatibility.checkReaderWriterCompatibility does however use unqualified names in its comparisons. See AVRO-2400 and AVRO-2793. From one of the comments on AVRO-2400 you can see that the specification was not always clear on whether it meant qualified or unqualified names.
Attachments
Issue Links
- relates to
-
AVRO-2400 Avro 1.9.0 can't resolve schemas that can be resolved in 1.8.2
- Resolved
- links to