Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
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
typedef struct avro_union_datum_t { struct avro_obj_t obj; int64_t discriminant; avro_datum_t value; } avro_union_datum_t;
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.