Skip to content
Permalink
Browse files
DRILL-5188: Added TPC-DS queries that were previously failing due to …
…IllegalArgumentException (#504)
  • Loading branch information
agozhiy authored and Agirish committed Sep 14, 2018
1 parent 8689ba8 commit 33811dc01bb0f913b08325ffaec86dc432853ef9
Showing 41 changed files with 473 additions and 8 deletions.
@@ -0,0 +1 @@
114 434335.19999999995 -107384.01
@@ -7,8 +7,8 @@ FROM catalog_sales cs1 ,
date_dim ,
customer_address ,
call_center
WHERE d_date BETWEEN '2002-3-01' AND (
Cast('2002-3-01' AS DATE) + INTERVAL '60' day)
WHERE d_date BETWEEN '2002-03-01' AND (
Cast('2002-03-01' AS DATE) + INTERVAL '60' day)
AND cs1.cs_ship_date_sk = d_date_sk
AND cs1.cs_ship_addr_sk = ca_address_sk
AND ca_state = 'IA'
@@ -0,0 +1 @@
88535.2
@@ -0,0 +1 @@
13924.27
@@ -0,0 +1 @@
34 63754.72000000002 15919.010000000002
@@ -0,0 +1,37 @@
-- start query 95 in stream 0 using template query95.tpl
WITH ws_wh AS
(
SELECT ws1.ws_order_number,
ws1.ws_warehouse_sk wh1,
ws2.ws_warehouse_sk wh2
FROM web_sales ws1,
web_sales ws2
WHERE ws1.ws_order_number = ws2.ws_order_number
AND ws1.ws_warehouse_sk <> ws2.ws_warehouse_sk)
SELECT
Count(DISTINCT ws_order_number) AS `order count` ,
Sum(ws_ext_ship_cost) AS `total shipping cost` ,
Sum(ws_net_profit) AS `total net profit`
FROM web_sales ws1 ,
date_dim ,
customer_address ,
web_site
WHERE d_date BETWEEN '2000-04-01' AND (
Cast('2000-04-01' AS DATE) + INTERVAL '60' day)
AND ws1.ws_ship_date_sk = d_date_sk
AND ws1.ws_ship_addr_sk = ca_address_sk
AND ca_state = 'IN'
AND ws1.ws_web_site_sk = web_site_sk
AND web_company_name = 'pri'
AND ws1.ws_order_number IN
(
SELECT ws_order_number
FROM ws_wh)
AND ws1.ws_order_number IN
(
SELECT wr_order_number
FROM web_returns,
ws_wh
WHERE wr_order_number = ws_wh.ws_order_number)
ORDER BY count(DISTINCT ws_order_number)
LIMIT 100;
@@ -0,0 +1 @@
114 434335.19999999995 -107384.01
@@ -0,0 +1,33 @@
-- start query 16 in stream 0 using template query16.tpl
SELECT
Count(DISTINCT cs_order_number) AS `order count` ,
Sum(cs_ext_ship_cost) AS `total shipping cost` ,
Sum(cs_net_profit) AS `total net profit`
FROM catalog_sales cs1 ,
date_dim ,
customer_address ,
call_center
WHERE d_date BETWEEN '2002-03-01' AND (
Cast('2002-03-01' AS DATE) + INTERVAL '60' day)
AND cs1.cs_ship_date_sk = d_date_sk
AND cs1.cs_ship_addr_sk = ca_address_sk
AND ca_state = 'IA'
AND cs1.cs_call_center_sk = cc_call_center_sk
AND cc_county IN ('Williamson County',
'Williamson County',
'Williamson County',
'Williamson County',
'Williamson County' )
AND EXISTS
(
SELECT *
FROM catalog_sales cs2
WHERE cs1.cs_order_number = cs2.cs_order_number
AND cs1.cs_warehouse_sk <> cs2.cs_warehouse_sk)
AND NOT EXISTS
(
SELECT *
FROM catalog_returns cr1
WHERE cs1.cs_order_number = cr1.cr_order_number)
ORDER BY count(DISTINCT cs_order_number)
LIMIT 100;
@@ -0,0 +1 @@
88535.2
@@ -0,0 +1,21 @@
-- start query 32 in stream 0 using template query32.tpl
SELECT
Sum(cs_ext_discount_amt) AS `excess discount amount`
FROM catalog_sales ,
item ,
date_dim
WHERE i_manufact_id = 610
AND i_item_sk = cs_item_sk
AND d_date BETWEEN '2001-03-04' AND (
Cast('2001-03-04' AS DATE) + INTERVAL '90' day)
AND d_date_sk = cs_sold_date_sk
AND cs_ext_discount_amt >
(
SELECT 1.3 * avg(cs_ext_discount_amt)
FROM catalog_sales ,
date_dim
WHERE cs_item_sk = i_item_sk
AND d_date BETWEEN '2001-03-04' AND (
cast('2001-03-04' AS date) + INTERVAL '90' day)
AND d_date_sk = cs_sold_date_sk )
LIMIT 100;
@@ -0,0 +1 @@
13924.27
@@ -0,0 +1,22 @@
-- start query 92 in stream 0 using template query92.tpl
SELECT
Sum(ws_ext_discount_amt) AS `Excess Discount Amount`
FROM web_sales ,
item ,
date_dim
WHERE i_manufact_id = 718
AND i_item_sk = ws_item_sk
AND d_date BETWEEN '2002-03-29' AND (
Cast('2002-03-29' AS DATE) + INTERVAL '90' day)
AND d_date_sk = ws_sold_date_sk
AND ws_ext_discount_amt >
(
SELECT 1.3 * avg(ws_ext_discount_amt)
FROM web_sales ,
date_dim
WHERE ws_item_sk = i_item_sk
AND d_date BETWEEN '2002-03-29' AND (
cast('2002-03-29' AS date) + INTERVAL '90' day)
AND d_date_sk = ws_sold_date_sk )
ORDER BY sum(ws_ext_discount_amt)
LIMIT 100;
@@ -0,0 +1 @@
34 63754.72000000002 15919.010000000002
@@ -0,0 +1,37 @@
-- start query 95 in stream 0 using template query95.tpl
WITH ws_wh AS
(
SELECT ws1.ws_order_number,
ws1.ws_warehouse_sk wh1,
ws2.ws_warehouse_sk wh2
FROM web_sales ws1,
web_sales ws2
WHERE ws1.ws_order_number = ws2.ws_order_number
AND ws1.ws_warehouse_sk <> ws2.ws_warehouse_sk)
SELECT
Count(DISTINCT ws_order_number) AS `order count` ,
Sum(ws_ext_ship_cost) AS `total shipping cost` ,
Sum(ws_net_profit) AS `total net profit`
FROM web_sales ws1 ,
date_dim ,
customer_address ,
web_site
WHERE d_date BETWEEN '2000-04-01' AND (
Cast('2000-04-01' AS DATE) + INTERVAL '60' day)
AND ws1.ws_ship_date_sk = d_date_sk
AND ws1.ws_ship_addr_sk = ca_address_sk
AND ca_state = 'IN'
AND ws1.ws_web_site_sk = web_site_sk
AND web_company_name = 'pri'
AND ws1.ws_order_number IN
(
SELECT ws_order_number
FROM ws_wh)
AND ws1.ws_order_number IN
(
SELECT wr_order_number
FROM web_returns,
ws_wh
WHERE wr_order_number = ws_wh.ws_order_number)
ORDER BY count(DISTINCT ws_order_number)
LIMIT 100;
@@ -0,0 +1 @@
114 434335.19999999995 -107384.01
@@ -0,0 +1,33 @@
-- start query 16 in stream 0 using template query16.tpl
SELECT
Count(DISTINCT cs_order_number) AS `order count` ,
Sum(cs_ext_ship_cost) AS `total shipping cost` ,
Sum(cs_net_profit) AS `total net profit`
FROM catalog_sales cs1 ,
date_dim ,
customer_address ,
call_center
WHERE d_date BETWEEN '2002-03-01' AND (
Cast('2002-03-01' AS DATE) + INTERVAL '60' day)
AND cs1.cs_ship_date_sk = d_date_sk
AND cs1.cs_ship_addr_sk = ca_address_sk
AND ca_state = 'IA'
AND cs1.cs_call_center_sk = cc_call_center_sk
AND cc_county IN ('Williamson County',
'Williamson County',
'Williamson County',
'Williamson County',
'Williamson County' )
AND EXISTS
(
SELECT *
FROM catalog_sales cs2
WHERE cs1.cs_order_number = cs2.cs_order_number
AND cs1.cs_warehouse_sk <> cs2.cs_warehouse_sk)
AND NOT EXISTS
(
SELECT *
FROM catalog_returns cr1
WHERE cs1.cs_order_number = cr1.cr_order_number)
ORDER BY count(DISTINCT cs_order_number)
LIMIT 100;
@@ -0,0 +1 @@
88535.2
@@ -0,0 +1,21 @@
-- start query 32 in stream 0 using template query32.tpl
SELECT
Sum(cs_ext_discount_amt) AS `excess discount amount`
FROM catalog_sales ,
item ,
date_dim
WHERE i_manufact_id = 610
AND i_item_sk = cs_item_sk
AND d_date BETWEEN '2001-03-04' AND (
Cast('2001-03-04' AS DATE) + INTERVAL '90' day)
AND d_date_sk = cs_sold_date_sk
AND cs_ext_discount_amt >
(
SELECT 1.3 * avg(cs_ext_discount_amt)
FROM catalog_sales ,
date_dim
WHERE cs_item_sk = i_item_sk
AND d_date BETWEEN '2001-03-04' AND (
cast('2001-03-04' AS date) + INTERVAL '90' day)
AND d_date_sk = cs_sold_date_sk )
LIMIT 100;
@@ -0,0 +1 @@
13924.27
@@ -0,0 +1,22 @@
-- start query 92 in stream 0 using template query92.tpl
SELECT
Sum(ws_ext_discount_amt) AS `Excess Discount Amount`
FROM web_sales ,
item ,
date_dim
WHERE i_manufact_id = 718
AND i_item_sk = ws_item_sk
AND d_date BETWEEN '2002-03-29' AND (
Cast('2002-03-29' AS DATE) + INTERVAL '90' day)
AND d_date_sk = ws_sold_date_sk
AND ws_ext_discount_amt >
(
SELECT 1.3 * avg(ws_ext_discount_amt)
FROM web_sales ,
date_dim
WHERE ws_item_sk = i_item_sk
AND d_date BETWEEN '2002-03-29' AND (
cast('2002-03-29' AS date) + INTERVAL '90' day)
AND d_date_sk = ws_sold_date_sk )
ORDER BY sum(ws_ext_discount_amt)
LIMIT 100;
@@ -0,0 +1 @@
34 63754.72000000002 15919.010000000002
@@ -0,0 +1,37 @@
-- start query 95 in stream 0 using template query95.tpl
WITH ws_wh AS
(
SELECT ws1.ws_order_number,
ws1.ws_warehouse_sk wh1,
ws2.ws_warehouse_sk wh2
FROM web_sales ws1,
web_sales ws2
WHERE ws1.ws_order_number = ws2.ws_order_number
AND ws1.ws_warehouse_sk <> ws2.ws_warehouse_sk)
SELECT
Count(DISTINCT ws_order_number) AS `order count` ,
Sum(ws_ext_ship_cost) AS `total shipping cost` ,
Sum(ws_net_profit) AS `total net profit`
FROM web_sales ws1 ,
date_dim ,
customer_address ,
web_site
WHERE d_date BETWEEN '2000-04-01' AND (
Cast('2000-04-01' AS DATE) + INTERVAL '60' day)
AND ws1.ws_ship_date_sk = d_date_sk
AND ws1.ws_ship_addr_sk = ca_address_sk
AND ca_state = 'IN'
AND ws1.ws_web_site_sk = web_site_sk
AND web_company_name = 'pri'
AND ws1.ws_order_number IN
(
SELECT ws_order_number
FROM ws_wh)
AND ws1.ws_order_number IN
(
SELECT wr_order_number
FROM web_returns,
ws_wh
WHERE wr_order_number = ws_wh.ws_order_number)
ORDER BY count(DISTINCT ws_order_number)
LIMIT 100;

This file was deleted.

This file was deleted.

This file was deleted.

@@ -0,0 +1 @@
114 434335.19999999995 -107384.01
@@ -0,0 +1,33 @@
-- start query 16 in stream 0 using template query16.tpl
SELECT
Count(DISTINCT cs_order_number) AS `order count` ,
Sum(cs_ext_ship_cost) AS `total shipping cost` ,
Sum(cs_net_profit) AS `total net profit`
FROM catalog_sales cs1 ,
date_dim ,
customer_address ,
call_center
WHERE d_date BETWEEN '2002-03-01' AND (
Cast('2002-03-01' AS DATE) + INTERVAL '60' day)
AND cs1.cs_ship_date_sk = d_date_sk
AND cs1.cs_ship_addr_sk = ca_address_sk
AND ca_state = 'IA'
AND cs1.cs_call_center_sk = cc_call_center_sk
AND cc_county IN ('Williamson County',
'Williamson County',
'Williamson County',
'Williamson County',
'Williamson County' )
AND EXISTS
(
SELECT *
FROM catalog_sales cs2
WHERE cs1.cs_order_number = cs2.cs_order_number
AND cs1.cs_warehouse_sk <> cs2.cs_warehouse_sk)
AND NOT EXISTS
(
SELECT *
FROM catalog_returns cr1
WHERE cs1.cs_order_number = cr1.cr_order_number)
ORDER BY count(DISTINCT cs_order_number)
LIMIT 100;
@@ -0,0 +1 @@
88535.2
@@ -0,0 +1,21 @@
-- start query 32 in stream 0 using template query32.tpl
SELECT
Sum(cs_ext_discount_amt) AS `excess discount amount`
FROM catalog_sales ,
item ,
date_dim
WHERE i_manufact_id = 610
AND i_item_sk = cs_item_sk
AND d_date BETWEEN '2001-03-04' AND (
Cast('2001-03-04' AS DATE) + INTERVAL '90' day)
AND d_date_sk = cs_sold_date_sk
AND cs_ext_discount_amt >
(
SELECT 1.3 * avg(cs_ext_discount_amt)
FROM catalog_sales ,
date_dim
WHERE cs_item_sk = i_item_sk
AND d_date BETWEEN '2001-03-04' AND (
cast('2001-03-04' AS date) + INTERVAL '90' day)
AND d_date_sk = cs_sold_date_sk )
LIMIT 100;
@@ -0,0 +1 @@
13924.27

0 comments on commit 33811dc

Please sign in to comment.