kylin-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "skyyws"<sky...@163.com>
Subject Re: SQL execute failed when use CASE in where clause
Date Thu, 24 Aug 2017 12:44:35 GMT
Sorry for my mistake. It should be "use CAST in where clause" not "CASE"

2017-08-24 

skyyws 



发件人:"skyyws"<skyyws@163.com>
发送时间:2017-08-24 20:41
主题:SQL execute failed when use CASE in where clause
收件人:"dev"<dev@kylin.apache.org>
抄送:

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  
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message