You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2022/08/29 11:31:00 UTC

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

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

ASF GitHub Bot logged work on AVRO-3622:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 29/Aug/22 11:30
            Start Date: 29/Aug/22 11:30
    Worklog Time Spent: 10m 
      Work Description: jjaakola-aiven opened a new pull request, #1843:
URL: https://github.com/apache/avro/pull/1843

   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.
   
   ### Jira
   https://issues.apache.org/jira/browse/AVRO-3622
   
   ### Tests
   
   - [X] My PR adds the following unit tests
     - Java: test case to `COMPATIBLE_READER_WRITER_TEST_CASES`, to demonstrate that Java library does not have the issue described.
     - Python: same test case to Python lib.
   
   ### Commits
   
   - [] My commits all reference Jira issues in their subject lines. In addition, my commits follow the guidelines from "[How to write a good git commit message](https://chris.beams.io/posts/git-commit/)":
     1. [X] Subject is separated from body by a blank line
     1. [] Subject is limited to 50 characters (not including Jira issue reference)
     1. [X] Subject does not end with a period
     1. [X] Subject uses the imperative mood ("add", not "adding")
     1. [X] Body wraps at 72 characters
     1. [X] Body explains "what" and "why", not "how"
   




Issue Time Tracking
-------------------

            Worklog Id:     (was: 804316)
    Remaining Estimate: 0h
            Time Spent: 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
>          Time Spent: 10m
>  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)