[ https://issues.apache.org/jira/browse/AVRO-1362?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sean Busbey updated AVRO-1362: ------------------------------ Component/s: (was: java) csharp Summary: C# parser allows incorrect syntax for record fields of a named type (was: Avro schema array cannot reference previously defined record types) Updated to indicate the issue is with the C# rather than Java implementation. > C# parser allows incorrect syntax for record fields of a named type > ------------------------------------------------------------------- > > Key: AVRO-1362 > URL: https://issues.apache.org/jira/browse/AVRO-1362 > Project: Avro > Issue Type: Bug > Components: csharp > 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 was sent by Atlassian JIRA (v6.2#6252)