avro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Baird (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AVRO-1362) Avro schema array cannot reference previously defined record types
Date Fri, 16 Aug 2013 01:25:16 GMT

    [ https://issues.apache.org/jira/browse/AVRO-1362?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13741784#comment-13741784
] 

Bill Baird commented on AVRO-1362:
----------------------------------

Thanks.  This makes sense.  Should this become a c# issue?
                
> 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

Mime
View raw message