gregrahn / tpcds-kit

TPC-DS benchmark kit with some modifications/fixes
317 stars 200 forks source link

bugs in query22a #31

Open gregrahn opened 7 years ago

gregrahn commented 7 years ago

As of v2.4 the results CTE has a group by that appears to be a mistake. There is no aggregate and when removing the group by query22a returns the same result then as query22.

ERROR:  column "inventory.inv_quantity_on_hand" must appear in the GROUP BY clause or be used in an aggregate function
LINE 6:              ,inv_quantity_on_hand qoh
                      ^

Additionally query22a has a reference to the warehouse table and corresponding join -- which is not present in query22.

from inventory
           ,date_dim
           ,item
           ,warehouse  -- <<< Not in query22
       where  inv_date_sk=d_date_sk
              and inv_item_sk=i_item_sk
              and inv_warehouse_sk = w_warehouse_sk  -- <<< Not in query22
              and d_month_seq between [DMS] and [DMS] + 11
gregrahn commented 7 years ago

Fixed in this repo via 3a3d82347561d31501690df053b5ccab6c222f62.

gregrahn commented 7 years ago

Present in v2.4.0

gregrahn commented 6 years ago

Present in v2.6.0

gregrahn commented 6 years ago

Present in v2.9.0

gregrahn commented 5 years ago

Present in v2.11.0

gregrahn commented 4 years ago

Removed references to warehouse in 5a3a81796992b725c2a8b216767e142609966752