You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Ning Zhang (JIRA)" <ji...@apache.org> on 2009/08/11 18:49:14 UTC

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

void type (null column) cannot be UNIONed with other type
---------------------------------------------------------

                 Key: HIVE-747
                 URL: https://issues.apache.org/jira/browse/HIVE-747
             Project: Hadoop Hive
          Issue Type: Bug
          Components: Query Processor
            Reporter: 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.
-
You can reply to this email to add a comment to the issue online.


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

Posted by "Ning Zhang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-747?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ning Zhang reassigned HIVE-747:
-------------------------------

    Assignee: Ning Zhang

> void type (null column) cannot be UNIONed with other type
> ---------------------------------------------------------
>
>                 Key: HIVE-747
>                 URL: https://issues.apache.org/jira/browse/HIVE-747
>             Project: Hadoop 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.
-
You can reply to this email to add a comment to the issue online.


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

Posted by "Zheng Shao (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-747?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12743091#action_12743091 ] 

Zheng Shao commented on HIVE-747:
---------------------------------

Good catch.
Does SQL allow union of int with double, or int with string? If it does, we can use FunctionRegistry.getCommonClass() to derive the common type. We should be able to solve this problem with the same shot.


> void type (null column) cannot be UNIONed with other type
> ---------------------------------------------------------
>
>                 Key: HIVE-747
>                 URL: https://issues.apache.org/jira/browse/HIVE-747
>             Project: Hadoop 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.
-
You can reply to this email to add a comment to the issue online.