[
https://issues.apache.org/jira/browse/THRIFT-409?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12689593#action_12689593
]
Bryan Duxbury commented on THRIFT-409:
--------------------------------------
Some features of unions:
* May contain exactly one of the fields in its definition. (Should we go so
far as to say that the wire protocol only allows for one field in unions?)
* When reading, if it encounters a field it doesn't recognize, it should skip
the entire field, essentially reporting the field as unset.
* It should be impossible to have a union with no set field. For nullable
types, nulls should not be allowed.
* When you are dealing with a union in-memory, it should be able to tell you
programmatically which of its fields are set.
> Add "union" to Thrift
> ---------------------
>
> Key: THRIFT-409
> URL: https://issues.apache.org/jira/browse/THRIFT-409
> Project: Thrift
> Issue Type: New Feature
> Reporter: Bryan Duxbury
> Fix For: 0.2
>
>
> It would be very helpful to have a "union" construct in Thrift. Let's decide
> on the design and then break up into sub-issues to add this feature.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.