[ 
https://issues.apache.org/jira/browse/AVRO-3515?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dominik Hons resolved AVRO-3515.
--------------------------------
    Resolution: Not A Bug

> Schema.Field equals method does not include the doc attribute
> -------------------------------------------------------------
>
>                 Key: AVRO-3515
>                 URL: https://issues.apache.org/jira/browse/AVRO-3515
>             Project: Apache Avro
>          Issue Type: Bug
>          Components: java
>    Affects Versions: 1.11.0
>            Reporter: Dominik Hons
>            Priority: Minor
>         Attachments: AVRO-3515.patch
>
>
> The org.apache.avro.Schema.Field class contains attribute {*}doc{*}. However, 
> it is not included in the equals method, which results in problems with 
> schema evolution.
>  
> This test currently fails, because both Fields are considered equal.
> {code:java}
> @Test
> public void testFieldEquality() {
>   Schema schema = Schema.createRecord("r", "doc", "namespace", false);
>   Field fieldWithDoc = new Field("f", schema, "doc");
>   Field fieldWithoutDoc = new Field("f", schema);
>   assertNotEquals(fieldWithDoc, fieldWithoutDoc);
> } {code}



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to