Hi Sachin,

Here is the doc from hwk, this might help you.

http://docs.hortonworks.com/HDPDocuments/HDP1/HDP-1.2.2/ds_Hive/language_manual/datatypes.html#LanguageManualTypes-UnionTypes

Thanks
Vikas Srivastava
 On Aug 12, 2014 12:31 AM, "Sachin Goyal" <sgo...@walmartlabs.com> wrote:

> Hi,
>
> I am using Hive and Avro with union types as follows:
>
>
> hive> desc tbl1;
>
> productid
> uniontype<void,struct<productid:string,itemid:bigint>,struct<circularrefid:int>>
> from deserializer
>
>
>
> hive> select productid from tbl1;
>
> {1:{"productid":"34","itemid":null}}
>
>
>
> hive> select productid.productid from tbl1
>
> FAILED: SemanticException [Error 10042]: Line 1:7 . Operator is only
> supported on struct or list of struct types 'productid'
>
>
>
> Does anyone know how to use the union-types inside a select query?
>
>
> Thanks
>
> Sachin
>

Reply via email to