You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@avro.apache.org by "Uhlig, Hans" <ha...@teamaol.com> on 2012/01/17 23:44:00 UTC
Are unions Tagged?
Are unions in avro tagged for the type they contain or does this need to be manually added with an enum. Specifically I am creating a union of records and wish to know if I need a record containing an enum and the union of records to be able to parse them back out.
Hans Uhlig | Senior Systems Engineer | R&D PMO & Ops
Aol. Inc. | Direct 650.937.2119 | Email hans.uhlig@teamaol.com<ma...@teamaol.com> | AIM hansuhlig9
GPG Key: 0xE523CC64 | Fingerprint: 64F7 9B30 C845 CB54 EDCA 190A 1C3E 6571 E523 CC64
This message contains privileged and confidential information. Any dissemination, distribution, copying or other use of this message or
any of its content (data, prices...) to any third parties may only occur with ADTECH's prior consent.
Re: Are unions Tagged?
Posted by Philip Zeyliger <ph...@cloudera.com>.
They're tagged on the wire. Getting the type back in some implementations
is sometimes a bit tricky: in java, you can use instanceof.
-- Philip
On Tue, Jan 17, 2012 at 2:44 PM, Uhlig, Hans <ha...@teamaol.com> wrote:
> Are unions in avro tagged for the type they contain or does this need to
> be manually added with an enum. Specifically I am creating a union of
> records and wish to know if I need a record containing an enum and the
> union of records to be able to parse them back out.****
>
> ** **
>
> *Hans Uhlig | Senior Systems Engineer | R&D PMO & Ops*
>
> Aol. Inc. | Direct 650.937.2119 | Email hans.uhlig@teamaol.com | AIM
> hansuhlig9
> GPG Key: 0xE523CC64 | Fingerprint: 64F7 9B30 C845 CB54 EDCA 190A 1C3E
> 6571 E523 CC64****
>
> This message contains privileged and confidential information. Any
> dissemination, distribution, copying or other use of this message or
> any of its content (data, prices...) to any third parties may only occur
> with ADTECH's prior consent.****
>
> ** **
>