You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Brock Noland (Updated) (JIRA)" <ji...@apache.org> on 2011/10/14 17:36:11 UTC

[jira] [Updated] (AVRO-927) org.apache.avro.mapred.Pair.equals uses strict equals for schema

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

Brock Noland updated AVRO-927:
------------------------------

    Attachment: AVRO-927-1.patch

Attached is a patch would resolve this issue. All tests passed.
                
> org.apache.avro.mapred.Pair.equals uses strict equals for schema
> ----------------------------------------------------------------
>
>                 Key: AVRO-927
>                 URL: https://issues.apache.org/jira/browse/AVRO-927
>             Project: Avro
>          Issue Type: Bug
>    Affects Versions: 1.5.4
>            Reporter: Brock Noland
>         Attachments: AVRO-927-1.patch
>
>
> org.apache.avro.mapred.Pair.equals uses strict equals to compare schemas as opposed to using the equals method. GenericData.Record and GenericData.Array both use the equals method to compare schema. It would be advantageous that two objects with the same schema, if not the same schema object instance, would be considered equal.
> org.apache.avro.mapred.Pair.equals:
>   if (this.schema != that.schema)
>     
> org.apache.avro.generic.GenericData.Record.equals:
>   if (!schema.equals(that.schema))
> org.apache.avro.generic.GenericData.Array.equals:
>   if (!schema.equals(that.schema))

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira