Maybe it's the way SQL works.
The select part is executed after the where filter is applied, so you
cannot use alias declared in select part in where clause.
Hive and Oracle behavior the same as Spark SQL.

2014-09-25 8:58 GMT+08:00 Du Li <l...@yahoo-inc.com.invalid>:

>   Hi,
>
>  The following query does not work in Shark nor in the new Spark
> SQLContext or HiveContext.
> SELECT key, value, concat(key, value) as combined from src where combined
> like ’11%’;
>
>  The following tweak of syntax works fine although a bit ugly.
> SELECT key, value, concat(key, value) as combined from src where
> concat(key,value) like ’11%’ order by combined;
>
>  Are you going to support alias in where clause soon?
>
>  Thanks,
> Du
>

Reply via email to