In Hive, I can use explode
function but how to do that in Impala?
I read this but still have no clue:
Is there a function equivalent to Hive's 'explode' function in Apache Impala?
This is how I created the table in Hive:
create table tb (arr_col array<string>)
insert into tb select array ('A','B') from (select 'temp') x
My query would give error:
select tb.arr_col from tb
..in select list returns a complex type 'ARRAY<STRING>'.
Only scalar types are allowed in the select list.
OR
select tb.arr_col.item from tb
ERROR: AnalysisException: Illegal column/field reference 'arr_col.item' with intermediate collection 'item' of type 'ARRAY<STRING>'
Please advise the best way. Thanks