This looks like a bug. Please log a JIRA. Thanks for reporting!
On Thu, Aug 24, 2017 at 8:44 PM, skyyws <[email protected]> wrote: > Sorry for my mistake. It should be "use CAST in where clause" not "CASE" > > 2017-08-24 > > skyyws > > > > 发件人:"skyyws"<[email protected]> > 发送时间:2017-08-24 20:41 > 主题:SQL execute failed when use CASE in where clause > 收件人:"dev"<[email protected]> > 抄送: > > Hello all, > I met a probelm recently when I execute SQL in kylin 2.0.0. When I use the > following sql statement, I got an empty result: > > select dt,count(1) from USER_TABLE where cast(dt as date) >= > CAST('2016-06-01' as date) and cast(dt as date) < CAST('2016-06-04' as > date) group by dt > > dt is varchar type(like '2017-01-01'). But when I use another statement, I > got the correct result: > > select dt,count(1) from USER_TABLE where dt >= '2016-06-01' and dt < > '2016-06-04' group by dt > > Is this a bug? Or kylin does not supported this kind of sql? > 2017-08-24 > > > skyyws >
