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 2A9B38A3B for ; Wed, 10 Aug 2011 18:32:53 +0000 (UTC) Received: (qmail 84711 invoked by uid 500); 10 Aug 2011 18:32:52 -0000 Delivered-To: apmail-avro-dev-archive@avro.apache.org Received: (qmail 84450 invoked by uid 500); 10 Aug 2011 18:32:52 -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 84437 invoked by uid 99); 10 Aug 2011 18:32:51 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Aug 2011 18:32:51 +0000 X-ASF-Spam-Status: No, hits=-2000.8 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; Wed, 10 Aug 2011 18:32:49 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id C3D5AB517D for ; Wed, 10 Aug 2011 18:32:27 +0000 (UTC) Date: Wed, 10 Aug 2011 18:32:27 +0000 (UTC) From: "Doug Cutting (JIRA)" To: dev@avro.apache.org Message-ID: <1268604932.24735.1313001147798.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1455918938.21441.1312922067110.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (AVRO-872) Allow interdependancies across IDL schema imports 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-872?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Doug Cutting updated AVRO-872: ------------------------------ Attachment: AVRO-872.patch Here's a version where getTypes() returns Map. This implementation not very efficient since it creates new Map entries each time its called. This could be optimized, either by defining and returning a Map implementation wrapping the Names instance, or by converting Names to be a Map and returning it directly. But I'm not sure that's worth the effort now, since this doesn't seem a likely performance bottleneck. > Allow interdependancies across IDL schema imports > ------------------------------------------------- > > Key: AVRO-872 > URL: https://issues.apache.org/jira/browse/AVRO-872 > Project: Avro > Issue Type: Improvement > Reporter: Bill Graham > Assignee: Doug Cutting > Attachments: AVRO-872.patch, AVRO-872.patch, AVRO-872.patch > > > This currently doesn't work because Player depends on Position, but it should: > {noformat} > $ cat position.avsc > {"type":"enum", "name": "Position", "namespace": "avro.examples.baseball", > "symbols": ["P", "C", "B1", "B2", "B3", "SS", "LF", "CF", "RF", "DH"] > } > $ cat player.avsc > {"type":"record", "name":"Player", "namespace": "avro.examples.baseball", > "fields": [ > {"name": "number", "type": "int"}, > {"name": "first_name", "type": "string"}, > {"name": "last_name", "type": "string"}, > {"name": "position", "type": {"type": "array", "items": "avro.examples.baseball.Position"} } > ] > } > $ cat baseball.avdl > @namespace("avro.examples.baseball") > protocol Baseball { > import schema "position.avsc"; > import schema "player.avsc"; > } > $ java -jar avro-tools-1.5.1.jar idl baseball.avdl baseball.avpr > {noformat} -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira