[
https://issues.apache.org/jira/browse/AVRO-1362?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13742496#comment-13742496
]
Doug Cutting commented on AVRO-1362:
------------------------------------
Yes, it seems to me that C# might be too permissive here.
> 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