Uploaded image for project: 'Kylin'
  1. Kylin
  2. KYLIN-4428

Left join result is empty

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • Query Engine
    • 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.

      Attachments

        Activity

          People

            yaho Zhong Yanghong
            yaho Zhong Yanghong
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: