You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Kevin Wilfong (Commented) (JIRA)" <ji...@apache.org> on 2012/03/23 23:29:29 UTC

[jira] [Commented] (HIVE-747) void type (null column) cannot be UNIONed with other type

    [ https://issues.apache.org/jira/browse/HIVE-747?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13237217#comment-13237217 ] 

Kevin Wilfong commented on HIVE-747:
------------------------------------

This is now producing wrong results.

select x from (select 'a' as x from src union all select NULL as x from src)a;

returns NULL for every row.
                
> void type (null column) cannot be UNIONed with other type
> ---------------------------------------------------------
>
>                 Key: HIVE-747
>                 URL: https://issues.apache.org/jira/browse/HIVE-747
>             Project: Hive
>          Issue Type: Bug
>          Components: Query Processor
>            Reporter: Ning Zhang
>            Assignee: Ning Zhang
>
> hive> select * from (select NULL from zshao_tt union all select 1 from zshao_tt)x;
> select * from (select NULL from zshao_tt union all select 1 from zshao_tt)x;
> FAILED: Error in semantic analysis: Schema of both sides of union should match: Column _c0 is of type void on first table and type int on second table

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira