[
https://issues.apache.org/jira/browse/AVRO-620?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12900943#action_12900943
]
Philip Zeyliger commented on AVRO-620:
--------------------------------------
I'm working on this.
> Python implementation doesn't stringify sub-schemas correctly
> -------------------------------------------------------------
>
> Key: AVRO-620
> URL: https://issues.apache.org/jira/browse/AVRO-620
> Project: Avro
> Issue Type: Bug
> Components: python
> Reporter: Philip Zeyliger
>
> {noformat}
> In [9]: import avro.schema
> In [10]: s = avro.schema.parse('{"type": "record", "name": "X", "fields":
> [{"name": "y", "type": {"type": "record", "name": "Y", "fields": [{"name":
> "Z", "type": "X"}]}}]}')
> In [11]: str(s.fields[0].type)
> Out[11]: '{"fields": [{"type": "X", "name": "Z"}], "type": "record", "name":
> "Y"}'
> {noformat}
> str(schema) is used in avro data files to record the schema. In the case
> above, when we serialize the schema for Y, we should actually also serialize
> the schema for X, since Y needs the schema for X.
> I ran smack into this when using a schema from a protocol to write a data
> file, and finding that a lot of the types weren't defined when looking at the
> avro data file generated.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.