You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@kylin.apache.org by Prashant Prakash <pr...@gmail.com> on 2016/01/22 14:52:17 UTC
If else query in KYLIN
Hi All,
We want to use "if else" construct in kylin query.
Sample query:
SELECT f.a, IF(SUM(x) < SUM(y), SUM(x), SUM(y)) FROM kylin.test f WHERE dt
= '2016-01-19' GROUP BY f.a
As such there is no support for function signature IF(<BOOLEAN>, <NUMERIC>,
<NUMERIC>)
1. Is there any alternative way to use "if else" construct in Kylin ?
2. What standard functions are supported in Kylin? What we can expect in
future releases? It will be help full, if i can get pointers for them.
Regards
Prashant
Re: If else query in KYLIN
Posted by Prashant Prakash <pr...@gmail.com>.
Hi Marek, It worked. Thanks!
Any thing about Qn. 2.
Re: If else query in KYLIN
Posted by Marek Wiewiorka <ma...@gmail.com>.
Hi - did you try to use "case when then" ?
It worked for me sometime ago.
M.
2016-01-22 14:52 GMT+01:00 Prashant Prakash <pr...@gmail.com>:
> Hi All,
>
> We want to use "if else" construct in kylin query.
>
> Sample query:
> SELECT f.a, IF(SUM(x) < SUM(y), SUM(x), SUM(y)) FROM kylin.test f WHERE dt
> = '2016-01-19' GROUP BY f.a
>
> As such there is no support for function signature IF(<BOOLEAN>,
> <NUMERIC>, <NUMERIC>)
>
> 1. Is there any alternative way to use "if else" construct in Kylin ?
> 2. What standard functions are supported in Kylin? What we can expect in
> future releases? It will be help full, if i can get pointers for them.
>
> Regards
> Prashant
>