tpcds-kit icon indicating copy to clipboard operation
tpcds-kit copied to clipboard

bugs in query22a

Open gregrahn opened this issue 8 years ago • 6 comments

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 avatar Apr 27 '17 04:04 gregrahn

Fixed in this repo via 3a3d82347561d31501690df053b5ccab6c222f62.

gregrahn avatar Apr 27 '17 04:04 gregrahn

Present in v2.4.0

gregrahn avatar May 20 '17 20:05 gregrahn

Present in v2.6.0

gregrahn avatar Oct 18 '17 05:10 gregrahn

Present in v2.9.0

gregrahn avatar Jul 22 '18 21:07 gregrahn

Present in v2.11.0

gregrahn avatar May 21 '19 00:05 gregrahn

Removed references to warehouse in 5a3a81796992b725c2a8b216767e142609966752

gregrahn avatar Mar 11 '20 19:03 gregrahn