[
https://issues.apache.org/jira/browse/AVRO-628?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Thiruvalluvan M. G. updated AVRO-628:
-------------------------------------
Component/s: c
> Unions have no getter function (avro_union_get)
> -----------------------------------------------
>
> Key: AVRO-628
> URL: https://issues.apache.org/jira/browse/AVRO-628
> Project: Apache Avro
> Issue Type: Improvement
> Components: c
> Reporter: Gavin M. Roy
> Priority: Major
>
> The union data type has no getter function and as such, the only way to get
> to the data in the union is to create a struct
> {code}typedef struct avro_union_datum_t {
> struct avro_obj_t obj;
> int64_t discriminant;
> avro_datum_t value;
> } avro_union_datum_t;{code}
> in your own include or code as the struct for this is in datum.h which is not
> installed with the library. In addition, there is a type warning when trying
> to use avro_record_get using the avro_union_datum_t.
> Ideally there would be a getter that exposes the datum in the union.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)