Jaehwa Jung created TAJO-785:
--------------------------------
Summary: CaseWhenPredicate may not be inconsistent 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.2#6252)