jjaakola-aiven commented on code in PR #1843:
URL: https://github.com/apache/avro/pull/1843#discussion_r958380963
##########
lang/py/avro/test/test_compatibility.py:
##########
@@ -659,6 +688,7 @@ def test_schema_compatibility(self):
ENUM_ABC_FIELD_DEFAULT_B_ENUM_DEFAULT_A_RECORD,
),
(NS_RECORD1, NS_RECORD2),
+ (WITHOUT_NAMESPACE_RECORD, WITH_NAMESPACE_RECORD),
Review Comment:
From the specification,
https://avro.apache.org/docs/1.11.1/specification/_print/#schema-resolution
```
* It is an error if the two schemas do not match. To match, one of the
following must hold:
...
* both schemas are records with the same (unqualified) name
...
```
I am assuming this holds for compatibility.
This change also aligns Python lib behavior with the Java implementation.
The compatibility of names is handled on this line in Python lib:
https://github.com/apache/avro/blob/master/lang/py/avro/compatibility.py#L378
In Java lib it is here:
https://github.com/apache/avro/blob/master/lang/java/avro/src/main/java/org/apache/avro/SchemaCompatibility.java#L97
It could be error in the specification and therefore in the implementation
that namespace is not relevant.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]