You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kylin.apache.org by "Zhong Yanghong (JIRA)" <ji...@apache.org> on 2019/03/18 03:32:00 UTC

[jira] [Updated] (KYLIN-3881) Kylin may return incorrect results when there's a CompareTupleFilter, like colName = (1 = 1)

     [ https://issues.apache.org/jira/browse/KYLIN-3881?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Zhong Yanghong updated KYLIN-3881:
----------------------------------
    Fix Version/s: v3.0.0

> Kylin may return incorrect results when there's a CompareTupleFilter, like colName = (1 = 1) 
> ---------------------------------------------------------------------------------------------
>
>                 Key: KYLIN-3881
>                 URL: https://issues.apache.org/jira/browse/KYLIN-3881
>             Project: Kylin
>          Issue Type: Bug
>            Reporter: Zhong Yanghong
>            Assignee: Zhong Yanghong
>            Priority: Major
>             Fix For: v3.0.0
>
>
> Sample SQLs:
> {code}
> select colA
>        case
>            when colB = (1 = 1) then 'B'
>            when colC = (1 = 1) then 'C'
>            when colD = (1 = 1) then 'D'
>            else 'n/a'
>        end as phase,
>        count(*)
> from T
> where session_date between '2018-08-01' and '2018-08-31'
> group by colA
>        case
>            when colB = (1 = 1) then 'B'
>            when colC = (1 = 1) then 'C'
>            when colD = (1 = 1) then 'D'
>            else 'n/a'
>        end;
> {code}
> {code}
> select colA
>        case
>            when (colB = (1 = 1)) = (colC = (1 = 1)) then 'B&C'
>            when (colC = (1 = 1)) = (colD = (1 = 1)) then 'C&D'
>            else 'n/a'
>        end as phase,
>        count(*)
> from T
> where session_date between '2018-08-01' and '2018-08-31'
> group by colA
>        case
>            when (colB = (1 = 1)) = (colC = (1 = 1)) then 'B&C'
>            when (colC = (1 = 1)) = (colD = (1 = 1)) then 'C&D'
>            else 'n/a'
>        end;
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)