gregrahn / tpcds-kit

TPC-DS benchmark kit with some modifications/fixes
320 stars 205 forks source link

query24 missing join predicate #24

Closed gregrahn closed 7 years ago

gregrahn commented 7 years ago

Both iterations (queries) in query24.tpl seem to be missing the PK/FK join condition between between customer and customer_address which correlates to customers who currently live in their birth countries and in the neighborhood of the store (snippet of business question from specification).

as of v2.3.0

from store_sales
    ,store_returns
    ,store
    ,item
    ,customer
    ,customer_address
where ss_ticket_number = sr_ticket_number
  and ss_item_sk = sr_item_sk
  and ss_customer_sk = c_customer_sk
  and ss_item_sk = i_item_sk
  and ss_store_sk = s_store_sk
  and c_current_addr_sk = ca_address_sk -- this join is missing in query24.tpl
  and c_birth_country = upper(ca_country)
  and s_zip = ca_zip
  and s_market_id=[MARKET]
gregrahn commented 7 years ago

Missing join fixed in v2.5.0 (other changes as well).

gregrahn commented 7 years ago

Fixed in master via 517de4d2b409802880dff793019e172047b6bbbe