Uploaded image for project: 'Tajo (Retired)'
  1. Tajo (Retired)
  2. TAJO-785

CaseWhenPredicate occasionally can be wrong at where clause.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • Planner/Optimizer
    • None

    Description

      I found a bug for CaseWhenPredicate as follows:

      • SQL
        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')
        
      • Expected Result
        ?count
        -------------------------------
        325831
        
      • Actual Result
        ?count
        -------------------------------
        249749
        

      Attachments

        Issue Links

          Activity

            People

              blrunner JaeHwa Jung
              blrunner JaeHwa Jung
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: