Siddhant Saraf created HIVE-18568:
-------------------------------------

             Summary: Hive doesn't complain about duplicate column unless it is 
a CTAS query
                 Key: HIVE-18568
                 URL: https://issues.apache.org/jira/browse/HIVE-18568
             Project: Hive
          Issue Type: Bug
    Affects Versions: 1.2.0
            Reporter: Siddhant Saraf


{code:java}
-- demo:
hive> select 1 as number, 2 as number;
OK
number number
1 2
Time taken: 0.091 seconds, Fetched: 1 row(s)

hive> create table test as select 1 as number, 2 as number;
FAILED: SemanticException [Error 10036]: Duplicate column name: number
{code}
I had a 'select' query to which I later prepended a 'create table as' when it 
threw an error about duplicate column name. I was surprised by the different 
treatment of duplicate column names. In my opinion this is a bug. Or is this by 
design?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to