Return-Path: Delivered-To: apmail-hadoop-avro-dev-archive@minotaur.apache.org Received: (qmail 82056 invoked from network); 27 Apr 2009 18:12:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 27 Apr 2009 18:12:53 -0000 Received: (qmail 9549 invoked by uid 500); 27 Apr 2009 18:12:53 -0000 Delivered-To: apmail-hadoop-avro-dev-archive@hadoop.apache.org Received: (qmail 9504 invoked by uid 500); 27 Apr 2009 18:12:53 -0000 Mailing-List: contact avro-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: avro-dev@hadoop.apache.org Delivered-To: mailing list avro-dev@hadoop.apache.org Received: (qmail 9492 invoked by uid 99); 27 Apr 2009 18:12:53 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Apr 2009 18:12:53 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Apr 2009 18:12:51 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 490FE234C003 for ; Mon, 27 Apr 2009 11:12:30 -0700 (PDT) Message-ID: <2106931831.1240855950294.JavaMail.jira@brutus> Date: Mon, 27 Apr 2009 11:12:30 -0700 (PDT) From: "Doug Cutting (JIRA)" To: avro-dev@hadoop.apache.org Subject: [jira] Commented: (AVRO-22) Kill anonymous records or fix GenericDatumReader In-Reply-To: <1991162362.1240658370483.JavaMail.jira@brutus> 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-22?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12703258#action_12703258 ] Doug Cutting commented on AVRO-22: ---------------------------------- > This doesn't seem to require that both are null to match: if the name of branch is null and the name actual is not, then we get a match, which I think is a bug. I did that intentionally, thinking that, if one doesn't specify a name in a record, one doesn't care to match names, and it should match anything. But that's not intuitive to all! > Anonymous record names are a pain, can we get rid of them? We use unnamed records internally to implement message parameters. These are serialized and deserialized just like named records, so it's nice to be able to share that code. We might: # ban unnamed user-schemas, but continue to use them to implement parameters; or # define an unnamed superclass of RecordSchema that's used for parameters. The latter would probably be substantially more complicated than the former, and force us to expand the public interface, so my preference is for the former. Other ideas? > Kill anonymous records or fix GenericDatumReader > ------------------------------------------------ > > Key: AVRO-22 > URL: https://issues.apache.org/jira/browse/AVRO-22 > Project: Avro > Issue Type: Bug > Components: spec > Reporter: Raymie Stata > > Anonymous record names are a pain, can we get rid of them? > If not, I think I noticed a bug in GenericDatumReader.resolveExpected: > {noformat} > if (branch.getType() == Type.RECORD) { > String name = branch.getName(); > if (name == null || name.equals(actual.getName())) > return branch; > } else > return branch; > {noformat} > This doesn't seem to require that _both_ are null to match: if the name of {{branch}} is null and the name {{actual}} is not, then we get a match, which I think is a bug. > But again, let's just get rid of null names. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.