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

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

                Author: ASF GitHub Bot
            Created on: 23/Dec/21 07:22
            Start Date: 23/Dec/21 07:22
    Worklog Time Spent: 10m 
      Work Description: opwvhk commented on a change in pull request #1381:
URL: https://github.com/apache/avro/pull/1381#discussion_r774369247



##########
File path: 
lang/java/avro/src/test/java/org/apache/avro/TestSchemaCompatibility.java
##########
@@ -260,6 +261,10 @@ public void testUnionReaderWriterSubsetIncompatibility() {
 
       new ReaderWriter(ENUM1_AB_SCHEMA, ENUM1_AB_SCHEMA), new 
ReaderWriter(ENUM1_ABC_SCHEMA, ENUM1_AB_SCHEMA),
 
+      new ReaderWriter(ENUM1_AB_SCHEMA, ENUM1_AB_SCHEMA),

Review comment:
       This line can be removed: it's a duplicate of the first test case in 
line 262.




-- 
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]


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

    Worklog Id:     (was: 700417)
    Time Spent: 20m  (was: 10m)

> EnumAdjust.resolve should compare unqualified name rather than full name
> ------------------------------------------------------------------------
>
>                 Key: AVRO-3133
>                 URL: https://issues.apache.org/jira/browse/AVRO-3133
>             Project: Apache Avro
>          Issue Type: Bug
>          Components: java
>    Affects Versions: 1.10.2
>            Reporter: Adam McDevitt
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> Hello
> I came across some unexpected errors after a deployment and have been digging 
> into the Apache Avro source code.
> I think [this 
> comparison|https://github.com/apache/avro/blob/103477369fcb49a5372f9f5c1353fcd575119287/lang/java/avro/src/main/java/org/apache/avro/Resolver.java#L391]
>  in the Enum resolver should use getName rather than getFullName
> The [1.10.2 specification|https://avro.apache.org/docs/1.10.2/spec.html] 
> says, under Schema Resolution:
>  
> {code:java}
> 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 {code}
> 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.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to