You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kylin.apache.org by Li Yang <li...@apache.org> on 2017/09/03 08:22:16 UTC

Re: SQL execute failed when use CASE in where clause

This looks like a bug. Please log a JIRA.

Thanks for reporting!

On Thu, Aug 24, 2017 at 8:44 PM, skyyws <sk...@163.com> wrote:

> Sorry for my mistake. It should be "use CAST in where clause" not "CASE"
>
> 2017-08-24
>
> skyyws
>
>
>
> 发件人:"skyyws"<sk...@163.com>
> 发送时间:2017-08-24 20:41
> 主题:SQL execute failed when use CASE in where clause
> 收件人:"dev"<de...@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
>