hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hadoop hive <hadooph...@gmail.com>
Subject Re: How to query UNION types in Hive with Avro
Date Mon, 11 Aug 2014 19:14:32 GMT
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" <sgoyal@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
>

Mime
View raw message