Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
The below sql
select
f.cal_dt
from test_kylin_fact f
where
f.cal_dt not in (
select cal_dt from EDW.TEST_CAL_DT where week_beg_dt = date'2012-01-01'
)
should be equal to
select f.cal_dt
from test_kylin_fact f
left join ( select cal_dt from EDW.TEST_CAL_DT where week_beg_dt = date'2012-01-01' ) s
on f.cal_dt = s.cal_dt
where s.cal_dt IS NULL
However, when run the later sql with left join, it returns no results.