Mir Fazil Mehdi created HIVE-12756:
--------------------------------------

             Summary: Column Alias Names need to match while using Union All
                 Key: HIVE-12756
                 URL: https://issues.apache.org/jira/browse/HIVE-12756
             Project: Hive
          Issue Type: Improvement
            Reporter: Mir Fazil Mehdi


The below query fails in Hive without proper error message.

If the column alias dont matych between the first and 2 query hive 0.13 is 
throwing the below error.

select 'new' as  col1 union all select 'new' as  col2;
Error: Error while compiling statement: FAILED: NullPointerException null 
(state=42000,code=40000)

Whereas Oracle picks the first alias name.

select 'new' as  col1 from dual union all select 'new' as  col2 from dual;

In my use case we have lot of oracle queries being converted to hive, but users 
are facing difficulties to find out the actual error sometimes.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to