You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@avro.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2022/09/08 16:17:00 UTC

[jira] [Commented] (AVRO-3622) Python compatibility check fails if record with and without namespace are compared

    [ https://issues.apache.org/jira/browse/AVRO-3622?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17601902#comment-17601902 ] 

ASF subversion and git services commented on AVRO-3622:
-------------------------------------------------------

Commit 34845fd49af9cd00e98f5930c6ac6190da5ea6a3 in avro's branch refs/heads/master from Jarkko Jaakola
[ https://gitbox.apache.org/repos/asf?p=avro.git;h=34845fd49 ]

AVRO-3622: Fix compatibility check for schemas having or missing namespace (#1843)

* AVRO-3622 (python) Fix compatibility check for schemas having or missing namespace

Python implementation does not treat the name and namespace element as Java library.
This causes the compatibility check to fail as the name which can be fully qualified
is not splitted to name and namespace elements.

* AVRO-3622 (python) Unit test Name when inlined namespace is given

* AVRO-3622 (python) Test for trailing comma in name

> 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: 3h 50m
>  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)