Return-Path: X-Original-To: apmail-avro-dev-archive@www.apache.org Delivered-To: apmail-avro-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 99F587DB8 for ; Fri, 14 Oct 2011 15:36:35 +0000 (UTC) Received: (qmail 11133 invoked by uid 500); 14 Oct 2011 15:36:35 -0000 Delivered-To: apmail-avro-dev-archive@avro.apache.org Received: (qmail 11086 invoked by uid 500); 14 Oct 2011 15:36:35 -0000 Mailing-List: contact dev-help@avro.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@avro.apache.org Delivered-To: mailing list dev@avro.apache.org Received: (qmail 11067 invoked by uid 99); 14 Oct 2011 15:36:35 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Oct 2011 15:36:35 +0000 X-ASF-Spam-Status: No, hits=-2000.5 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Oct 2011 15:36:32 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id E084D308B50 for ; Fri, 14 Oct 2011 15:36:11 +0000 (UTC) Date: Fri, 14 Oct 2011 15:36:11 +0000 (UTC) From: "Brock Noland (Updated) (JIRA)" To: dev@avro.apache.org Message-ID: <343010210.14428.1318606571921.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <426890818.14384.1318605732181.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (AVRO-927) org.apache.avro.mapred.Pair.equals uses strict equals for schema MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on 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