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

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

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



##########
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),
+
+      new ReaderWriter(ENUM1_AB_SCHEMA, ENUM1_AB_SCHEMA_NAMESPACE),

Review comment:
       This tests the new functionality, but not completely IMHO. Shouldn't we 
also test these?
   
   * `new ReaderWriter(ENUM1_AB_SCHEMA_NAMESPACE, ENUM1_AB_SCHEMA)`
   * `new ReaderWriter(ENUM1_AB_SCHEMA_NAMESPACE2, ENUM1_AB_SCHEMA_NAMESPACE)`
   
   I think we should at least have the first of these. Or does the test in line 
266 test the same thing?




-- 
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: 700532)
    Time Spent: 40m  (was: 0.5h)

> 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: 40m
>  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