[
https://issues.apache.org/jira/browse/AVRO-18?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12702615#action_12702615
]
Doug Cutting commented on AVRO-18:
----------------------------------
> How can you discriminate one from the other without a discriminant?
Java & Python have runtime typing that permits, so we can get away without a
discriminant in those languages. Serialized Avro data uses an integer to
indicate which branch is taken. C will have to somehow explicitly represent
the discrimininant in its in-memory datastructures. If you're generating C
structs (a specific rather than a generic api) then you might generate an enum
whose names are related to the types of the union, to make it readable.
In short, I'd hoped we could not require explicit discriminants in schemas,
since they're not required in all languages. Does that not seem reasonable?
> add enum type
> -------------
>
> Key: AVRO-18
> URL: https://issues.apache.org/jira/browse/AVRO-18
> Project: Avro
> Issue Type: New Feature
> Components: spec
> Reporter: Doug Cutting
>
> Avro schemas should support enum types.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.