diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-03-03 14:11:03 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-03-03 14:11:03 +0000 |
commit | 5d0ea770947ae1da51537ff75b14b48218d729aa (patch) | |
tree | 86e66fc69feeae4c4b23749e7779f6731791edcc /tests/fixtures/optimizer/tpc-ds | |
parent | Adding upstream version 21.1.2. (diff) | |
download | sqlglot-5d0ea770947ae1da51537ff75b14b48218d729aa.tar.xz sqlglot-5d0ea770947ae1da51537ff75b14b48218d729aa.zip |
Adding upstream version 22.2.0.upstream/22.2.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/fixtures/optimizer/tpc-ds')
25 files changed, 25 insertions, 0 deletions
diff --git a/tests/fixtures/optimizer/tpc-ds/call_center.csv.gz b/tests/fixtures/optimizer/tpc-ds/call_center.csv.gz Binary files differindex f36e23b..ad5043f 100644 --- a/tests/fixtures/optimizer/tpc-ds/call_center.csv.gz +++ b/tests/fixtures/optimizer/tpc-ds/call_center.csv.gz diff --git a/tests/fixtures/optimizer/tpc-ds/catalog_page.csv.gz b/tests/fixtures/optimizer/tpc-ds/catalog_page.csv.gz Binary files differindex 702242c..eed1508 100644 --- a/tests/fixtures/optimizer/tpc-ds/catalog_page.csv.gz +++ b/tests/fixtures/optimizer/tpc-ds/catalog_page.csv.gz diff --git a/tests/fixtures/optimizer/tpc-ds/catalog_returns.csv.gz b/tests/fixtures/optimizer/tpc-ds/catalog_returns.csv.gz Binary files differindex e87a0ec..e160514 100644 --- a/tests/fixtures/optimizer/tpc-ds/catalog_returns.csv.gz +++ b/tests/fixtures/optimizer/tpc-ds/catalog_returns.csv.gz diff --git a/tests/fixtures/optimizer/tpc-ds/catalog_sales.csv.gz b/tests/fixtures/optimizer/tpc-ds/catalog_sales.csv.gz Binary files differindex a40b0da..1828149 100644 --- a/tests/fixtures/optimizer/tpc-ds/catalog_sales.csv.gz +++ b/tests/fixtures/optimizer/tpc-ds/catalog_sales.csv.gz diff --git a/tests/fixtures/optimizer/tpc-ds/customer.csv.gz b/tests/fixtures/optimizer/tpc-ds/customer.csv.gz Binary files differindex f4af4f7..2277f72 100644 --- a/tests/fixtures/optimizer/tpc-ds/customer.csv.gz +++ b/tests/fixtures/optimizer/tpc-ds/customer.csv.gz diff --git a/tests/fixtures/optimizer/tpc-ds/customer_address.csv.gz b/tests/fixtures/optimizer/tpc-ds/customer_address.csv.gz Binary files differindex 8698e39..c553721 100644 --- a/tests/fixtures/optimizer/tpc-ds/customer_address.csv.gz +++ b/tests/fixtures/optimizer/tpc-ds/customer_address.csv.gz diff --git a/tests/fixtures/optimizer/tpc-ds/customer_demographics.csv.gz b/tests/fixtures/optimizer/tpc-ds/customer_demographics.csv.gz Binary files differindex c4b7b68..dfc65a0 100644 --- a/tests/fixtures/optimizer/tpc-ds/customer_demographics.csv.gz +++ b/tests/fixtures/optimizer/tpc-ds/customer_demographics.csv.gz diff --git a/tests/fixtures/optimizer/tpc-ds/date_dim.csv.gz b/tests/fixtures/optimizer/tpc-ds/date_dim.csv.gz Binary files differindex 35be08f..26280bf 100644 --- a/tests/fixtures/optimizer/tpc-ds/date_dim.csv.gz +++ b/tests/fixtures/optimizer/tpc-ds/date_dim.csv.gz diff --git a/tests/fixtures/optimizer/tpc-ds/household_demographics.csv.gz b/tests/fixtures/optimizer/tpc-ds/household_demographics.csv.gz Binary files differindex b8addb7..f0cde03 100644 --- a/tests/fixtures/optimizer/tpc-ds/household_demographics.csv.gz +++ b/tests/fixtures/optimizer/tpc-ds/household_demographics.csv.gz diff --git a/tests/fixtures/optimizer/tpc-ds/income_band.csv.gz b/tests/fixtures/optimizer/tpc-ds/income_band.csv.gz Binary files differindex d34d870..4374587 100644 --- a/tests/fixtures/optimizer/tpc-ds/income_band.csv.gz +++ b/tests/fixtures/optimizer/tpc-ds/income_band.csv.gz diff --git a/tests/fixtures/optimizer/tpc-ds/inventory.csv.gz b/tests/fixtures/optimizer/tpc-ds/inventory.csv.gz Binary files differindex c6f0d47..5afaaf6 100644 --- a/tests/fixtures/optimizer/tpc-ds/inventory.csv.gz +++ b/tests/fixtures/optimizer/tpc-ds/inventory.csv.gz diff --git a/tests/fixtures/optimizer/tpc-ds/item.csv.gz b/tests/fixtures/optimizer/tpc-ds/item.csv.gz Binary files differindex 4a316cd..9f65d87 100644 --- a/tests/fixtures/optimizer/tpc-ds/item.csv.gz +++ b/tests/fixtures/optimizer/tpc-ds/item.csv.gz diff --git a/tests/fixtures/optimizer/tpc-ds/promotion.csv.gz b/tests/fixtures/optimizer/tpc-ds/promotion.csv.gz Binary files differindex 339666c..e8692c2 100644 --- a/tests/fixtures/optimizer/tpc-ds/promotion.csv.gz +++ b/tests/fixtures/optimizer/tpc-ds/promotion.csv.gz diff --git a/tests/fixtures/optimizer/tpc-ds/reason.csv.gz b/tests/fixtures/optimizer/tpc-ds/reason.csv.gz Binary files differindex 0094849..de1f50f 100644 --- a/tests/fixtures/optimizer/tpc-ds/reason.csv.gz +++ b/tests/fixtures/optimizer/tpc-ds/reason.csv.gz diff --git a/tests/fixtures/optimizer/tpc-ds/ship_mode.csv.gz b/tests/fixtures/optimizer/tpc-ds/ship_mode.csv.gz Binary files differindex 8dec386..14465e8 100644 --- a/tests/fixtures/optimizer/tpc-ds/ship_mode.csv.gz +++ b/tests/fixtures/optimizer/tpc-ds/ship_mode.csv.gz diff --git a/tests/fixtures/optimizer/tpc-ds/store.csv.gz b/tests/fixtures/optimizer/tpc-ds/store.csv.gz Binary files differindex b4e8de0..8d04078 100644 --- a/tests/fixtures/optimizer/tpc-ds/store.csv.gz +++ b/tests/fixtures/optimizer/tpc-ds/store.csv.gz diff --git a/tests/fixtures/optimizer/tpc-ds/store_returns.csv.gz b/tests/fixtures/optimizer/tpc-ds/store_returns.csv.gz Binary files differindex 8469492..cba1300 100644 --- a/tests/fixtures/optimizer/tpc-ds/store_returns.csv.gz +++ b/tests/fixtures/optimizer/tpc-ds/store_returns.csv.gz diff --git a/tests/fixtures/optimizer/tpc-ds/store_sales.csv.gz b/tests/fixtures/optimizer/tpc-ds/store_sales.csv.gz Binary files differindex 3dd22e1..68caa83 100644 --- a/tests/fixtures/optimizer/tpc-ds/store_sales.csv.gz +++ b/tests/fixtures/optimizer/tpc-ds/store_sales.csv.gz diff --git a/tests/fixtures/optimizer/tpc-ds/time_dim.csv.gz b/tests/fixtures/optimizer/tpc-ds/time_dim.csv.gz Binary files differindex bf4fcaf..3e0fa35 100644 --- a/tests/fixtures/optimizer/tpc-ds/time_dim.csv.gz +++ b/tests/fixtures/optimizer/tpc-ds/time_dim.csv.gz diff --git a/tests/fixtures/optimizer/tpc-ds/tpc-ds.sql b/tests/fixtures/optimizer/tpc-ds/tpc-ds.sql index 5ea51e0..76e6431 100644 --- a/tests/fixtures/optimizer/tpc-ds/tpc-ds.sql +++ b/tests/fixtures/optimizer/tpc-ds/tpc-ds.sql @@ -1,6 +1,7 @@ -------------------------------------- -- TPC-DS 1 -------------------------------------- +# execute: true WITH customer_total_return AS (SELECT sr_customer_sk AS ctr_customer_sk, sr_store_sk AS ctr_store_sk, @@ -219,6 +220,7 @@ ORDER BY -------------------------------------- -- TPC-DS 3 -------------------------------------- +# execute: true SELECT dt.d_year, item.i_brand_id brand_id, item.i_brand brand, @@ -859,6 +861,7 @@ LIMIT 100; -------------------------------------- -- TPC-DS 6 -------------------------------------- +# execute: true SELECT a.ca_state state, Count(*) cnt FROM customer_address a, @@ -924,6 +927,7 @@ LIMIT 100; -------------------------------------- -- TPC-DS 7 -------------------------------------- +# execute: true SELECT i_item_id, Avg(ss_quantity) agg1, Avg(ss_list_price) agg2, @@ -1247,6 +1251,7 @@ LIMIT 100; -------------------------------------- -- TPC-DS 9 -------------------------------------- +# execute: true SELECT CASE WHEN (SELECT Count(*) FROM store_sales @@ -1448,6 +1453,7 @@ WHERE -------------------------------------- -- TPC-DS 10 -------------------------------------- +# execute: true SELECT cd_gender, cd_marital_status, cd_education_status, @@ -3056,6 +3062,7 @@ LIMIT 100; -------------------------------------- -- TPC-DS 24 -------------------------------------- +# execute: true WITH ssales AS (SELECT c_last_name, c_first_name, @@ -3158,6 +3165,7 @@ HAVING -------------------------------------- -- TPC-DS 25 -------------------------------------- +# execute: true SELECT i_item_id, i_item_desc, s_store_id, @@ -3247,6 +3255,7 @@ LIMIT 100; -------------------------------------- -- TPC-DS 26 -------------------------------------- +# execute: true SELECT i_item_id, Avg(cs_quantity) agg1, Avg(cs_list_price) agg2, @@ -3527,6 +3536,7 @@ LIMIT 100; -------------------------------------- -- TPC-DS 29 -------------------------------------- +# execute: true SELECT i_item_id, i_item_desc, s_store_id, @@ -3726,6 +3736,7 @@ LIMIT 100; -------------------------------------- -- TPC-DS 31 -------------------------------------- +# execute: true WITH ss AS (SELECT ca_county, d_qoy, @@ -3948,6 +3959,7 @@ LIMIT 100; -------------------------------------- -- TPC-DS 33 -------------------------------------- +# execute: true WITH ss AS (SELECT i_manufact_id, Sum(ss_ext_sales_price) total_sales @@ -5014,6 +5026,7 @@ LIMIT 100; -------------------------------------- -- TPC-DS 43 -------------------------------------- +# execute: true SELECT s_store_name, s_store_id, Sum(CASE @@ -6194,6 +6207,7 @@ LIMIT 100; -------------------------------------- -- TPC-DS 52 -------------------------------------- +# execute: true SELECT dt.d_year, item.i_brand_id brand_id, item.i_brand brand, @@ -6357,6 +6371,7 @@ LIMIT 100; -------------------------------------- -- TPC-DS 54 -------------------------------------- +# execute: true WITH my_customers AS (SELECT DISTINCT c_customer_sk, c_current_addr_sk @@ -6493,6 +6508,7 @@ LIMIT 100; -------------------------------------- -- TPC-DS 55 -------------------------------------- +# execute: true SELECT i_brand_id brand_id, i_brand brand, Sum(ss_ext_sales_price) ext_price @@ -6531,6 +6547,7 @@ LIMIT 100; -------------------------------------- -- TPC-DS 56 -------------------------------------- +# execute: true WITH ss AS (SELECT i_item_id, Sum(ss_ext_sales_price) total_sales @@ -7231,6 +7248,7 @@ LIMIT 100; -------------------------------------- -- TPC-DS 60 -------------------------------------- +# execute: true WITH ss AS (SELECT i_item_id, Sum(ss_ext_sales_price) total_sales @@ -8012,6 +8030,7 @@ ORDER BY -------------------------------------- -- TPC-DS 65 -------------------------------------- +# execute: true SELECT s_store_name, i_item_desc, sc.revenue, @@ -9113,6 +9132,7 @@ LIMIT 100; -------------------------------------- -- TPC-DS 69 -------------------------------------- +# execute: true SELECT cd_gender, cd_marital_status, cd_education_status, @@ -9355,6 +9375,7 @@ LIMIT 100; -------------------------------------- -- TPC-DS 71 -------------------------------------- +# execute: true SELECT i_brand_id brand_id, i_brand brand, t_hour, @@ -11064,6 +11085,7 @@ LIMIT 100; -------------------------------------- -- TPC-DS 83 -------------------------------------- +# execute: true WITH sr_items AS (SELECT i_item_id item_id, Sum(sr_return_quantity) sr_item_qty @@ -11262,6 +11284,7 @@ LIMIT 100; -------------------------------------- -- TPC-DS 84 -------------------------------------- +# execute: true SELECT c_customer_id AS customer_id, c_last_name || ', ' @@ -11563,6 +11586,7 @@ FROM "cool_cust" AS "cool_cust"; -------------------------------------- -- TPC-DS 88 -------------------------------------- +# execute: true select * from (select count(*) h8_30_to_9 @@ -12140,6 +12164,7 @@ LIMIT 100; -------------------------------------- -- TPC-DS 93 -------------------------------------- +# execute: true SELECT ss_customer_sk, Sum(act_sales) sumsales FROM (SELECT ss_item_sk, diff --git a/tests/fixtures/optimizer/tpc-ds/warehouse.csv.gz b/tests/fixtures/optimizer/tpc-ds/warehouse.csv.gz Binary files differindex 1dd95a0..cf64636 100644 --- a/tests/fixtures/optimizer/tpc-ds/warehouse.csv.gz +++ b/tests/fixtures/optimizer/tpc-ds/warehouse.csv.gz diff --git a/tests/fixtures/optimizer/tpc-ds/web_page.csv.gz b/tests/fixtures/optimizer/tpc-ds/web_page.csv.gz Binary files differindex 10a06a2..894ce3b 100644 --- a/tests/fixtures/optimizer/tpc-ds/web_page.csv.gz +++ b/tests/fixtures/optimizer/tpc-ds/web_page.csv.gz diff --git a/tests/fixtures/optimizer/tpc-ds/web_returns.csv.gz b/tests/fixtures/optimizer/tpc-ds/web_returns.csv.gz Binary files differindex 811e079..21f7040 100644 --- a/tests/fixtures/optimizer/tpc-ds/web_returns.csv.gz +++ b/tests/fixtures/optimizer/tpc-ds/web_returns.csv.gz diff --git a/tests/fixtures/optimizer/tpc-ds/web_sales.csv.gz b/tests/fixtures/optimizer/tpc-ds/web_sales.csv.gz Binary files differindex b1ac3b8..b384c78 100644 --- a/tests/fixtures/optimizer/tpc-ds/web_sales.csv.gz +++ b/tests/fixtures/optimizer/tpc-ds/web_sales.csv.gz diff --git a/tests/fixtures/optimizer/tpc-ds/web_site.csv.gz b/tests/fixtures/optimizer/tpc-ds/web_site.csv.gz Binary files differindex ccedce2..b9b5f72 100644 --- a/tests/fixtures/optimizer/tpc-ds/web_site.csv.gz +++ b/tests/fixtures/optimizer/tpc-ds/web_site.csv.gz |