Hi,

I am trying a few queries in Hive using complex data types:

> SELECT array(1, 2) a UNION ALL SELECT NULL;
Error: Error while compiling statement: FAILED: SemanticException Schema of
both sides of union should match: Column a is of type array<int> on first
table and type void on second table. Cannot tell the position of null AST.
(state=42000,code=40000)

> SELECT CAST (NULL as array<int>);
Error: Error while compiling statement: FAILED: ParseException line 1:21
cannot recognize input near 'array' '<' 'int' in primitive type
specification (state=42000,code=40000)

Queries with similar structure using simple data types give no errors.
Is this a bug in Hive or an error on my part with the query? Any help to
fix the errors is appreciated.

Thanks,
Paras

PS: I am using Hive 1.2.1 on HDP 2.5.3

Reply via email to