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 0AC991092F for ; Thu, 15 Aug 2013 19:12:58 +0000 (UTC) Received: (qmail 58475 invoked by uid 500); 15 Aug 2013 19:12:57 -0000 Delivered-To: apmail-avro-dev-archive@avro.apache.org Received: (qmail 57888 invoked by uid 500); 15 Aug 2013 19:12:50 -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 57582 invoked by uid 99); 15 Aug 2013 19:12:49 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Aug 2013 19:12:49 +0000 Date: Thu, 15 Aug 2013 19:12:49 +0000 (UTC) From: "Bill Baird (JIRA)" To: dev@avro.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (AVRO-1362) Avro schema array cannot reference previously defined record types MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/AVRO-1362?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Bill Baird updated AVRO-1362: ----------------------------- Description: The following schema compiles successfully in Avro(c#), but in Avro(Java)returns a "Type not supported: Invoice" when parsing the "ListOfInvoices" array. Problem appears to be in the parse method. {"items": "Invoice"} does not properly parse to find the "Invoice" type. { "namespace": "SampleClasses", "name": "Batch", "type": "record", "fields": [ { "name": "Invoices", "type": { "type": "array", "items": { "name": "Invoice", "type": "record", "fields": [ { "name": "Id", "type": "string" } ] } } }, { "name": "SingleInvoice", "type": "Invoice" }, // This reference to "Invoice" works fine. { "name": "ListOfInvoices", "type": { "type": "array", "items": { "type": "Invoice" } // Fails - does not get previous definition of "Invoice" } } ] } was: The following schema compiles successfully in Avro(c#), but in Avro(Java)returns a "Type not supported: Invoice" when parsing the "ListOfInvoices" array. Problem appears to be in the parse method. {"items": "Invoice"} does not properly parse to find the "Invoice" type. { "namespace": "SampleClasses", "name": "Batch", "type": "record", "fields": [ { "name": "Invoices", "type": { "type": "array", "items": { "name": "Invoice", "type": "record", "fields": [ { "name": "Id", "type": "string" } ] } } }, { "name": "SingleInvoice", "type": "Invoice" }, // This reference to "Invoice" works fine. { "name": "ListOfInvoices", "type": { "type": "array", "items": { "type": "Invoice" } // Fails - does not get previous definition of "Invoice" } } ] } > Avro schema array cannot reference previously defined record types > ------------------------------------------------------------------ > > Key: AVRO-1362 > URL: https://issues.apache.org/jira/browse/AVRO-1362 > Project: Avro > Issue Type: Bug > Components: java > Affects Versions: 1.7.4 > Environment: Schema class - org.apache.avro:avro:1.7.4 > Also confirmed in Avro 1.7.5 (RC) > Reporter: Bill Baird > > The following schema compiles successfully in Avro(c#), but in Avro(Java)returns a "Type not supported: Invoice" when parsing the "ListOfInvoices" array. > Problem appears to be in the parse method. {"items": "Invoice"} does not properly parse to find the "Invoice" type. > { "namespace": "SampleClasses", > "name": "Batch", > "type": "record", > "fields": [ > { "name": "Invoices", "type": { > "type": "array", > "items": { > "name": "Invoice", > "type": "record", > "fields": [ > { "name": "Id", "type": "string" } > ] > } > } > }, > { "name": "SingleInvoice", "type": "Invoice" }, // This reference to "Invoice" works fine. > { "name": "ListOfInvoices", "type": { > "type": "array", "items": { "type": "Invoice" } // Fails - does not get previous definition of "Invoice" > } > } > ] > } -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira