hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "vengatesh.babu" <vengatesh.b...@zohocorp.com>
Subject Hive order by not working properly
Date Wed, 07 Jan 2015 10:11:26 GMT
Hi,


Hive order by not working properly with columns involved in functions.

Column without function:
SELECT ACCOUNTID from table order by ACCOUNTID;
(Above query works fine in both HIVE &amp; MYSQL)
Column with function:
SELECT concat('test_',ACCOUNTID) from table order by ACCOUNTID;
In mysql , Above query working fine.
In hive, below exception thrown
FAILED: SemanticException [Error 10004]: Line 1:59 Invalid table alias or column reference
'ACCOUNTID': (possible column names are: _c0)
Temporary Solution :
SELECT concat('test_',ACCOUNTID) as tempColumn from table order by tempcolumn;
Is there any solution available without assigning column as tempcolumn ?
Thanks 
Vengatesh Babu K M






Mime
View raw message