hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jie Zhang <>
Subject how to access array type?
Date Mon, 02 Mar 2015 07:53:12 GMT

I am trying to use hive complex data type on hive0.14.0. However, could not
access the array type as manual indicated. I have an array column, but hit
SemanticException when access the individual item in the array. Any clue?
Did I use the wrong syntax or miss some property setting? Thanks!

hive> create table test1 (c1 array <int>) row format delimited collection
items terminated by ',';


Time taken: 0.092 seconds

hive> select * from test1;



Time taken: 0.065 seconds, Fetched: 1 row(s)

hive> select c1[0] from test1;

FAILED: SemanticException [Error 10004]: Line 1:7 Invalid table alias or
column reference 'c1[0]': (possible column names are: c1)


View raw message