Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
0.5.0
-
None
Description
Type information specified while using a custom reduce script is converted to lower case, and causes type mismatch during query semantic analysis . The following REDUCE query where field name = "userId" failed.
hive> CREATE TABLE SS (
> a INT,
> b INT,
> vals ARRAY<STRUCT<userId:INT, y:STRING>>
> );
OK
hive> FROM (select * from srcTable DISTRIBUTE BY id SORT BY id) s
> INSERT OVERWRITE TABLE SS
> REDUCE *
> USING 'myreduce.py'
> AS
> (a INT,
> b INT,
> vals ARRAY<STRUCT<userId:INT, y:STRING>>
> )
> ;
FAILED: Error in semantic analysis: line 2:27 Cannot insert into
target table because column number/types are different SS: Cannot
convert column 2 from array<struct<userId:int,y:string>> to
array<struct<userid:int,y:string>>.
The same query worked fine after changing "userId" to "userid".