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 (Created) (JIRA)" <ji...@apache.org> on 2011/10/14 17:22:12 UTC

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

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


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

        

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

Posted by "Doug Cutting (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AVRO-927?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Doug Cutting resolved AVRO-927.
-------------------------------

       Resolution: Fixed
    Fix Version/s: 1.6.0
         Assignee: Brock Noland
     Hadoop Flags: Reviewed

This looks like a good change.  I committed it.  Thanks, Brock!
                
> 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
>            Assignee: Brock Noland
>             Fix For: 1.6.0
>
>         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

        

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

Posted by "Brock Noland (Updated) (JIRA)" <ji...@apache.org>.
     [ 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