Definitely a bug. I have filed
https://issues.apache.org/jira/browse/HIVE-1449 for this issue. Thanks, Ashish ________________________________ From: 何翔 [mailto:[email protected]] Sent: Friday, July 02, 2010 4:09 AM To: [email protected] 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
