Grokbase Groups Hive user July 2010
FAQ
*hive> SELECT L.key, sum(C.quantity) FROM TA L JOIN TB C ON L.key=C.key
GROUP BY L.key ORDER BY L.key;*
**
*FAILED: Error in semantic analysis: line 1:89 Invalid Table Alias or Column
Reference L*


In "*ORDER BY L.key",* Hive reports error because the key is prefixed with
L.
"*SELECT L.key, sum(quantity) FROM TA L JOIN TB C ON L.key=C.key1 GROUP BY
L.key ORDER BY key*" is right.
Why?



Thanks.
Clyde

Search Discussions

  • Ashish Thusoo at Jul 2, 2010 at 9:47 pm
    Definitely a bug.

    I have filed

    https://issues.apache.org/jira/browse/HIVE-1449

    for this issue.

    Thanks,
    Ashish

    ________________________________
    From: 何翔
    Sent: Friday, July 02, 2010 4:09 AM
    To: hive-user@hadoop.apache.org
    Subject: Failed in prefix the column name with the table alias in the order_by clause

    hive> SELECT L.key, sum(C.quantity) FROM TA L JOIN TB C ON L.key=C.key GROUP BY L.key ORDER BY L.key;

    FAILED: Error in semantic analysis: line 1:89 Invalid Table Alias or Column Reference L


    In "ORDER BY L.key", Hive reports error because the key is prefixed with L.
    "SELECT L.key, sum(quantity) FROM TA L JOIN TB C ON L.key=C.key1 GROUP BY L.key ORDER BY key" is right.
    Why?



    Thanks.
    Clyde

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupuser @
categorieshive, hadoop
postedJul 2, '10 at 11:09a
activeJul 2, '10 at 9:47p
posts2
users2
websitehive.apache.org

2 users in discussion

Ashish Thusoo: 1 post 何翔: 1 post

People

Translate

site design / logo © 2021 Grokbase