Re: Can KYLIN support select if ... from SQL?

2017-09-01 Thread Billy Liu
The drawback is the performance. Kylin is pre-calculation engine, which need define the dimensions and measure before queries. In your case, the count distinct statement will be evaluated at the query running time, not from the pre-calculated cuboid directly . 2017-09-01 23:41 GMT+08:00 Yuxiang

Re: Can KYLIN support select if ... from SQL?

2017-09-01 Thread Yuxiang Mai
Thanks.. We will try it. BTW, any drawbacks if we directly use in a where condition? On Fri, Sep 1, 2017 at 11:37 PM, Billy Liu wrote: > The suggested way is to define new column for the if statement, for > example, in a Hive view. > > 2017-09-01 23:08 GMT+08:00 Yuxiang Mai : > >> Hi, expert

Re: Can KYLIN support select if ... from SQL?

2017-09-01 Thread Billy Liu
The suggested way is to define new column for the if statement, for example, in a Hive view. 2017-09-01 23:08 GMT+08:00 Yuxiang Mai : > Hi, experts > > We are using KYLIN for a Hive table with 3 columns with binary values: 1 > for true, 0 for false. For example: is_new, is_recommend, is_discount.

Can KYLIN support select if ... from SQL?

2017-09-01 Thread Yuxiang Mai
Hi, experts We are using KYLIN for a Hive table with 3 columns with binary values: 1 for true, 0 for false. For example: is_new, is_recommend, is_discount. We wonder if KYLIN the select if .. from ... like the following: hive> select shop, count(distinct if(is_new =1, item_id, NULL)) from table w