[ 
https://issues.apache.org/jira/browse/TAJO-785?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14958272#comment-14958272
 ] 

Hyunsik Choi commented on TAJO-785:
-----------------------------------

Is it still a bug?

> CaseWhenPredicate occasionally can be wrong at where clause.
> ------------------------------------------------------------
>
>                 Key: TAJO-785
>                 URL: https://issues.apache.org/jira/browse/TAJO-785
>             Project: Tajo
>          Issue Type: Bug
>          Components: Planner/Optimizer
>            Reporter: Jaehwa Jung
>            Assignee: Jaehwa Jung
>
> I found a bug for CaseWhenPredicate as follows:
> * SQL
> {code:xml}
> select count(*)
>  from store_sales
>  JOIN date_dim ON store_sales.ss_sold_date_sk = date_dim.d_date_sk
>  JOIN store ON store_sales.ss_store_sk = store.s_store_sk
>  JOIN household_demographics ON store_sales.ss_hdemo_sk = 
> household_demographics.hd_demo_sk
>  where
>      (date_dim.d_dom between 1 and 3 or date_dim.d_dom between 25 and 28)
>  and (household_demographics.hd_buy_potential = '>10000' or
>       household_demographics.hd_buy_potential = 'unknown')
>  and household_demographics.hd_vehicle_count > 0
>  and (case when household_demographics.hd_vehicle_count > 0
>      then household_demographics.hd_dep_count/ 
> household_demographics.hd_vehicle_count
>      else null
>      end)  > 1.2
>  and date_dim.d_year in (1998,1999,2000)
>  and store.s_county in ('Williamson County','Williamson County','Williamson 
> County','Williamson County',
>                         'Williamson County','Williamson County','Williamson 
> County','Williamson County')
> {code}
> * Expected Result
> {code:xml}
> ?count
> -------------------------------
> 325831
> {code}
> * Actual Result
> {code:xml}
> ?count
> -------------------------------
> 249749
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to