[ https://issues.apache.org/jira/browse/AVRO-3622?focusedWorklogId=804332&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-804332 ]
ASF GitHub Bot logged work on AVRO-3622: ---------------------------------------- Author: ASF GitHub Bot Created on: 29/Aug/22 12:27 Start Date: 29/Aug/22 12:27 Worklog Time Spent: 10m Work Description: martin-g commented on code in PR #1843: URL: https://github.com/apache/avro/pull/1843#discussion_r957262126 ########## lang/py/avro/name.py: ########## @@ -91,6 +93,10 @@ def __eq__(self, other: object) -> bool: """Equality of names is defined on the fullname and is case-sensitive.""" return hasattr(other, "fullname") and self.fullname == getattr(other, "fullname") + @property + def name(self) -> Optional[str]: Review Comment: Let's add some unit tests for this new method with inputs like: 1) "Record" 2) "ns.Record" 3) "longer.ns.Record" 4) ".Record" Issue Time Tracking ------------------- Worklog Id: (was: 804332) Time Spent: 20m (was: 10m) > Python compatibility check fails if record with and without namespace are > compared > ---------------------------------------------------------------------------------- > > Key: AVRO-3622 > URL: https://issues.apache.org/jira/browse/AVRO-3622 > Project: Apache Avro > Issue Type: Bug > Components: python > Affects Versions: 1.11.1 > Reporter: Jarkko Jaakola > Priority: Major > Labels: pull-request-available > Time Spent: 20m > Remaining Estimate: 0h > > Avro spec: > {noformat} > To match, one of the following must hold: > ... > * both schemas are records with the same (unqualified) name{noformat} > Following records are compatible. The `ReaderWriterCompatibilityChecker` > reports name mismatch and an incompatibility. Similar test case with Java > implementation passes. > {code:java} > WITHOUT_NAMESPACE_RECORD = parse( > json.dumps( > { > "type": SchemaType.RECORD, > "name": "Record1", > "fields": [ > { > "name": "f1", > "type": "int", > } > ], > }, > ) > ) > WITH_NAMESPACE_RECORD = parse( > json.dumps( > { > "type": SchemaType.RECORD, > "name": "ns.Record1", > "fields": [ > { > "name": "f1", > "type": "int", > } > ], > }, > ) > ) > > {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)