You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "James Warren (JIRA)" <ji...@apache.org> on 2011/08/31 00:05:10 UTC

[jira] [Created] (HIVE-2421) partition variables are treated as strings during union queries, regardless of declared type

partition variables are treated as strings during union queries, regardless of declared type
--------------------------------------------------------------------------------------------

                 Key: HIVE-2421
                 URL: https://issues.apache.org/jira/browse/HIVE-2421
             Project: Hive
          Issue Type: Bug
          Components: CLI
    Affects Versions: 0.7.1
         Environment: cloudera Hive 0.7.1/Hadoop-0.20 stack (cdh3u1)
            Reporter: James Warren
            Priority: Minor


The following will recreate the error, using a file "foo.txt" containing an integer per line:

> create table foo (x int) partitioned by (y int);
> load data local inpath 'foo.txt' into table foo partition (y=1);
> select * from (select y, x from foo union all select 1 as y, x from foo) a;

Generates "FAILED: Error in semantic analysis: Schema of both sides of union should match: Column y is of type string on first table and type int on second table"

Describing the bug as minor as the problem can easily be bypassed by using casts.

cheers,
-jw

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira