From db56fa3e9c4d90cd9fcdd7f612a4e49b04e7d33b Mon Sep 17 00:00:00 2001 From: TengJianPing Date: Mon, 13 Jan 2025 14:03:42 +0800 Subject: [PATCH] [regression](spill) delete spill test cases for branch-3.0 for now (#46870) --- .../test_mv_case/test_mv_case.groovy | 2 +- .../suites/spill_p0/aggregate_spill.groovy | 43 -- .../suites/tpcds_sf1_p1/spill_test/q23.groovy | 220 -------- .../tpcds_sf1_unique_p1/spill/q01.groovy | 58 --- .../tpcds_sf1_unique_p1/spill/q02.groovy | 109 ---- .../tpcds_sf1_unique_p1/spill/q03.groovy | 45 -- .../tpcds_sf1_unique_p1/spill/q04.groovy | 122 ----- .../tpcds_sf1_unique_p1/spill/q05.groovy | 173 ------- .../tpcds_sf1_unique_p1/spill/q06.groovy | 60 --- .../tpcds_sf1_unique_p1/spill/q07.groovy | 54 -- .../tpcds_sf1_unique_p1/spill/q08.groovy | 470 ------------------ .../tpcds_sf1_unique_p1/spill/q09.groovy | 113 ----- .../tpcds_sf1_unique_p1/spill/q10.groovy | 86 ---- .../tpcds_sf1_unique_p1/spill/q11.groovy | 96 ---- .../tpcds_sf1_unique_p1/spill/q12.groovy | 48 -- .../tpcds_sf1_unique_p1/spill/q13.groovy | 74 --- .../tpcds_sf1_unique_p1/spill/q14_1.groovy | 194 -------- .../tpcds_sf1_unique_p1/spill/q14_2.groovy | 178 ------- .../tpcds_sf1_unique_p1/spill/q15.groovy | 48 -- .../tpcds_sf1_unique_p1/spill/q16.groovy | 59 --- .../tpcds_sf1_unique_p1/spill/q17.groovy | 70 --- .../tpcds_sf1_unique_p1/spill/q18.groovy | 63 --- .../tpcds_sf1_unique_p1/spill/q19.groovy | 54 -- .../tpcds_sf1_unique_p1/spill/q20.groovy | 48 -- .../tpcds_sf1_unique_p1/spill/q21.groovy | 52 -- .../tpcds_sf1_unique_p1/spill/q22.groovy | 45 -- .../tpcds_sf1_unique_p1/spill/q23_1.groovy | 117 ----- .../tpcds_sf1_unique_p1/spill/q23_2.groovy | 133 ----- .../tpcds_sf1_unique_p1/spill/q24_1.groovy | 75 --- .../tpcds_sf1_unique_p1/spill/q24_2.groovy | 75 --- .../tpcds_sf1_unique_p1/spill/q25.groovy | 65 --- .../tpcds_sf1_unique_p1/spill/q26.groovy | 54 -- .../tpcds_sf1_unique_p1/spill/q27.groovy | 61 --- .../tpcds_sf1_unique_p1/spill/q28.groovy | 104 ---- .../tpcds_sf1_unique_p1/spill/q29.groovy | 64 --- .../tpcds_sf1_unique_p1/spill/q30.groovy | 78 --- .../tpcds_sf1_unique_p1/spill/q31.groovy | 92 ---- .../tpcds_sf1_unique_p1/spill/q32.groovy | 48 -- .../tpcds_sf1_unique_p1/spill/q33.groovy | 117 ----- .../tpcds_sf1_unique_p1/spill/q34.groovy | 64 --- .../tpcds_sf1_unique_p1/spill/q35.groovy | 89 ---- .../tpcds_sf1_unique_p1/spill/q36.groovy | 56 --- .../tpcds_sf1_unique_p1/spill/q37.groovy | 48 -- .../tpcds_sf1_unique_p1/spill/q38.groovy | 67 --- .../tpcds_sf1_unique_p1/spill/q39_1.groovy | 80 --- .../tpcds_sf1_unique_p1/spill/q39_2.groovy | 81 --- .../tpcds_sf1_unique_p1/spill/q40.groovy | 49 -- .../tpcds_sf1_unique_p1/spill/q41.groovy | 98 ---- .../tpcds_sf1_unique_p1/spill/q42.groovy | 46 -- .../tpcds_sf1_unique_p1/spill/q43.groovy | 50 -- .../tpcds_sf1_unique_p1/spill/q44.groovy | 97 ---- .../tpcds_sf1_unique_p1/spill/q45.groovy | 57 --- .../tpcds_sf1_unique_p1/spill/q47.groovy | 91 ---- .../tpcds_sf1_unique_p1/spill/q48.groovy | 63 --- .../tpcds_sf1_unique_p1/spill/q49.groovy | 147 ------ .../spill/q49_rewrite.groovy | 142 ------ .../tpcds_sf1_unique_p1/spill/q50.groovy | 65 --- .../tpcds_sf1_unique_p1/spill/q51.groovy | 82 --- .../tpcds_sf1_unique_p1/spill/q52.groovy | 46 -- .../tpcds_sf1_unique_p1/spill/q53.groovy | 56 --- .../tpcds_sf1_unique_p1/spill/q54.groovy | 104 ---- .../tpcds_sf1_unique_p1/spill/q55.groovy | 45 -- .../tpcds_sf1_unique_p1/spill/q56.groovy | 117 ----- .../tpcds_sf1_unique_p1/spill/q57.groovy | 87 ---- .../tpcds_sf1_unique_p1/spill/q58.groovy | 122 ----- .../tpcds_sf1_unique_p1/spill/q59.groovy | 103 ---- .../tpcds_sf1_unique_p1/spill/q60.groovy | 117 ----- .../tpcds_sf1_unique_p1/spill/q61.groovy | 81 --- .../tpcds_sf1_unique_p1/spill/q62.groovy | 55 -- .../tpcds_sf1_unique_p1/spill/q63.groovy | 56 --- .../tpcds_sf1_unique_p1/spill/q64.groovy | 139 ------ .../tpcds_sf1_unique_p1/spill/q65.groovy | 76 --- .../tpcds_sf1_unique_p1/spill/q66.groovy | 175 ------- .../tpcds_sf1_unique_p1/spill/q67.groovy | 70 --- .../tpcds_sf1_unique_p1/spill/q68.groovy | 71 --- .../tpcds_sf1_unique_p1/spill/q69.groovy | 78 --- .../tpcds_sf1_unique_p1/spill/q70.groovy | 63 --- .../tpcds_sf1_unique_p1/spill/q71.groovy | 80 --- .../tpcds_sf1_unique_p1/spill/q72.groovy | 61 --- .../tpcds_sf1_unique_p1/spill/q73.groovy | 63 --- .../tpcds_sf1_unique_p1/spill/q74.groovy | 87 ---- .../tpcds_sf1_unique_p1/spill/q75.groovy | 112 ----- .../tpcds_sf1_unique_p1/spill/q76.groovy | 85 ---- .../tpcds_sf1_unique_p1/spill/q77.groovy | 149 ------ .../tpcds_sf1_unique_p1/spill/q78.groovy | 105 ---- .../tpcds_sf1_unique_p1/spill/q79.groovy | 63 --- .../tpcds_sf1_unique_p1/spill/q80.groovy | 135 ----- .../tpcds_sf1_unique_p1/spill/q81.groovy | 76 --- .../tpcds_sf1_unique_p1/spill/q82.groovy | 48 -- .../tpcds_sf1_unique_p1/spill/q83.groovy | 116 ----- .../tpcds_sf1_unique_p1/spill/q84.groovy | 49 -- .../tpcds_sf1_unique_p1/spill/q85.groovy | 79 --- .../tpcds_sf1_unique_p1/spill/q86.groovy | 45 -- .../tpcds_sf1_unique_p1/spill/q87.groovy | 69 --- .../tpcds_sf1_unique_p1/spill/q88.groovy | 191 ------- .../tpcds_sf1_unique_p1/spill/q89.groovy | 59 --- .../tpcds_sf1_unique_p1/spill/q90.groovy | 61 --- .../tpcds_sf1_unique_p1/spill/q91.groovy | 58 --- .../tpcds_sf1_unique_p1/spill/q92.groovy | 51 -- .../tpcds_sf1_unique_p1/spill/q93.groovy | 50 -- .../tpcds_sf1_unique_p1/spill/q94.groovy | 59 --- .../tpcds_sf1_unique_p1/spill/q95.groovy | 70 --- .../tpcds_sf1_unique_p1/spill/q96.groovy | 44 -- .../tpcds_sf1_unique_p1/spill/q97.groovy | 64 --- .../tpcds_sf1_unique_p1/spill/q98.groovy | 47 -- .../tpcds_sf1_unique_p1/spill/q99.groovy | 55 -- .../suites/tpch_sf0.1_p1/spill/q01.groovy | 51 -- .../suites/tpch_sf0.1_p1/spill/q02.groovy | 71 --- .../suites/tpch_sf0.1_p1/spill/q03.groovy | 54 -- .../suites/tpch_sf0.1_p1/spill/q04.groovy | 50 -- .../suites/tpch_sf0.1_p1/spill/q05.groovy | 56 --- .../suites/tpch_sf0.1_p1/spill/q06.groovy | 41 -- .../suites/tpch_sf0.1_p1/spill/q07.groovy | 70 --- .../suites/tpch_sf0.1_p1/spill/q08.groovy | 69 --- .../suites/tpch_sf0.1_p1/spill/q09.groovy | 62 --- .../suites/tpch_sf0.1_p1/spill/q10.groovy | 64 --- .../suites/tpch_sf0.1_p1/spill/q11.groovy | 59 --- .../suites/tpch_sf0.1_p1/spill/q12.groovy | 60 --- .../suites/tpch_sf0.1_p1/spill/q13.groovy | 52 -- .../suites/tpch_sf0.1_p1/spill/q14.groovy | 45 -- .../suites/tpch_sf0.1_p1/spill/q15.groovy | 48 -- .../suites/tpch_sf0.1_p1/spill/q16.groovy | 60 --- .../suites/tpch_sf0.1_p1/spill/q17.groovy | 47 -- .../suites/tpch_sf0.1_p1/spill/q18.groovy | 64 --- .../suites/tpch_sf0.1_p1/spill/q19.groovy | 66 --- .../suites/tpch_sf0.1_p1/spill/q20.groovy | 63 --- .../suites/tpch_sf0.1_p1/spill/q21.groovy | 69 --- .../suites/tpch_sf0.1_p1/spill/q22.groovy | 65 --- .../partitioned_agg_fault_injection.groovy | 149 ------ ...rtitioned_hash_join_fault_injection.groovy | 216 -------- .../spill/spill_sort_fault_injection.groovy | 158 ------ 131 files changed, 1 insertion(+), 10839 deletions(-) delete mode 100644 regression-test/suites/spill_p0/aggregate_spill.groovy delete mode 100644 regression-test/suites/tpcds_sf1_p1/spill_test/q23.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q01.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q02.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q03.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q04.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q05.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q06.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q07.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q08.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q09.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q10.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q11.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q12.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q13.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q14_1.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q14_2.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q15.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q16.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q17.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q18.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q19.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q20.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q21.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q22.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q23_1.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q23_2.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q24_1.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q24_2.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q25.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q26.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q27.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q28.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q29.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q30.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q31.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q32.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q33.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q34.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q35.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q36.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q37.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q38.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q39_1.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q39_2.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q40.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q41.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q42.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q43.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q44.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q45.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q47.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q48.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q49.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q49_rewrite.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q50.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q51.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q52.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q53.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q54.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q55.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q56.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q57.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q58.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q59.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q60.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q61.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q62.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q63.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q64.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q65.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q66.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q67.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q68.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q69.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q70.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q71.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q72.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q73.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q74.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q75.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q76.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q77.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q78.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q79.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q80.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q81.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q82.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q83.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q84.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q85.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q86.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q87.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q88.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q89.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q90.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q91.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q92.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q93.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q94.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q95.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q96.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q97.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q98.groovy delete mode 100644 regression-test/suites/tpcds_sf1_unique_p1/spill/q99.groovy delete mode 100644 regression-test/suites/tpch_sf0.1_p1/spill/q01.groovy delete mode 100644 regression-test/suites/tpch_sf0.1_p1/spill/q02.groovy delete mode 100644 regression-test/suites/tpch_sf0.1_p1/spill/q03.groovy delete mode 100644 regression-test/suites/tpch_sf0.1_p1/spill/q04.groovy delete mode 100644 regression-test/suites/tpch_sf0.1_p1/spill/q05.groovy delete mode 100644 regression-test/suites/tpch_sf0.1_p1/spill/q06.groovy delete mode 100644 regression-test/suites/tpch_sf0.1_p1/spill/q07.groovy delete mode 100644 regression-test/suites/tpch_sf0.1_p1/spill/q08.groovy delete mode 100644 regression-test/suites/tpch_sf0.1_p1/spill/q09.groovy delete mode 100644 regression-test/suites/tpch_sf0.1_p1/spill/q10.groovy delete mode 100644 regression-test/suites/tpch_sf0.1_p1/spill/q11.groovy delete mode 100644 regression-test/suites/tpch_sf0.1_p1/spill/q12.groovy delete mode 100644 regression-test/suites/tpch_sf0.1_p1/spill/q13.groovy delete mode 100644 regression-test/suites/tpch_sf0.1_p1/spill/q14.groovy delete mode 100644 regression-test/suites/tpch_sf0.1_p1/spill/q15.groovy delete mode 100644 regression-test/suites/tpch_sf0.1_p1/spill/q16.groovy delete mode 100644 regression-test/suites/tpch_sf0.1_p1/spill/q17.groovy delete mode 100644 regression-test/suites/tpch_sf0.1_p1/spill/q18.groovy delete mode 100644 regression-test/suites/tpch_sf0.1_p1/spill/q19.groovy delete mode 100644 regression-test/suites/tpch_sf0.1_p1/spill/q20.groovy delete mode 100644 regression-test/suites/tpch_sf0.1_p1/spill/q21.groovy delete mode 100644 regression-test/suites/tpch_sf0.1_p1/spill/q22.groovy delete mode 100644 regression-test/suites/tpch_sf1_p2/spill/partitioned_agg_fault_injection.groovy delete mode 100644 regression-test/suites/tpch_sf1_p2/spill/partitioned_hash_join_fault_injection.groovy delete mode 100644 regression-test/suites/tpch_sf1_p2/spill/spill_sort_fault_injection.groovy diff --git a/regression-test/suites/correctness_p0/test_mv_case/test_mv_case.groovy b/regression-test/suites/correctness_p0/test_mv_case/test_mv_case.groovy index 8e548eb27ea87c..02a38bf181f2d7 100644 --- a/regression-test/suites/correctness_p0/test_mv_case/test_mv_case.groovy +++ b/regression-test/suites/correctness_p0/test_mv_case/test_mv_case.groovy @@ -108,7 +108,7 @@ suite("test_mv_case") { "enable_nondeterministic_function" = "true" ) AS select - /*+ SET_VAR(enable_force_spill = true) */ + /*+ SET_VAR(enable_force_spill = false) */ cast(a.id as bigint) info_id, map_infos from diff --git a/regression-test/suites/spill_p0/aggregate_spill.groovy b/regression-test/suites/spill_p0/aggregate_spill.groovy deleted file mode 100644 index 180ab37200f171..00000000000000 --- a/regression-test/suites/spill_p0/aggregate_spill.groovy +++ /dev/null @@ -1,43 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -suite("aggregate_spill") { - sql """ - set enable_agg_spill = true; - """ - sql """ - set enable_force_spill = true; - """ - sql """ - set min_revocable_mem = 1; - """ - sql """ - set parallel_pipeline_task_num = 4; - """ - sql """ - drop table if exists aggregate_spill_test; - """ - sql """ - CREATE TABLE `aggregate_spill_test` (k1 int, k2 int replace) distributed by hash(k1) properties("replication_num"="1"); - """ - sql """ - insert into aggregate_spill_test values(1, 1), (2, 1), (3, 1), (4, 1), (5, 1); - """ - qt_aggregate_spill """ - select count(), k2 from aggregate_spill_test group by k2 limit 1; - """ -} \ No newline at end of file diff --git a/regression-test/suites/tpcds_sf1_p1/spill_test/q23.groovy b/regression-test/suites/tpcds_sf1_p1/spill_test/q23.groovy deleted file mode 100644 index cc5408d6b81a54..00000000000000 --- a/regression-test/suites/tpcds_sf1_p1/spill_test/q23.groovy +++ /dev/null @@ -1,220 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -suite("q23") { - sql """ set enable_force_spill =true; """ - sql """ set min_revocable_mem = 65536; """ - sql """ use regression_test_tpcds_sf1_p1; """ - - qt_select1 """ - WITH - frequent_ss_items AS ( - SELECT - substr(i_item_desc, 1, 30) itemdesc - , i_item_sk item_sk - , d_date solddate - , count(*) cnt - FROM - store_sales - , date_dim - , item - WHERE (ss_sold_date_sk = d_date_sk) - AND (ss_item_sk = i_item_sk) - AND (d_year IN (2000 , (2000 + 1) , (2000 + 2) , (2000 + 3))) - GROUP BY substr(i_item_desc, 1, 30), i_item_sk, d_date - HAVING (count(*) > 4) - ) - , max_store_sales AS ( - SELECT max(csales) tpcds_cmax - FROM - ( - SELECT - c_customer_sk - , sum((ss_quantity * ss_sales_price)) csales - FROM - store_sales - , customer - , date_dim - WHERE (ss_customer_sk = c_customer_sk) - AND (ss_sold_date_sk = d_date_sk) - AND (d_year IN (2000 , (2000 + 1) , (2000 + 2) , (2000 + 3))) - GROUP BY c_customer_sk - ) x - ) - , best_ss_customer AS ( - SELECT - c_customer_sk - , sum((ss_quantity * ss_sales_price)) ssales - FROM - store_sales - , customer - WHERE (ss_customer_sk = c_customer_sk) - GROUP BY c_customer_sk - HAVING (sum((ss_quantity * ss_sales_price)) > ((50 / CAST('100.0' AS DECIMAL(5,2))) * ( - SELECT * - FROM - max_store_sales - ))) - ) - SELECT sum(sales) - FROM - ( - SELECT (cs_quantity * cs_list_price) sales - FROM - catalog_sales - , date_dim - WHERE (d_year = 2000) - AND (d_moy = 2) - AND (cs_sold_date_sk = d_date_sk) - AND (cs_item_sk IN ( - SELECT item_sk - FROM - frequent_ss_items - )) - AND (cs_bill_customer_sk IN ( - SELECT c_customer_sk - FROM - best_ss_customer - )) - UNION ALL SELECT (ws_quantity * ws_list_price) sales - FROM - web_sales - , date_dim - WHERE (d_year = 2000) - AND (d_moy = 2) - AND (ws_sold_date_sk = d_date_sk) - AND (ws_item_sk IN ( - SELECT item_sk - FROM - frequent_ss_items - )) - AND (ws_bill_customer_sk IN ( - SELECT c_customer_sk - FROM - best_ss_customer - )) - ) y - LIMIT 100 - """ - - qt_select2 """ - WITH - frequent_ss_items AS ( - SELECT - substr(i_item_desc, 1, 30) itemdesc - , i_item_sk item_sk - , d_date solddate - , count(*) cnt - FROM - store_sales - , date_dim - , item - WHERE (ss_sold_date_sk = d_date_sk) - AND (ss_item_sk = i_item_sk) - AND (d_year IN (2000 , (2000 + 1) , (2000 + 2) , (2000 + 3))) - GROUP BY substr(i_item_desc, 1, 30), i_item_sk, d_date - HAVING (count(*) > 4) - ) - , max_store_sales AS ( - SELECT max(csales) tpcds_cmax - FROM - ( - SELECT - c_customer_sk - , sum((ss_quantity * ss_sales_price)) csales - FROM - store_sales - , customer - , date_dim - WHERE (ss_customer_sk = c_customer_sk) - AND (ss_sold_date_sk = d_date_sk) - AND (d_year IN (2000 , (2000 + 1) , (2000 + 2) , (2000 + 3))) - GROUP BY c_customer_sk - ) x - ) - , best_ss_customer AS ( - SELECT - c_customer_sk - , sum((ss_quantity * ss_sales_price)) ssales - FROM - store_sales - , customer - WHERE (ss_customer_sk = c_customer_sk) - GROUP BY c_customer_sk - HAVING (sum((ss_quantity * ss_sales_price)) > ((50 / CAST('100.0' AS DECIMAL(5,2))) * ( - SELECT * - FROM - max_store_sales - ))) - ) - SELECT - c_last_name - , c_first_name - , sales - FROM - ( - SELECT - c_last_name - , c_first_name - , sum((cs_quantity * cs_list_price)) sales - FROM - catalog_sales - , customer - , date_dim - WHERE (d_year = 2000) - AND (d_moy = 2) - AND (cs_sold_date_sk = d_date_sk) - AND (cs_item_sk IN ( - SELECT item_sk - FROM - frequent_ss_items - )) - AND (cs_bill_customer_sk IN ( - SELECT c_customer_sk - FROM - best_ss_customer - )) - AND (cs_bill_customer_sk = c_customer_sk) - GROUP BY c_last_name, c_first_name - UNION ALL SELECT - c_last_name - , c_first_name - , sum((ws_quantity * ws_list_price)) sales - FROM - web_sales - , customer - , date_dim - WHERE (d_year = 2000) - AND (d_moy = 2) - AND (ws_sold_date_sk = d_date_sk) - AND (ws_item_sk IN ( - SELECT item_sk - FROM - frequent_ss_items - )) - AND (ws_bill_customer_sk IN ( - SELECT c_customer_sk - FROM - best_ss_customer - )) - AND (ws_bill_customer_sk = c_customer_sk) - GROUP BY c_last_name, c_first_name - ) z - ORDER BY c_last_name ASC, c_first_name ASC, sales ASC - LIMIT 100 - """ -} \ No newline at end of file diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q01.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q01.groovy deleted file mode 100644 index a0e3b6547bcffa..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q01.groovy +++ /dev/null @@ -1,58 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q01_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q01 """ -WITH - customer_total_return AS ( - SELECT - sr_customer_sk ctr_customer_sk - , sr_store_sk ctr_store_sk - , sum(sr_return_amt) ctr_total_return - FROM - store_returns - , date_dim - WHERE (sr_returned_date_sk = d_date_sk) - AND (d_year = 2000) - GROUP BY sr_customer_sk, sr_store_sk -) -SELECT c_customer_id -FROM - customer_total_return ctr1 -, store -, customer -WHERE (ctr1.ctr_total_return > ( - SELECT (avg(ctr_total_return) * CAST('1.2' AS DECIMAL(2,1))) - FROM - customer_total_return ctr2 - WHERE (ctr1.ctr_store_sk = ctr2.ctr_store_sk) - )) - AND (s_store_sk = ctr1.ctr_store_sk) - AND (s_state = 'TN') - AND (ctr1.ctr_customer_sk = c_customer_sk) -ORDER BY c_customer_id ASC -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q02.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q02.groovy deleted file mode 100644 index d7ce6bae65ddb5..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q02.groovy +++ /dev/null @@ -1,109 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q02_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q02 """ -WITH - wscs AS ( - SELECT - sold_date_sk - , sales_price - FROM - ( - SELECT - ws_sold_date_sk sold_date_sk - , ws_ext_sales_price sales_price - FROM - web_sales - ) x -UNION ALL ( - SELECT - cs_sold_date_sk sold_date_sk - , cs_ext_sales_price sales_price - FROM - catalog_sales - ) ) -, wswscs AS ( - SELECT - d_week_seq - , sum((CASE WHEN (d_day_name = 'Sunday') THEN sales_price ELSE null END)) sun_sales - , sum((CASE WHEN (d_day_name = 'Monday') THEN sales_price ELSE null END)) mon_sales - , sum((CASE WHEN (d_day_name = 'Tuesday') THEN sales_price ELSE null END)) tue_sales - , sum((CASE WHEN (d_day_name = 'Wednesday') THEN sales_price ELSE null END)) wed_sales - , sum((CASE WHEN (d_day_name = 'Thursday') THEN sales_price ELSE null END)) thu_sales - , sum((CASE WHEN (d_day_name = 'Friday') THEN sales_price ELSE null END)) fri_sales - , sum((CASE WHEN (d_day_name = 'Saturday') THEN sales_price ELSE null END)) sat_sales - FROM - wscs - , date_dim - WHERE (d_date_sk = sold_date_sk) - GROUP BY d_week_seq -) -SELECT - d_week_seq1 -, round((sun_sales1 / sun_sales2), 2) -, round((mon_sales1 / mon_sales2), 2) -, round((tue_sales1 / tue_sales2), 2) -, round((wed_sales1 / wed_sales2), 2) -, round((thu_sales1 / thu_sales2), 2) -, round((fri_sales1 / fri_sales2), 2) -, round((sat_sales1 / sat_sales2), 2) -FROM - ( - SELECT - wswscs.d_week_seq d_week_seq1 - , sun_sales sun_sales1 - , mon_sales mon_sales1 - , tue_sales tue_sales1 - , wed_sales wed_sales1 - , thu_sales thu_sales1 - , fri_sales fri_sales1 - , sat_sales sat_sales1 - FROM - wswscs - , date_dim - WHERE (date_dim.d_week_seq = wswscs.d_week_seq) - AND (d_year = 2001) -) y -, ( - SELECT - wswscs.d_week_seq d_week_seq2 - , sun_sales sun_sales2 - , mon_sales mon_sales2 - , tue_sales tue_sales2 - , wed_sales wed_sales2 - , thu_sales thu_sales2 - , fri_sales fri_sales2 - , sat_sales sat_sales2 - FROM - wswscs - , date_dim - WHERE (date_dim.d_week_seq = wswscs.d_week_seq) - AND (d_year = (2001 + 1)) -) z -WHERE (d_week_seq1 = (d_week_seq2 - 53)) -ORDER BY d_week_seq1 ASC -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q03.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q03.groovy deleted file mode 100644 index 1eb8e702da3551..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q03.groovy +++ /dev/null @@ -1,45 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q03_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q03 """ -SELECT - dt.d_year -, item.i_brand_id brand_id -, item.i_brand brand -, sum(ss_ext_sales_price) sum_agg -FROM - date_dim dt -, store_sales -, item -WHERE (dt.d_date_sk = store_sales.ss_sold_date_sk) - AND (store_sales.ss_item_sk = item.i_item_sk) - AND (item.i_manufact_id = 128) - AND (dt.d_moy = 11) -GROUP BY dt.d_year, item.i_brand, item.i_brand_id -ORDER BY dt.d_year ASC, sum_agg DESC, brand_id ASC -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q04.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q04.groovy deleted file mode 100644 index 47b73e434342c2..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q04.groovy +++ /dev/null @@ -1,122 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q04_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=500; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q04 """ -WITH - year_total AS ( - SELECT - c_customer_id customer_id - , c_first_name customer_first_name - , c_last_name customer_last_name - , c_preferred_cust_flag customer_preferred_cust_flag - , c_birth_country customer_birth_country - , c_login customer_login - , c_email_address customer_email_address - , d_year dyear - , sum(((((ss_ext_list_price - ss_ext_wholesale_cost) - ss_ext_discount_amt) + ss_ext_sales_price) / 2)) year_total - , 's' sale_type - FROM - customer - , store_sales - , date_dim - WHERE (c_customer_sk = ss_customer_sk) - AND (ss_sold_date_sk = d_date_sk) - GROUP BY c_customer_id, c_first_name, c_last_name, c_preferred_cust_flag, c_birth_country, c_login, c_email_address, d_year -UNION ALL SELECT - c_customer_id customer_id - , c_first_name customer_first_name - , c_last_name customer_last_name - , c_preferred_cust_flag customer_preferred_cust_flag - , c_birth_country customer_birth_country - , c_login customer_login - , c_email_address customer_email_address - , d_year dyear - , sum(((((cs_ext_list_price - cs_ext_wholesale_cost) - cs_ext_discount_amt) + cs_ext_sales_price) / 2)) year_total - , 'c' sale_type - FROM - customer - , catalog_sales - , date_dim - WHERE (c_customer_sk = cs_bill_customer_sk) - AND (cs_sold_date_sk = d_date_sk) - GROUP BY c_customer_id, c_first_name, c_last_name, c_preferred_cust_flag, c_birth_country, c_login, c_email_address, d_year -UNION ALL SELECT - c_customer_id customer_id - , c_first_name customer_first_name - , c_last_name customer_last_name - , c_preferred_cust_flag customer_preferred_cust_flag - , c_birth_country customer_birth_country - , c_login customer_login - , c_email_address customer_email_address - , d_year dyear - , sum(((((ws_ext_list_price - ws_ext_wholesale_cost) - ws_ext_discount_amt) + ws_ext_sales_price) / 2)) year_total - , 'w' sale_type - FROM - customer - , web_sales - , date_dim - WHERE (c_customer_sk = ws_bill_customer_sk) - AND (ws_sold_date_sk = d_date_sk) - GROUP BY c_customer_id, c_first_name, c_last_name, c_preferred_cust_flag, c_birth_country, c_login, c_email_address, d_year -) -SELECT - t_s_secyear.customer_id -, t_s_secyear.customer_first_name -, t_s_secyear.customer_last_name -, t_s_secyear.customer_preferred_cust_flag -FROM - year_total t_s_firstyear -, year_total t_s_secyear -, year_total t_c_firstyear -, year_total t_c_secyear -, year_total t_w_firstyear -, year_total t_w_secyear -WHERE (t_s_secyear.customer_id = t_s_firstyear.customer_id) - AND (t_s_firstyear.customer_id = t_c_secyear.customer_id) - AND (t_s_firstyear.customer_id = t_c_firstyear.customer_id) - AND (t_s_firstyear.customer_id = t_w_firstyear.customer_id) - AND (t_s_firstyear.customer_id = t_w_secyear.customer_id) - AND (t_s_firstyear.sale_type = 's') - AND (t_c_firstyear.sale_type = 'c') - AND (t_w_firstyear.sale_type = 'w') - AND (t_s_secyear.sale_type = 's') - AND (t_c_secyear.sale_type = 'c') - AND (t_w_secyear.sale_type = 'w') - AND (t_s_firstyear.dyear = 2001) - AND (t_s_secyear.dyear = (2001 + 1)) - AND (t_c_firstyear.dyear = 2001) - AND (t_c_secyear.dyear = (2001 + 1)) - AND (t_w_firstyear.dyear = 2001) - AND (t_w_secyear.dyear = (2001 + 1)) - AND (t_s_firstyear.year_total > 0) - AND (t_c_firstyear.year_total > 0) - AND (t_w_firstyear.year_total > 0) - AND ((CASE WHEN (t_c_firstyear.year_total > 0) THEN (t_c_secyear.year_total / t_c_firstyear.year_total) ELSE null END) > (CASE WHEN (t_s_firstyear.year_total > 0) THEN (t_s_secyear.year_total / t_s_firstyear.year_total) ELSE null END)) - AND ((CASE WHEN (t_c_firstyear.year_total > 0) THEN (t_c_secyear.year_total / t_c_firstyear.year_total) ELSE null END) > (CASE WHEN (t_w_firstyear.year_total > 0) THEN (t_w_secyear.year_total / t_w_firstyear.year_total) ELSE null END)) -ORDER BY t_s_secyear.customer_id ASC, t_s_secyear.customer_first_name ASC, t_s_secyear.customer_last_name ASC, t_s_secyear.customer_preferred_cust_flag ASC -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q05.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q05.groovy deleted file mode 100644 index 30532794e68d19..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q05.groovy +++ /dev/null @@ -1,173 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q05_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q05 """ -WITH - ssr AS ( - SELECT - s_store_id - , sum(sales_price) sales - , sum(profit) profit - , sum(return_amt) returns - , sum(net_loss) profit_loss - FROM - ( - SELECT - ss_store_sk store_sk - , ss_sold_date_sk date_sk - , ss_ext_sales_price sales_price - , ss_net_profit profit - , CAST(0 AS DECIMAL(7,2)) return_amt - , CAST(0 AS DECIMAL(7,2)) net_loss - FROM - store_sales -UNION ALL SELECT - sr_store_sk store_sk - , sr_returned_date_sk date_sk - , CAST(0 AS DECIMAL(7,2)) sales_price - , CAST(0 AS DECIMAL(7,2)) profit - , sr_return_amt return_amt - , sr_net_loss net_loss - FROM - store_returns - ) salesreturns - , date_dim - , store - WHERE (date_sk = d_date_sk) - AND (d_date BETWEEN CAST('2000-08-23' AS DATE) AND (CAST('2000-08-23' AS DATE) + INTERVAL '14' DAY)) - AND (store_sk = s_store_sk) - GROUP BY s_store_id -) -, csr AS ( - SELECT - cp_catalog_page_id - , sum(sales_price) sales - , sum(profit) profit - , sum(return_amt) returns - , sum(net_loss) profit_loss - FROM - ( - SELECT - cs_catalog_page_sk page_sk - , cs_sold_date_sk date_sk - , cs_ext_sales_price sales_price - , cs_net_profit profit - , CAST(0 AS DECIMAL(7,2)) return_amt - , CAST(0 AS DECIMAL(7,2)) net_loss - FROM - catalog_sales -UNION ALL SELECT - cr_catalog_page_sk page_sk - , cr_returned_date_sk date_sk - , CAST(0 AS DECIMAL(7,2)) sales_price - , CAST(0 AS DECIMAL(7,2)) profit - , cr_return_amount return_amt - , cr_net_loss net_loss - FROM - catalog_returns - ) salesreturns - , date_dim - , catalog_page - WHERE (date_sk = d_date_sk) - AND (d_date BETWEEN CAST('2000-08-23' AS DATE) AND (CAST('2000-08-23' AS DATE) + INTERVAL '14' DAY)) - AND (page_sk = cp_catalog_page_sk) - GROUP BY cp_catalog_page_id -) -, wsr AS ( - SELECT - web_site_id - , sum(sales_price) sales - , sum(profit) profit - , sum(return_amt) returns - , sum(net_loss) profit_loss - FROM - ( - SELECT - ws_web_site_sk wsr_web_site_sk - , ws_sold_date_sk date_sk - , ws_ext_sales_price sales_price - , ws_net_profit profit - , CAST(0 AS DECIMAL(7,2)) return_amt - , CAST(0 AS DECIMAL(7,2)) net_loss - FROM - web_sales -UNION ALL SELECT - ws_web_site_sk wsr_web_site_sk - , wr_returned_date_sk date_sk - , CAST(0 AS DECIMAL(7,2)) sales_price - , CAST(0 AS DECIMAL(7,2)) profit - , wr_return_amt return_amt - , wr_net_loss net_loss - FROM - web_returns - LEFT JOIN web_sales ON (wr_item_sk = ws_item_sk) - AND (wr_order_number = ws_order_number) - ) salesreturns - , date_dim - , web_site - WHERE (date_sk = d_date_sk) - AND (d_date BETWEEN CAST('2000-08-23' AS DATE) AND (CAST('2000-08-23' AS DATE) + INTERVAL '14' DAY)) - AND (wsr_web_site_sk = web_site_sk) - GROUP BY web_site_id -) -SELECT - channel -, id -, sum(sales) sales -, sum(returns) returns -, sum(profit) profit -FROM - ( - SELECT - 'store channel' channel - , concat('store', s_store_id) id - , sales - , returns - , (profit - profit_loss) profit - FROM - ssr -UNION ALL SELECT - 'catalog channel' channel - , concat('catalog_page', cp_catalog_page_id) id - , sales - , returns - , (profit - profit_loss) profit - FROM - csr -UNION ALL SELECT - 'web channel' channel - , concat('web_site', web_site_id) id - , sales - , returns - , (profit - profit_loss) profit - FROM - wsr -) x -GROUP BY ROLLUP (channel, id) -ORDER BY channel ASC, id ASC -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q06.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q06.groovy deleted file mode 100644 index 7dfbeb1941cff4..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q06.groovy +++ /dev/null @@ -1,60 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q06_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q06 """ ---- takes over 30 minutes on travis to complete -SELECT - a.ca_state STATE -, count(*) cnt -FROM - customer_address a -, customer c -, store_sales s -, date_dim d -, item i -WHERE (a.ca_address_sk = c.c_current_addr_sk) - AND (c.c_customer_sk = s.ss_customer_sk) - AND (s.ss_sold_date_sk = d.d_date_sk) - AND (s.ss_item_sk = i.i_item_sk) - AND (d.d_month_seq = ( - SELECT DISTINCT d_month_seq - FROM - date_dim - WHERE (d_year = 2001) - AND (d_moy = 1) - )) - AND (i.i_current_price > (CAST('1.2' AS DECIMAL(2,1)) * ( - SELECT avg(j.i_current_price) - FROM - item j - WHERE (j.i_category = i.i_category) - ))) -GROUP BY a.ca_state -HAVING (count(*) >= 10) -ORDER BY cnt ASC, a.ca_state ASC -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q07.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q07.groovy deleted file mode 100644 index 2b615703d24cb9..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q07.groovy +++ /dev/null @@ -1,54 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q07_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q07 """ -SELECT - i_item_id -, avg(ss_quantity) agg1 -, avg(ss_list_price) agg2 -, avg(ss_coupon_amt) agg3 -, avg(ss_sales_price) agg4 -FROM - store_sales -, customer_demographics -, date_dim -, item -, promotion -WHERE (ss_sold_date_sk = d_date_sk) - AND (ss_item_sk = i_item_sk) - AND (ss_cdemo_sk = cd_demo_sk) - AND (ss_promo_sk = p_promo_sk) - AND (cd_gender = 'M') - AND (cd_marital_status = 'S') - AND (cd_education_status = 'College') - AND ((p_channel_email = 'N') - OR (p_channel_event = 'N')) - AND (d_year = 2000) -GROUP BY i_item_id -ORDER BY i_item_id ASC -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q08.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q08.groovy deleted file mode 100644 index edc8e89851f937..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q08.groovy +++ /dev/null @@ -1,470 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q08_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q08 """ -SELECT - s_store_name -, sum(ss_net_profit) -FROM - store_sales -, date_dim -, store -, ( - SELECT ca_zip - FROM - ( -( - SELECT substr(ca_zip, 1, 5) ca_zip - FROM - customer_address - WHERE (substr(ca_zip, 1, 5) IN ( - '24128' - , '57834' - , '13354' - , '15734' - , '78668' - , '76232' - , '62878' - , '45375' - , '63435' - , '22245' - , '65084' - , '49130' - , '40558' - , '25733' - , '15798' - , '87816' - , '81096' - , '56458' - , '35474' - , '27156' - , '83926' - , '18840' - , '28286' - , '24676' - , '37930' - , '77556' - , '27700' - , '45266' - , '94627' - , '62971' - , '20548' - , '23470' - , '47305' - , '53535' - , '21337' - , '26231' - , '50412' - , '69399' - , '17879' - , '51622' - , '43848' - , '21195' - , '83921' - , '15559' - , '67853' - , '15126' - , '16021' - , '26233' - , '53268' - , '10567' - , '91137' - , '76107' - , '11101' - , '59166' - , '38415' - , '61265' - , '71954' - , '15371' - , '11928' - , '15455' - , '98294' - , '68309' - , '69913' - , '59402' - , '58263' - , '25782' - , '18119' - , '35942' - , '33282' - , '42029' - , '17920' - , '98359' - , '15882' - , '45721' - , '60279' - , '18426' - , '64544' - , '25631' - , '43933' - , '37125' - , '98235' - , '10336' - , '24610' - , '68101' - , '56240' - , '40081' - , '86379' - , '44165' - , '33515' - , '88190' - , '84093' - , '27068' - , '99076' - , '36634' - , '50308' - , '28577' - , '39736' - , '33786' - , '71286' - , '26859' - , '55565' - , '98569' - , '70738' - , '19736' - , '64457' - , '17183' - , '28915' - , '26653' - , '58058' - , '89091' - , '54601' - , '24206' - , '14328' - , '55253' - , '82136' - , '67897' - , '56529' - , '72305' - , '67473' - , '62377' - , '22752' - , '57647' - , '62496' - , '41918' - , '36233' - , '86284' - , '54917' - , '22152' - , '19515' - , '63837' - , '18376' - , '42961' - , '10144' - , '36495' - , '58078' - , '38607' - , '91110' - , '64147' - , '19430' - , '17043' - , '45200' - , '63981' - , '48425' - , '22351' - , '30010' - , '21756' - , '14922' - , '14663' - , '77191' - , '60099' - , '29741' - , '36420' - , '21076' - , '91393' - , '28810' - , '96765' - , '23006' - , '18799' - , '49156' - , '98025' - , '23932' - , '67467' - , '30450' - , '50298' - , '29178' - , '89360' - , '32754' - , '63089' - , '87501' - , '87343' - , '29839' - , '30903' - , '81019' - , '18652' - , '73273' - , '25989' - , '20260' - , '68893' - , '53179' - , '30469' - , '28898' - , '31671' - , '24996' - , '18767' - , '64034' - , '91068' - , '51798' - , '51200' - , '63193' - , '39516' - , '72550' - , '72325' - , '51211' - , '23968' - , '86057' - , '10390' - , '85816' - , '45692' - , '65164' - , '21309' - , '18845' - , '68621' - , '92712' - , '68880' - , '90257' - , '47770' - , '13955' - , '70466' - , '21286' - , '67875' - , '82636' - , '36446' - , '79994' - , '72823' - , '40162' - , '41367' - , '41766' - , '22437' - , '58470' - , '11356' - , '76638' - , '68806' - , '25280' - , '67301' - , '73650' - , '86198' - , '16725' - , '38935' - , '13394' - , '61810' - , '81312' - , '15146' - , '71791' - , '31016' - , '72013' - , '37126' - , '22744' - , '73134' - , '70372' - , '30431' - , '39192' - , '35850' - , '56571' - , '67030' - , '22461' - , '88424' - , '88086' - , '14060' - , '40604' - , '19512' - , '72175' - , '51649' - , '19505' - , '24317' - , '13375' - , '81426' - , '18270' - , '72425' - , '45748' - , '55307' - , '53672' - , '52867' - , '56575' - , '39127' - , '30625' - , '10445' - , '39972' - , '74351' - , '26065' - , '83849' - , '42666' - , '96976' - , '68786' - , '77721' - , '68908' - , '66864' - , '63792' - , '51650' - , '31029' - , '26689' - , '66708' - , '11376' - , '20004' - , '31880' - , '96451' - , '41248' - , '94898' - , '18383' - , '60576' - , '38193' - , '48583' - , '13595' - , '76614' - , '24671' - , '46820' - , '82276' - , '10516' - , '11634' - , '45549' - , '88885' - , '18842' - , '90225' - , '18906' - , '13376' - , '84935' - , '78890' - , '58943' - , '15765' - , '50016' - , '69035' - , '49448' - , '39371' - , '41368' - , '33123' - , '83144' - , '14089' - , '94945' - , '73241' - , '19769' - , '47537' - , '38122' - , '28587' - , '76698' - , '22927' - , '56616' - , '34425' - , '96576' - , '78567' - , '97789' - , '94983' - , '79077' - , '57855' - , '97189' - , '46081' - , '48033' - , '19849' - , '28488' - , '28545' - , '72151' - , '69952' - , '43285' - , '26105' - , '76231' - , '15723' - , '25486' - , '39861' - , '83933' - , '75691' - , '46136' - , '61547' - , '66162' - , '25858' - , '22246' - , '51949' - , '27385' - , '77610' - , '34322' - , '51061' - , '68100' - , '61860' - , '13695' - , '44438' - , '90578' - , '96888' - , '58048' - , '99543' - , '73171' - , '56691' - , '64528' - , '56910' - , '83444' - , '30122' - , '68014' - , '14171' - , '16807' - , '83041' - , '34102' - , '51103' - , '79777' - , '17871' - , '12305' - , '22685' - , '94167' - , '28709' - , '35258' - , '57665' - , '71256' - , '57047' - , '11489' - , '31387' - , '68341' - , '78451' - , '14867' - , '25103' - , '35458' - , '25003' - , '54364' - , '73520' - , '32213' - , '35576')) - ) INTERSECT ( - SELECT ca_zip - FROM - ( - SELECT - substr(ca_zip, 1, 5) ca_zip - , count(*) cnt - FROM - customer_address - , customer - WHERE (ca_address_sk = c_current_addr_sk) - AND (c_preferred_cust_flag = 'Y') - GROUP BY ca_zip - HAVING (count(*) > 10) - ) a1 - ) ) a2 -) v1 -WHERE (ss_store_sk = s_store_sk) - AND (ss_sold_date_sk = d_date_sk) - AND (d_qoy = 2) - AND (d_year = 1998) - AND (substr(s_zip, 1, 2) = substr(v1.ca_zip, 1, 2)) -GROUP BY s_store_name -ORDER BY s_store_name ASC -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q09.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q09.groovy deleted file mode 100644 index fc15a914000f1c..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q09.groovy +++ /dev/null @@ -1,113 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q09_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q09 """ -SELECT - (CASE WHEN (( - SELECT count(*) - FROM - store_sales - WHERE (ss_quantity BETWEEN 1 AND 20) - ) > 74129) THEN ( - SELECT avg(ss_ext_discount_amt) - FROM - store_sales - WHERE (ss_quantity BETWEEN 1 AND 20) -) ELSE ( - SELECT avg(ss_net_paid) - FROM - store_sales - WHERE (ss_quantity BETWEEN 1 AND 20) -) END) bucket1 -, (CASE WHEN (( - SELECT count(*) - FROM - store_sales - WHERE (ss_quantity BETWEEN 21 AND 40) - ) > 122840) THEN ( - SELECT avg(ss_ext_discount_amt) - FROM - store_sales - WHERE (ss_quantity BETWEEN 21 AND 40) -) ELSE ( - SELECT avg(ss_net_paid) - FROM - store_sales - WHERE (ss_quantity BETWEEN 21 AND 40) -) END) bucket2 -, (CASE WHEN (( - SELECT count(*) - FROM - store_sales - WHERE (ss_quantity BETWEEN 41 AND 60) - ) > 56580) THEN ( - SELECT avg(ss_ext_discount_amt) - FROM - store_sales - WHERE (ss_quantity BETWEEN 41 AND 60) -) ELSE ( - SELECT avg(ss_net_paid) - FROM - store_sales - WHERE (ss_quantity BETWEEN 41 AND 60) -) END) bucket3 -, (CASE WHEN (( - SELECT count(*) - FROM - store_sales - WHERE (ss_quantity BETWEEN 61 AND 80) - ) > 10097) THEN ( - SELECT avg(ss_ext_discount_amt) - FROM - store_sales - WHERE (ss_quantity BETWEEN 61 AND 80) -) ELSE ( - SELECT avg(ss_net_paid) - FROM - store_sales - WHERE (ss_quantity BETWEEN 61 AND 80) -) END) bucket4 -, (CASE WHEN (( - SELECT count(*) - FROM - store_sales - WHERE (ss_quantity BETWEEN 81 AND 100) - ) > 165306) THEN ( - SELECT avg(ss_ext_discount_amt) - FROM - store_sales - WHERE (ss_quantity BETWEEN 81 AND 100) -) ELSE ( - SELECT avg(ss_net_paid) - FROM - store_sales - WHERE (ss_quantity BETWEEN 81 AND 100) -) END) bucket5 -FROM - reason -WHERE (r_reason_sk = 1) -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q10.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q10.groovy deleted file mode 100644 index ad2453499b58d4..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q10.groovy +++ /dev/null @@ -1,86 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q10_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ -/* - qt_q10 """ -SELECT - cd_gender -, cd_marital_status -, cd_education_status -, count(*) cnt1 -, cd_purchase_estimate -, count(*) cnt2 -, cd_credit_rating -, count(*) cnt3 -, cd_dep_count -, count(*) cnt4 -, cd_dep_employed_count -, count(*) cnt5 -, cd_dep_college_count -, count(*) cnt6 -FROM - customer c -, customer_address ca -, customer_demographics -WHERE (c.c_current_addr_sk = ca.ca_address_sk) - AND (ca_county IN ('Rush County', 'Toole County', 'Jefferson County', 'Dona Ana County', 'La Porte County')) - AND (cd_demo_sk = c.c_current_cdemo_sk) - AND (EXISTS ( - SELECT * - FROM - store_sales - , date_dim - WHERE (c.c_customer_sk = ss_customer_sk) - AND (ss_sold_date_sk = d_date_sk) - AND (d_year = 2002) - AND (d_moy BETWEEN 1 AND (1 + 3)) -)) - AND ((EXISTS ( - SELECT * - FROM - web_sales - , date_dim - WHERE (c.c_customer_sk = ws_bill_customer_sk) - AND (ws_sold_date_sk = d_date_sk) - AND (d_year = 2002) - AND (d_moy BETWEEN 1 AND (1 + 3)) - )) - OR (EXISTS ( - SELECT * - FROM - catalog_sales - , date_dim - WHERE (c.c_customer_sk = cs_ship_customer_sk) - AND (cs_sold_date_sk = d_date_sk) - AND (d_year = 2002) - AND (d_moy BETWEEN 1 AND (1 + 3)) - ))) -GROUP BY cd_gender, cd_marital_status, cd_education_status, cd_purchase_estimate, cd_credit_rating, cd_dep_count, cd_dep_employed_count, cd_dep_college_count -ORDER BY cd_gender ASC, cd_marital_status ASC, cd_education_status ASC, cd_purchase_estimate ASC, cd_credit_rating ASC, cd_dep_count ASC, cd_dep_employed_count ASC, cd_dep_college_count ASC -LIMIT 100 -""" -*/ -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q11.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q11.groovy deleted file mode 100644 index c2af13e200267b..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q11.groovy +++ /dev/null @@ -1,96 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q11_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=100; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q11 """ -WITH - year_total AS ( - SELECT - c_customer_id customer_id - , c_first_name customer_first_name - , c_last_name customer_last_name - , c_preferred_cust_flag customer_preferred_cust_flag - , c_birth_country customer_birth_country - , c_login customer_login - , c_email_address customer_email_address - , d_year dyear - , sum((ss_ext_list_price - ss_ext_discount_amt)) year_total - , 's' sale_type - FROM - customer - , store_sales - , date_dim - WHERE (c_customer_sk = ss_customer_sk) - AND (ss_sold_date_sk = d_date_sk) - GROUP BY c_customer_id, c_first_name, c_last_name, c_preferred_cust_flag, c_birth_country, c_login, c_email_address, d_year -UNION ALL SELECT - c_customer_id customer_id - , c_first_name customer_first_name - , c_last_name customer_last_name - , c_preferred_cust_flag customer_preferred_cust_flag - , c_birth_country customer_birth_country - , c_login customer_login - , c_email_address customer_email_address - , d_year dyear - , sum((ws_ext_list_price - ws_ext_discount_amt)) year_total - , 'w' sale_type - FROM - customer - , web_sales - , date_dim - WHERE (c_customer_sk = ws_bill_customer_sk) - AND (ws_sold_date_sk = d_date_sk) - GROUP BY c_customer_id, c_first_name, c_last_name, c_preferred_cust_flag, c_birth_country, c_login, c_email_address, d_year -) -SELECT - t_s_secyear.customer_id -, t_s_secyear.customer_first_name -, t_s_secyear.customer_last_name -, t_s_secyear.customer_preferred_cust_flag -, t_s_secyear.customer_birth_country -, t_s_secyear.customer_login -FROM - year_total t_s_firstyear -, year_total t_s_secyear -, year_total t_w_firstyear -, year_total t_w_secyear -WHERE (t_s_secyear.customer_id = t_s_firstyear.customer_id) - AND (t_s_firstyear.customer_id = t_w_secyear.customer_id) - AND (t_s_firstyear.customer_id = t_w_firstyear.customer_id) - AND (t_s_firstyear.sale_type = 's') - AND (t_w_firstyear.sale_type = 'w') - AND (t_s_secyear.sale_type = 's') - AND (t_w_secyear.sale_type = 'w') - AND (t_s_firstyear.dyear = 2001) - AND (t_s_secyear.dyear = (2001 + 1)) - AND (t_w_firstyear.dyear = 2001) - AND (t_w_secyear.dyear = (2001 + 1)) - AND (t_s_firstyear.year_total > 0) - AND (t_w_firstyear.year_total > 0) - AND ((CASE WHEN (t_w_firstyear.year_total > 0) THEN (t_w_secyear.year_total / t_w_firstyear.year_total) ELSE CAST('0.0' AS DECIMAL(2,1)) END) > (CASE WHEN (t_s_firstyear.year_total > 0) THEN (t_s_secyear.year_total / t_s_firstyear.year_total) ELSE CAST('0.0' AS DECIMAL(2,1)) END)) -ORDER BY t_s_secyear.customer_id ASC, t_s_secyear.customer_first_name ASC, t_s_secyear.customer_last_name ASC, t_s_secyear.customer_preferred_cust_flag ASC -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q12.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q12.groovy deleted file mode 100644 index aa1a3d44c81185..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q12.groovy +++ /dev/null @@ -1,48 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q12_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q12 """ -SELECT - i_item_id -, i_item_desc -, i_category -, i_class -, i_current_price -, sum(ws_ext_sales_price) itemrevenue -, ((sum(ws_ext_sales_price) * 100) / sum(sum(ws_ext_sales_price)) OVER (PARTITION BY i_class)) revenueratio -FROM - web_sales -, item -, date_dim -WHERE (ws_item_sk = i_item_sk) - AND (i_category IN ('Sports', 'Books', 'Home')) - AND (ws_sold_date_sk = d_date_sk) - AND (CAST(d_date AS DATE) BETWEEN CAST('1999-02-22' AS DATE) AND (CAST('1999-02-22' AS DATE) + INTERVAL '30' DAY)) -GROUP BY i_item_id, i_item_desc, i_category, i_class, i_current_price -ORDER BY i_category ASC, i_class ASC, i_item_id ASC, i_item_desc ASC, revenueratio ASC -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q13.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q13.groovy deleted file mode 100644 index f5e3f363d08983..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q13.groovy +++ /dev/null @@ -1,74 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q13_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q13 """ -SELECT - avg(ss_quantity) -, avg(ss_ext_sales_price) -, avg(ss_ext_wholesale_cost) -, sum(ss_ext_wholesale_cost) -FROM - store_sales -, store -, customer_demographics -, household_demographics -, customer_address -, date_dim -WHERE (s_store_sk = ss_store_sk) - AND (ss_sold_date_sk = d_date_sk) - AND (d_year = 2001) - AND (((ss_hdemo_sk = hd_demo_sk) - AND (cd_demo_sk = ss_cdemo_sk) - AND (cd_marital_status = 'M') - AND (cd_education_status = 'Advanced Degree') - AND (ss_sales_price BETWEEN CAST('100.00' AS DECIMAL(5,2)) AND CAST('150.00' AS DECIMAL(5,2))) - AND (hd_dep_count = 3)) - OR ((ss_hdemo_sk = hd_demo_sk) - AND (cd_demo_sk = ss_cdemo_sk) - AND (cd_marital_status = 'S') - AND (cd_education_status = 'College') - AND (ss_sales_price BETWEEN CAST('50.00' AS DECIMAL(5,2)) AND CAST('100.00' AS DECIMAL(5,2))) - AND (hd_dep_count = 1)) - OR ((ss_hdemo_sk = hd_demo_sk) - AND (cd_demo_sk = ss_cdemo_sk) - AND (cd_marital_status = 'W') - AND (cd_education_status = '2 yr Degree') - AND (ss_sales_price BETWEEN CAST('150.00' AS DECIMAL(5,2)) AND CAST('200.00' AS DECIMAL(5,2))) - AND (hd_dep_count = 1))) - AND (((ss_addr_sk = ca_address_sk) - AND (ca_country = 'United States') - AND (ca_state IN ('TX' , 'OH' , 'TX')) - AND (ss_net_profit BETWEEN 100 AND 200)) - OR ((ss_addr_sk = ca_address_sk) - AND (ca_country = 'United States') - AND (ca_state IN ('OR' , 'NM' , 'KY')) - AND (ss_net_profit BETWEEN 150 AND 300)) - OR ((ss_addr_sk = ca_address_sk) - AND (ca_country = 'United States') - AND (ca_state IN ('VA' , 'TX' , 'MS')) - AND (ss_net_profit BETWEEN 50 AND 250))) -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q14_1.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q14_1.groovy deleted file mode 100644 index 222773d9cf9133..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q14_1.groovy +++ /dev/null @@ -1,194 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q14_1_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q14_1 """ -WITH - cross_items AS ( - SELECT i_item_sk ss_item_sk - FROM - item - , ( - SELECT - iss.i_brand_id brand_id - , iss.i_class_id class_id - , iss.i_category_id category_id - FROM - store_sales - , item iss - , date_dim d1 - WHERE (ss_item_sk = iss.i_item_sk) - AND (ss_sold_date_sk = d1.d_date_sk) - AND (d1.d_year BETWEEN 1999 AND (1999 + 2)) -INTERSECT SELECT - ics.i_brand_id - , ics.i_class_id - , ics.i_category_id - FROM - catalog_sales - , item ics - , date_dim d2 - WHERE (cs_item_sk = ics.i_item_sk) - AND (cs_sold_date_sk = d2.d_date_sk) - AND (d2.d_year BETWEEN 1999 AND (1999 + 2)) -INTERSECT SELECT - iws.i_brand_id - , iws.i_class_id - , iws.i_category_id - FROM - web_sales - , item iws - , date_dim d3 - WHERE (ws_item_sk = iws.i_item_sk) - AND (ws_sold_date_sk = d3.d_date_sk) - AND (d3.d_year BETWEEN 1999 AND (1999 + 2)) - ) y - WHERE (i_brand_id = brand_id) - AND (i_class_id = class_id) - AND (i_category_id = category_id) -) -, avg_sales AS ( - SELECT avg((quantity * list_price)) average_sales - FROM - ( - SELECT - ss_quantity quantity - , ss_list_price list_price - FROM - store_sales - , date_dim - WHERE (ss_sold_date_sk = d_date_sk) - AND (d_year BETWEEN 1999 AND (1999 + 2)) -UNION ALL SELECT - cs_quantity quantity - , cs_list_price list_price - FROM - catalog_sales - , date_dim - WHERE (cs_sold_date_sk = d_date_sk) - AND (d_year BETWEEN 1999 AND (1999 + 2)) -UNION ALL SELECT - ws_quantity quantity - , ws_list_price list_price - FROM - web_sales - , date_dim - WHERE (ws_sold_date_sk = d_date_sk) - AND (d_year BETWEEN 1999 AND (1999 + 2)) - ) x -) -SELECT - channel -, i_brand_id -, i_class_id -, i_category_id -, sum(sales) -, sum(number_sales) -FROM - ( - SELECT - 'store' channel - , i_brand_id - , i_class_id - , i_category_id - , sum((ss_quantity * ss_list_price)) sales - , count(*) number_sales - FROM - store_sales - , item - , date_dim - WHERE (ss_item_sk IN ( - SELECT ss_item_sk - FROM - cross_items - )) - AND (ss_item_sk = i_item_sk) - AND (ss_sold_date_sk = d_date_sk) - AND (d_year = (1999 + 2)) - AND (d_moy = 11) - GROUP BY i_brand_id, i_class_id, i_category_id - HAVING (sum((ss_quantity * ss_list_price)) > ( - SELECT average_sales - FROM - avg_sales - )) -UNION ALL SELECT - 'catalog' channel - , i_brand_id - , i_class_id - , i_category_id - , sum((cs_quantity * cs_list_price)) sales - , count(*) number_sales - FROM - catalog_sales - , item - , date_dim - WHERE (cs_item_sk IN ( - SELECT ss_item_sk - FROM - cross_items - )) - AND (cs_item_sk = i_item_sk) - AND (cs_sold_date_sk = d_date_sk) - AND (d_year = (1999 + 2)) - AND (d_moy = 11) - GROUP BY i_brand_id, i_class_id, i_category_id - HAVING (sum((cs_quantity * cs_list_price)) > ( - SELECT average_sales - FROM - avg_sales - )) -UNION ALL SELECT - 'web' channel - , i_brand_id - , i_class_id - , i_category_id - , sum((ws_quantity * ws_list_price)) sales - , count(*) number_sales - FROM - web_sales - , item - , date_dim - WHERE (ws_item_sk IN ( - SELECT ss_item_sk - FROM - cross_items - )) - AND (ws_item_sk = i_item_sk) - AND (ws_sold_date_sk = d_date_sk) - AND (d_year = (1999 + 2)) - AND (d_moy = 11) - GROUP BY i_brand_id, i_class_id, i_category_id - HAVING (sum((ws_quantity * ws_list_price)) > ( - SELECT average_sales - FROM - avg_sales - )) -) y -GROUP BY ROLLUP (channel, i_brand_id, i_class_id, i_category_id) -ORDER BY channel ASC, i_brand_id ASC, i_class_id ASC, i_category_id ASC -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q14_2.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q14_2.groovy deleted file mode 100644 index f3cae690200ecf..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q14_2.groovy +++ /dev/null @@ -1,178 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q14_2_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q14_2 """ -WITH - cross_items AS ( - SELECT i_item_sk ss_item_sk - FROM - item - , ( - SELECT - iss.i_brand_id brand_id - , iss.i_class_id class_id - , iss.i_category_id category_id - FROM - store_sales - , item iss - , date_dim d1 - WHERE (ss_item_sk = iss.i_item_sk) - AND (ss_sold_date_sk = d1.d_date_sk) - AND (d1.d_year BETWEEN 1999 AND (1999 + 2)) -INTERSECT SELECT - ics.i_brand_id - , ics.i_class_id - , ics.i_category_id - FROM - catalog_sales - , item ics - , date_dim d2 - WHERE (cs_item_sk = ics.i_item_sk) - AND (cs_sold_date_sk = d2.d_date_sk) - AND (d2.d_year BETWEEN 1999 AND (1999 + 2)) -INTERSECT SELECT - iws.i_brand_id - , iws.i_class_id - , iws.i_category_id - FROM - web_sales - , item iws - , date_dim d3 - WHERE (ws_item_sk = iws.i_item_sk) - AND (ws_sold_date_sk = d3.d_date_sk) - AND (d3.d_year BETWEEN 1999 AND (1999 + 2)) - ) x - WHERE (i_brand_id = brand_id) - AND (i_class_id = class_id) - AND (i_category_id = category_id) -) -, avg_sales AS ( - SELECT avg((quantity * list_price)) average_sales - FROM - ( - SELECT - ss_quantity quantity - , ss_list_price list_price - FROM - store_sales - , date_dim - WHERE (ss_sold_date_sk = d_date_sk) - AND (d_year BETWEEN 1999 AND (1999 + 2)) -UNION ALL SELECT - cs_quantity quantity - , cs_list_price list_price - FROM - catalog_sales - , date_dim - WHERE (cs_sold_date_sk = d_date_sk) - AND (d_year BETWEEN 1999 AND (1999 + 2)) -UNION ALL SELECT - ws_quantity quantity - , ws_list_price list_price - FROM - web_sales - , date_dim - WHERE (ws_sold_date_sk = d_date_sk) - AND (d_year BETWEEN 1999 AND (1999 + 2)) - ) y -) -SELECT * -FROM - ( - SELECT - 'store' channel - , i_brand_id - , i_class_id - , i_category_id - , sum((ss_quantity * ss_list_price)) sales - , count(*) number_sales - FROM - store_sales - , item - , date_dim - WHERE (ss_item_sk IN ( - SELECT ss_item_sk - FROM - cross_items - )) - AND (ss_item_sk = i_item_sk) - AND (ss_sold_date_sk = d_date_sk) - AND (d_week_seq = ( - SELECT d_week_seq - FROM - date_dim - WHERE (d_year = (1999 + 1)) - AND (d_moy = 12) - AND (d_dom = 11) - )) - GROUP BY i_brand_id, i_class_id, i_category_id - HAVING (sum((ss_quantity * ss_list_price)) > ( - SELECT average_sales - FROM - avg_sales - )) -) this_year -, ( - SELECT - 'store' channel - , i_brand_id - , i_class_id - , i_category_id - , sum((ss_quantity * ss_list_price)) sales - , count(*) number_sales - FROM - store_sales - , item - , date_dim - WHERE (ss_item_sk IN ( - SELECT ss_item_sk - FROM - cross_items - )) - AND (ss_item_sk = i_item_sk) - AND (ss_sold_date_sk = d_date_sk) - AND (d_week_seq = ( - SELECT d_week_seq - FROM - date_dim - WHERE (d_year = 1999) - AND (d_moy = 12) - AND (d_dom = 11) - )) - GROUP BY i_brand_id, i_class_id, i_category_id - HAVING (sum((ss_quantity * ss_list_price)) > ( - SELECT average_sales - FROM - avg_sales - )) -) last_year -WHERE (this_year.i_brand_id = last_year.i_brand_id) - AND (this_year.i_class_id = last_year.i_class_id) - AND (this_year.i_category_id = last_year.i_category_id) -ORDER BY this_year.channel ASC, this_year.i_brand_id ASC, this_year.i_class_id ASC, this_year.i_category_id ASC -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q15.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q15.groovy deleted file mode 100644 index a7c57e15f1fcbf..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q15.groovy +++ /dev/null @@ -1,48 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q15_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q15 """ -SELECT - ca_zip -, sum(cs_sales_price) -FROM - catalog_sales -, customer -, customer_address -, date_dim -WHERE (cs_bill_customer_sk = c_customer_sk) - AND (c_current_addr_sk = ca_address_sk) - AND ((substr(ca_zip, 1, 5) IN ('85669' , '86197' , '88274' , '83405' , '86475' , '85392' , '85460' , '80348' , '81792')) - OR (ca_state IN ('CA' , 'WA' , 'GA')) - OR (cs_sales_price > 500)) - AND (cs_sold_date_sk = d_date_sk) - AND (d_qoy = 2) - AND (d_year = 2001) -GROUP BY ca_zip -ORDER BY ca_zip ASC -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q16.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q16.groovy deleted file mode 100644 index 868ccdcea334b5..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q16.groovy +++ /dev/null @@ -1,59 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q16_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q16 """ -SELECT - count(DISTINCT cs_order_number) 'order count' -, sum(cs_ext_ship_cost) 'total shipping cost' -, sum(cs_net_profit) 'total net profit' -FROM - catalog_sales cs1 -, date_dim -, customer_address -, call_center -WHERE (d_date BETWEEN CAST('2002-2-01' AS DATE) AND (CAST('2002-2-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 = 'GA') - 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) ASC -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q17.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q17.groovy deleted file mode 100644 index 91bb1011474a06..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q17.groovy +++ /dev/null @@ -1,70 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q17_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q17 """ -SELECT - i_item_id -, i_item_desc -, s_state -, count(ss_quantity) store_sales_quantitycount -, avg(ss_quantity) store_sales_quantityave -, stddev_samp(ss_quantity) store_sales_quantitystdev -, (stddev_samp(ss_quantity) / avg(ss_quantity)) store_sales_quantitycov -, count(sr_return_quantity) store_returns_quantitycount -, avg(sr_return_quantity) store_returns_quantityave -, stddev_samp(sr_return_quantity) store_returns_quantitystdev -, (stddev_samp(sr_return_quantity) / avg(sr_return_quantity)) store_returns_quantitycov -, count(cs_quantity) catalog_sales_quantitycount -, avg(cs_quantity) catalog_sales_quantityave -, stddev_samp(cs_quantity) catalog_sales_quantitystdev -, (stddev_samp(cs_quantity) / avg(cs_quantity)) catalog_sales_quantitycov -FROM - store_sales -, store_returns -, catalog_sales -, date_dim d1 -, date_dim d2 -, date_dim d3 -, store -, item -WHERE (d1.d_quarter_name = '2001Q1') - AND (d1.d_date_sk = ss_sold_date_sk) - AND (i_item_sk = ss_item_sk) - AND (s_store_sk = ss_store_sk) - AND (ss_customer_sk = sr_customer_sk) - AND (ss_item_sk = sr_item_sk) - AND (ss_ticket_number = sr_ticket_number) - AND (sr_returned_date_sk = d2.d_date_sk) - AND (d2.d_quarter_name IN ('2001Q1', '2001Q2', '2001Q3')) - AND (sr_customer_sk = cs_bill_customer_sk) - AND (sr_item_sk = cs_item_sk) - AND (cs_sold_date_sk = d3.d_date_sk) - AND (d3.d_quarter_name IN ('2001Q1', '2001Q2', '2001Q3')) -GROUP BY i_item_id, i_item_desc, s_state -ORDER BY i_item_id ASC, i_item_desc ASC, s_state ASC -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q18.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q18.groovy deleted file mode 100644 index d9b562cc4f1f0a..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q18.groovy +++ /dev/null @@ -1,63 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q18_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q18 """ -SELECT - i_item_id -, ca_country -, ca_state -, ca_county -, avg(CAST(cs_quantity AS DECIMAL(12,2))) agg1 -, avg(CAST(cs_list_price AS DECIMAL(12,2))) agg2 -, avg(CAST(cs_coupon_amt AS DECIMAL(12,2))) agg3 -, avg(CAST(cs_sales_price AS DECIMAL(12,2))) agg4 -, avg(CAST(cs_net_profit AS DECIMAL(12,2))) agg5 -, avg(CAST(c_birth_year AS DECIMAL(12,2))) agg6 -, avg(CAST(cd1.cd_dep_count AS DECIMAL(12,2))) agg7 -FROM - catalog_sales -, customer_demographics cd1 -, customer_demographics cd2 -, customer -, customer_address -, date_dim -, item -WHERE (cs_sold_date_sk = d_date_sk) - AND (cs_item_sk = i_item_sk) - AND (cs_bill_cdemo_sk = cd1.cd_demo_sk) - AND (cs_bill_customer_sk = c_customer_sk) - AND (cd1.cd_gender = 'F') - AND (cd1.cd_education_status = 'Unknown') - AND (c_current_cdemo_sk = cd2.cd_demo_sk) - AND (c_current_addr_sk = ca_address_sk) - AND (c_birth_month IN (1, 6, 8, 9, 12, 2)) - AND (d_year = 1998) - AND (ca_state IN ('MS', 'IN', 'ND', 'OK', 'NM', 'VA', 'MS')) -GROUP BY ROLLUP (i_item_id, ca_country, ca_state, ca_county) -ORDER BY ca_country ASC, ca_state ASC, ca_county ASC, i_item_id ASC -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q19.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q19.groovy deleted file mode 100644 index 6667110fe9f8d1..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q19.groovy +++ /dev/null @@ -1,54 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q19_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q19 """ -SELECT - i_brand_id brand_id -, i_brand brand -, i_manufact_id -, i_manufact -, sum(ss_ext_sales_price) ext_price -FROM - date_dim -, store_sales -, item -, customer -, customer_address -, store -WHERE (d_date_sk = ss_sold_date_sk) - AND (ss_item_sk = i_item_sk) - AND (i_manager_id = 8) - AND (d_moy = 11) - AND (d_year = 1998) - AND (ss_customer_sk = c_customer_sk) - AND (c_current_addr_sk = ca_address_sk) - AND (substr(ca_zip, 1, 5) <> substr(s_zip, 1, 5)) - AND (ss_store_sk = s_store_sk) -GROUP BY i_brand, i_brand_id, i_manufact_id, i_manufact -ORDER BY ext_price DESC, i_brand ASC, i_brand_id ASC, i_manufact_id ASC, i_manufact ASC -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q20.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q20.groovy deleted file mode 100644 index 96c978d2a05798..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q20.groovy +++ /dev/null @@ -1,48 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q20_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q20 """ -SELECT - i_item_id -, i_item_desc -, i_category -, i_class -, i_current_price -, sum(cs_ext_sales_price) itemrevenue -, ((sum(cs_ext_sales_price) * 100) / sum(sum(cs_ext_sales_price)) OVER (PARTITION BY i_class)) revenueratio -FROM - catalog_sales -, item -, date_dim -WHERE (cs_item_sk = i_item_sk) - AND (i_category IN ('Sports', 'Books', 'Home')) - AND (cs_sold_date_sk = d_date_sk) - AND (CAST(d_date AS DATE) BETWEEN CAST('1999-02-22' AS DATE) AND (CAST('1999-02-22' AS DATE) + INTERVAL '30' DAY)) -GROUP BY i_item_id, i_item_desc, i_category, i_class, i_current_price -ORDER BY i_category ASC, i_class ASC, i_item_id ASC, i_item_desc ASC, revenueratio ASC -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q21.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q21.groovy deleted file mode 100644 index 78634b748dd17d..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q21.groovy +++ /dev/null @@ -1,52 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q21_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q21 """ -SELECT * -FROM - ( - SELECT - w_warehouse_name - , i_item_id - , sum((CASE WHEN (CAST(d_date AS DATE) < CAST('2000-03-11' AS DATE)) THEN inv_quantity_on_hand ELSE 0 END)) inv_before - , sum((CASE WHEN (CAST(d_date AS DATE) >= CAST('2000-03-11' AS DATE)) THEN inv_quantity_on_hand ELSE 0 END)) inv_after - FROM - inventory - , warehouse - , item - , date_dim - WHERE (i_current_price BETWEEN CAST('0.99' AS DECIMAL(3,2)) AND CAST('1.49' AS DECIMAL(3,2))) - AND (i_item_sk = inv_item_sk) - AND (inv_warehouse_sk = w_warehouse_sk) - AND (inv_date_sk = d_date_sk) - AND (d_date BETWEEN (CAST('2000-03-11' AS DATE) - INTERVAL '30' DAY) AND (CAST('2000-03-11' AS DATE) + INTERVAL '30' DAY)) - GROUP BY w_warehouse_name, i_item_id -) x -WHERE ((CASE WHEN (inv_before > 0) THEN (CAST(inv_after AS DECIMAL(7,2)) / inv_before) ELSE null END) BETWEEN (CAST('2.00' AS DECIMAL(3,2)) / CAST('3.00' AS DECIMAL(3,2))) AND (CAST('3.00' AS DECIMAL(3,2)) / CAST('2.00' AS DECIMAL(3,2)))) -ORDER BY w_warehouse_name ASC, i_item_id ASC -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q22.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q22.groovy deleted file mode 100644 index 5badf3dfed6da4..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q22.groovy +++ /dev/null @@ -1,45 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q22_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q22 """ -SELECT - i_product_name -, i_brand -, i_class -, i_category -, avg(inv_quantity_on_hand) qoh -FROM - inventory -, date_dim -, item -WHERE (inv_date_sk = d_date_sk) - AND (inv_item_sk = i_item_sk) - AND (d_month_seq BETWEEN 1200 AND (1200 + 11)) -GROUP BY ROLLUP (i_product_name, i_brand, i_class, i_category) -ORDER BY qoh ASC, i_product_name ASC, i_brand ASC, i_class ASC, i_category ASC -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q23_1.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q23_1.groovy deleted file mode 100644 index bfaf1b022ab8ff..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q23_1.groovy +++ /dev/null @@ -1,117 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q23_1_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q23_1 """ -WITH - frequent_ss_items AS ( - SELECT - substr(i_item_desc, 1, 30) itemdesc - , i_item_sk item_sk - , d_date solddate - , count(*) cnt - FROM - store_sales - , date_dim - , item - WHERE (ss_sold_date_sk = d_date_sk) - AND (ss_item_sk = i_item_sk) - AND (d_year IN (2000 , (2000 + 1) , (2000 + 2) , (2000 + 3))) - GROUP BY substr(i_item_desc, 1, 30), i_item_sk, d_date - HAVING (count(*) > 4) -) -, max_store_sales AS ( - SELECT max(csales) tpcds_cmax - FROM - ( - SELECT - c_customer_sk - , sum((ss_quantity * ss_sales_price)) csales - FROM - store_sales - , customer - , date_dim - WHERE (ss_customer_sk = c_customer_sk) - AND (ss_sold_date_sk = d_date_sk) - AND (d_year IN (2000 , (2000 + 1) , (2000 + 2) , (2000 + 3))) - GROUP BY c_customer_sk - ) x -) -, best_ss_customer AS ( - SELECT - c_customer_sk - , sum((ss_quantity * ss_sales_price)) ssales - FROM - store_sales - , customer - WHERE (ss_customer_sk = c_customer_sk) - GROUP BY c_customer_sk - HAVING (sum((ss_quantity * ss_sales_price)) > ((50 / CAST('100.0' AS DECIMAL(5,1))) * ( - SELECT * - FROM - max_store_sales - ))) -) -SELECT sum(sales) -FROM - ( - SELECT (cs_quantity * cs_list_price) sales - FROM - catalog_sales - , date_dim - WHERE (d_year = 2000) - AND (d_moy = 2) - AND (cs_sold_date_sk = d_date_sk) - AND (cs_item_sk IN ( - SELECT item_sk - FROM - frequent_ss_items - )) - AND (cs_bill_customer_sk IN ( - SELECT c_customer_sk - FROM - best_ss_customer - )) -UNION ALL SELECT (ws_quantity * ws_list_price) sales - FROM - web_sales - , date_dim - WHERE (d_year = 2000) - AND (d_moy = 2) - AND (ws_sold_date_sk = d_date_sk) - AND (ws_item_sk IN ( - SELECT item_sk - FROM - frequent_ss_items - )) - AND (ws_bill_customer_sk IN ( - SELECT c_customer_sk - FROM - best_ss_customer - )) -) y -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q23_2.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q23_2.groovy deleted file mode 100644 index 39056dd258d043..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q23_2.groovy +++ /dev/null @@ -1,133 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q23_2_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q23_2 """ -WITH - frequent_ss_items AS ( - SELECT - substr(i_item_desc, 1, 30) itemdesc - , i_item_sk item_sk - , d_date solddate - , count(*) cnt - FROM - store_sales - , date_dim - , item - WHERE (ss_sold_date_sk = d_date_sk) - AND (ss_item_sk = i_item_sk) - AND (d_year IN (2000 , (2000 + 1) , (2000 + 2) , (2000 + 3))) - GROUP BY substr(i_item_desc, 1, 30), i_item_sk, d_date - HAVING (count(*) > 4) -) -, max_store_sales AS ( - SELECT max(csales) tpcds_cmax - FROM - ( - SELECT - c_customer_sk - , sum((ss_quantity * ss_sales_price)) csales - FROM - store_sales - , customer - , date_dim - WHERE (ss_customer_sk = c_customer_sk) - AND (ss_sold_date_sk = d_date_sk) - AND (d_year IN (2000 , (2000 + 1) , (2000 + 2) , (2000 + 3))) - GROUP BY c_customer_sk - ) x -) -, best_ss_customer AS ( - SELECT - c_customer_sk - , sum((ss_quantity * ss_sales_price)) ssales - FROM - store_sales - , customer - WHERE (ss_customer_sk = c_customer_sk) - GROUP BY c_customer_sk - HAVING (sum((ss_quantity * ss_sales_price)) > ((50 / CAST('100.0' AS DECIMAL(5,1))) * ( - SELECT * - FROM - max_store_sales - ))) -) -SELECT - c_last_name -, c_first_name -, sales -FROM - ( - SELECT - c_last_name - , c_first_name - , sum((cs_quantity * cs_list_price)) sales - FROM - catalog_sales - , customer - , date_dim - WHERE (d_year = 2000) - AND (d_moy = 2) - AND (cs_sold_date_sk = d_date_sk) - AND (cs_item_sk IN ( - SELECT item_sk - FROM - frequent_ss_items - )) - AND (cs_bill_customer_sk IN ( - SELECT c_customer_sk - FROM - best_ss_customer - )) - AND (cs_bill_customer_sk = c_customer_sk) - GROUP BY c_last_name, c_first_name -UNION ALL SELECT - c_last_name - , c_first_name - , sum((ws_quantity * ws_list_price)) sales - FROM - web_sales - , customer - , date_dim - WHERE (d_year = 2000) - AND (d_moy = 2) - AND (ws_sold_date_sk = d_date_sk) - AND (ws_item_sk IN ( - SELECT item_sk - FROM - frequent_ss_items - )) - AND (ws_bill_customer_sk IN ( - SELECT c_customer_sk - FROM - best_ss_customer - )) - AND (ws_bill_customer_sk = c_customer_sk) - GROUP BY c_last_name, c_first_name -) z -ORDER BY c_last_name ASC, c_first_name ASC, sales ASC -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q24_1.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q24_1.groovy deleted file mode 100644 index 1c3df66e9df461..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q24_1.groovy +++ /dev/null @@ -1,75 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q24_1_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=100; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q24_1 """ -WITH - ssales AS ( - SELECT - c_last_name - , c_first_name - , s_store_name - , ca_state - , s_state - , i_color - , i_current_price - , i_manager_id - , i_units - , i_size - , sum(ss_net_paid) netpaid - 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_birth_country = upper(ca_country)) - AND (s_zip = ca_zip) - AND (s_market_id = 8) - GROUP BY c_last_name, c_first_name, s_store_name, ca_state, s_state, i_color, i_current_price, i_manager_id, i_units, i_size -) -SELECT - c_last_name -, c_first_name -, s_store_name -, sum(netpaid) paid -FROM - ssales -WHERE (i_color = 'pale') -GROUP BY c_last_name, c_first_name, s_store_name -HAVING (sum(netpaid) > ( - SELECT (CAST('0.05' AS DECIMAL(5,2)) * avg(netpaid)) - FROM - ssales - )) -ORDER BY c_last_name, c_first_name, s_store_name -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q24_2.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q24_2.groovy deleted file mode 100644 index ee4e3407e9f3ee..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q24_2.groovy +++ /dev/null @@ -1,75 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q24_2_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=500; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q24_2 """ -WITH - ssales AS ( - SELECT - c_last_name - , c_first_name - , s_store_name - , ca_state - , s_state - , i_color - , i_current_price - , i_manager_id - , i_units - , i_size - , sum(ss_net_paid) netpaid - 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_birth_country = upper(ca_country)) - AND (s_zip = ca_zip) - AND (s_market_id = 8) - GROUP BY c_last_name, c_first_name, s_store_name, ca_state, s_state, i_color, i_current_price, i_manager_id, i_units, i_size -) -SELECT - c_last_name -, c_first_name -, s_store_name -, sum(netpaid) paid -FROM - ssales -WHERE (i_color = 'chiffon') -GROUP BY c_last_name, c_first_name, s_store_name -HAVING (sum(netpaid) > ( - SELECT (CAST('0.05' AS DECIMAL(5,2)) * avg(netpaid)) - FROM - ssales - )) -ORDER BY c_last_name, c_first_name, s_store_name -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q25.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q25.groovy deleted file mode 100644 index a5f28fd4d54a4b..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q25.groovy +++ /dev/null @@ -1,65 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q25_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q25 """ -SELECT - i_item_id -, i_item_desc -, s_store_id -, s_store_name -, sum(ss_net_profit) store_sales_profit -, sum(sr_net_loss) store_returns_loss -, sum(cs_net_profit) catalog_sales_profit -FROM - store_sales -, store_returns -, catalog_sales -, date_dim d1 -, date_dim d2 -, date_dim d3 -, store -, item -WHERE (d1.d_moy = 4) - AND (d1.d_year = 2001) - AND (d1.d_date_sk = ss_sold_date_sk) - AND (i_item_sk = ss_item_sk) - AND (s_store_sk = ss_store_sk) - AND (ss_customer_sk = sr_customer_sk) - AND (ss_item_sk = sr_item_sk) - AND (ss_ticket_number = sr_ticket_number) - AND (sr_returned_date_sk = d2.d_date_sk) - AND (d2.d_moy BETWEEN 4 AND 10) - AND (d2.d_year = 2001) - AND (sr_customer_sk = cs_bill_customer_sk) - AND (sr_item_sk = cs_item_sk) - AND (cs_sold_date_sk = d3.d_date_sk) - AND (d3.d_moy BETWEEN 4 AND 10) - AND (d3.d_year = 2001) -GROUP BY i_item_id, i_item_desc, s_store_id, s_store_name -ORDER BY i_item_id ASC, i_item_desc ASC, s_store_id ASC, s_store_name ASC -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q26.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q26.groovy deleted file mode 100644 index 7ba39f7341075c..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q26.groovy +++ /dev/null @@ -1,54 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q26_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q26 """ -SELECT - i_item_id -, avg(cs_quantity) agg1 -, avg(cs_list_price) agg2 -, avg(cs_coupon_amt) agg3 -, avg(cs_sales_price) agg4 -FROM - catalog_sales -, customer_demographics -, date_dim -, item -, promotion -WHERE (cs_sold_date_sk = d_date_sk) - AND (cs_item_sk = i_item_sk) - AND (cs_bill_cdemo_sk = cd_demo_sk) - AND (cs_promo_sk = p_promo_sk) - AND (cd_gender = 'M') - AND (cd_marital_status = 'S') - AND (cd_education_status = 'College') - AND ((p_channel_email = 'N') - OR (p_channel_event = 'N')) - AND (d_year = 2000) -GROUP BY i_item_id -ORDER BY i_item_id ASC -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q27.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q27.groovy deleted file mode 100644 index fb0479f83bd211..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q27.groovy +++ /dev/null @@ -1,61 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q27_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q27 """ -SELECT - i_item_id -, s_state -, GROUPING (s_state) g_state -, avg(ss_quantity) agg1 -, avg(ss_list_price) agg2 -, avg(ss_coupon_amt) agg3 -, avg(ss_sales_price) agg4 -FROM - store_sales -, customer_demographics -, date_dim -, store -, item -WHERE (ss_sold_date_sk = d_date_sk) - AND (ss_item_sk = i_item_sk) - AND (ss_store_sk = s_store_sk) - AND (ss_cdemo_sk = cd_demo_sk) - AND (cd_gender = 'M') - AND (cd_marital_status = 'S') - AND (cd_education_status = 'College') - AND (d_year = 2002) - AND (s_state IN ( - 'TN' - , 'TN' - , 'TN' - , 'TN' - , 'TN' - , 'TN')) -GROUP BY ROLLUP (i_item_id, s_state) -ORDER BY i_item_id ASC, s_state ASC -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q28.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q28.groovy deleted file mode 100644 index 75299e9f875a73..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q28.groovy +++ /dev/null @@ -1,104 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q28_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q28 """ -SELECT * -FROM - ( - SELECT - avg(ss_list_price) b1_lp - , count(ss_list_price) b1_cnt - , count(DISTINCT ss_list_price) b1_cntd - FROM - store_sales - WHERE (ss_quantity BETWEEN 0 AND 5) - AND ((ss_list_price BETWEEN 8 AND (8 + 10)) - OR (ss_coupon_amt BETWEEN 459 AND (459 + 1000)) - OR (ss_wholesale_cost BETWEEN 57 AND (57 + 20))) -) b1 -, ( - SELECT - avg(ss_list_price) b2_lp - , count(ss_list_price) b2_cnt - , count(DISTINCT ss_list_price) b2_cntd - FROM - store_sales - WHERE (ss_quantity BETWEEN 6 AND 10) - AND ((ss_list_price BETWEEN 90 AND (90 + 10)) - OR (ss_coupon_amt BETWEEN 2323 AND (2323 + 1000)) - OR (ss_wholesale_cost BETWEEN 31 AND (31 + 20))) -) b2 -, ( - SELECT - avg(ss_list_price) b3_lp - , count(ss_list_price) b3_cnt - , count(DISTINCT ss_list_price) b3_cntd - FROM - store_sales - WHERE (ss_quantity BETWEEN 11 AND 15) - AND ((ss_list_price BETWEEN 142 AND (142 + 10)) - OR (ss_coupon_amt BETWEEN 12214 AND (12214 + 1000)) - OR (ss_wholesale_cost BETWEEN 79 AND (79 + 20))) -) b3 -, ( - SELECT - avg(ss_list_price) b4_lp - , count(ss_list_price) b4_cnt - , count(DISTINCT ss_list_price) b4_cntd - FROM - store_sales - WHERE (ss_quantity BETWEEN 16 AND 20) - AND ((ss_list_price BETWEEN 135 AND (135 + 10)) - OR (ss_coupon_amt BETWEEN 6071 AND (6071 + 1000)) - OR (ss_wholesale_cost BETWEEN 38 AND (38 + 20))) -) b4 -, ( - SELECT - avg(ss_list_price) b5_lp - , count(ss_list_price) b5_cnt - , count(DISTINCT ss_list_price) b5_cntd - FROM - store_sales - WHERE (ss_quantity BETWEEN 21 AND 25) - AND ((ss_list_price BETWEEN 122 AND (122 + 10)) - OR (ss_coupon_amt BETWEEN 836 AND (836 + 1000)) - OR (ss_wholesale_cost BETWEEN 17 AND (17 + 20))) -) b5 -, ( - SELECT - avg(ss_list_price) b6_lp - , count(ss_list_price) b6_cnt - , count(DISTINCT ss_list_price) b6_cntd - FROM - store_sales - WHERE (ss_quantity BETWEEN 26 AND 30) - AND ((ss_list_price BETWEEN 154 AND (154 + 10)) - OR (ss_coupon_amt BETWEEN 7326 AND (7326 + 1000)) - OR (ss_wholesale_cost BETWEEN 7 AND (7 + 20))) -) b6 -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q29.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q29.groovy deleted file mode 100644 index afb9e0b3206ed9..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q29.groovy +++ /dev/null @@ -1,64 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q29_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q29 """ -SELECT - i_item_id -, i_item_desc -, s_store_id -, s_store_name -, sum(ss_quantity) store_sales_quantity -, sum(sr_return_quantity) store_returns_quantity -, sum(cs_quantity) catalog_sales_quantity -FROM - store_sales -, store_returns -, catalog_sales -, date_dim d1 -, date_dim d2 -, date_dim d3 -, store -, item -WHERE (d1.d_moy = 9) - AND (d1.d_year = 1999) - AND (d1.d_date_sk = ss_sold_date_sk) - AND (i_item_sk = ss_item_sk) - AND (s_store_sk = ss_store_sk) - AND (ss_customer_sk = sr_customer_sk) - AND (ss_item_sk = sr_item_sk) - AND (ss_ticket_number = sr_ticket_number) - AND (sr_returned_date_sk = d2.d_date_sk) - AND (d2.d_moy BETWEEN 9 AND (9 + 3)) - AND (d2.d_year = 1999) - AND (sr_customer_sk = cs_bill_customer_sk) - AND (sr_item_sk = cs_item_sk) - AND (cs_sold_date_sk = d3.d_date_sk) - AND (d3.d_year IN (1999, (1999 + 1), (1999 + 2))) -GROUP BY i_item_id, i_item_desc, s_store_id, s_store_name -ORDER BY i_item_id ASC, i_item_desc ASC, s_store_id ASC, s_store_name ASC -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q30.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q30.groovy deleted file mode 100644 index b4ca8d5959c74b..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q30.groovy +++ /dev/null @@ -1,78 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q30_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ -/* - qt_q30 """ --- Expect cell is: C??TE D'IVOIRE --- But real is: C?TE D'IVOIRE --- compare result fail when encounter latin character Ô -WITH - customer_total_return AS ( - SELECT - wr_returning_customer_sk ctr_customer_sk - , ca_state ctr_state - , sum(wr_return_amt) ctr_total_return - FROM - web_returns - , date_dim - , customer_address - WHERE (wr_returned_date_sk = d_date_sk) - AND (d_year = 2002) - AND (wr_returning_addr_sk = ca_address_sk) - GROUP BY wr_returning_customer_sk, ca_state -) -SELECT - c_customer_id -, c_salutation -, c_first_name -, c_last_name -, c_preferred_cust_flag -, c_birth_day -, c_birth_month -, c_birth_year -, c_birth_country -, c_login -, c_email_address -, c_last_review_date_sk -, ctr_total_return -FROM - customer_total_return ctr1 -, customer_address -, customer -WHERE (ctr1.ctr_total_return > ( - SELECT (avg(ctr_total_return) * CAST('1.2' AS DECIMAL(2,1))) - FROM - customer_total_return ctr2 - WHERE (ctr1.ctr_state = ctr2.ctr_state) - )) - AND (ca_address_sk = c_current_addr_sk) - AND (ca_state = 'GA') - AND (ctr1.ctr_customer_sk = c_customer_sk) -ORDER BY c_customer_id ASC, c_salutation ASC, c_first_name ASC, c_last_name ASC, c_preferred_cust_flag ASC, c_birth_day ASC, c_birth_month ASC, c_birth_year ASC, c_birth_country ASC, c_login ASC, c_email_address ASC, c_last_review_date_sk ASC, ctr_total_return ASC -LIMIT 100 -""" -*/ -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q31.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q31.groovy deleted file mode 100644 index 7ac8da05982f8e..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q31.groovy +++ /dev/null @@ -1,92 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q31_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q31 """ -WITH - ss AS ( - SELECT - ca_county - , d_qoy - , d_year - , sum(ss_ext_sales_price) store_sales - FROM - store_sales - , date_dim - , customer_address - WHERE (ss_sold_date_sk = d_date_sk) - AND (ss_addr_sk = ca_address_sk) - GROUP BY ca_county, d_qoy, d_year -) -, ws AS ( - SELECT - ca_county - , d_qoy - , d_year - , sum(ws_ext_sales_price) web_sales - FROM - web_sales - , date_dim - , customer_address - WHERE (ws_sold_date_sk = d_date_sk) - AND (ws_bill_addr_sk = ca_address_sk) - GROUP BY ca_county, d_qoy, d_year -) -SELECT - ss1.ca_county -, ss1.d_year -, (ws2.web_sales / ws1.web_sales) web_q1_q2_increase -, (ss2.store_sales / ss1.store_sales) store_q1_q2_increase -, (ws3.web_sales / ws2.web_sales) web_q2_q3_increase -, (ss3.store_sales / ss2.store_sales) store_q2_q3_increase -FROM - ss ss1 -, ss ss2 -, ss ss3 -, ws ws1 -, ws ws2 -, ws ws3 -WHERE (ss1.d_qoy = 1) - AND (ss1.d_year = 2000) - AND (ss1.ca_county = ss2.ca_county) - AND (ss2.d_qoy = 2) - AND (ss2.d_year = 2000) - AND (ss2.ca_county = ss3.ca_county) - AND (ss3.d_qoy = 3) - AND (ss3.d_year = 2000) - AND (ss1.ca_county = ws1.ca_county) - AND (ws1.d_qoy = 1) - AND (ws1.d_year = 2000) - AND (ws1.ca_county = ws2.ca_county) - AND (ws2.d_qoy = 2) - AND (ws2.d_year = 2000) - AND (ws1.ca_county = ws3.ca_county) - AND (ws3.d_qoy = 3) - AND (ws3.d_year = 2000) - AND ((CASE WHEN (ws1.web_sales > 0) THEN (CAST(ws2.web_sales AS DECIMAL(21,3)) / ws1.web_sales) ELSE null END) > (CASE WHEN (ss1.store_sales > 0) THEN (CAST(ss2.store_sales AS DECIMAL(21,3)) / ss1.store_sales) ELSE null END)) - AND ((CASE WHEN (ws2.web_sales > 0) THEN (CAST(ws3.web_sales AS DECIMAL(21,3)) / ws2.web_sales) ELSE null END) > (CASE WHEN (ss2.store_sales > 0) THEN (CAST(ss3.store_sales AS DECIMAL(21,3)) / ss2.store_sales) ELSE null END)) -ORDER BY ss1.ca_county ASC -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q32.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q32.groovy deleted file mode 100644 index 61752998ac1d65..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q32.groovy +++ /dev/null @@ -1,48 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q32_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q32 """ -SELECT sum(cs_ext_discount_amt) 'excess discount amount' -FROM - catalog_sales -, item -, date_dim -WHERE (i_manufact_id = 977) - AND (i_item_sk = cs_item_sk) - AND (d_date BETWEEN CAST('2000-01-27' AS DATE) AND (CAST('2000-01-27' AS DATE) + INTERVAL '90' DAY)) - AND (d_date_sk = cs_sold_date_sk) - AND (cs_ext_discount_amt > ( - SELECT (CAST('1.3' AS DECIMAL(2,1)) * avg(cs_ext_discount_amt)) - FROM - catalog_sales - , date_dim - WHERE (cs_item_sk = i_item_sk) - AND (d_date BETWEEN CAST('2000-01-27' AS DATE) AND (CAST('2000-01-27' AS DATE) + INTERVAL '90' DAY)) - AND (d_date_sk = cs_sold_date_sk) - )) -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q33.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q33.groovy deleted file mode 100644 index 20abeef48cf3a5..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q33.groovy +++ /dev/null @@ -1,117 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q33_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q33 """ -WITH - ss AS ( - SELECT - i_manufact_id - , sum(ss_ext_sales_price) total_sales - FROM - store_sales - , date_dim - , customer_address - , item - WHERE (i_manufact_id IN ( - SELECT i_manufact_id - FROM - item - WHERE (i_category IN ('Electronics')) - )) - AND (ss_item_sk = i_item_sk) - AND (ss_sold_date_sk = d_date_sk) - AND (d_year = 1998) - AND (d_moy = 5) - AND (ss_addr_sk = ca_address_sk) - AND (ca_gmt_offset = -5) - GROUP BY i_manufact_id -) -, cs AS ( - SELECT - i_manufact_id - , sum(cs_ext_sales_price) total_sales - FROM - catalog_sales - , date_dim - , customer_address - , item - WHERE (i_manufact_id IN ( - SELECT i_manufact_id - FROM - item - WHERE (i_category IN ('Electronics')) - )) - AND (cs_item_sk = i_item_sk) - AND (cs_sold_date_sk = d_date_sk) - AND (d_year = 1998) - AND (d_moy = 5) - AND (cs_bill_addr_sk = ca_address_sk) - AND (ca_gmt_offset = -5) - GROUP BY i_manufact_id -) -, ws AS ( - SELECT - i_manufact_id - , sum(ws_ext_sales_price) total_sales - FROM - web_sales - , date_dim - , customer_address - , item - WHERE (i_manufact_id IN ( - SELECT i_manufact_id - FROM - item - WHERE (i_category IN ('Electronics')) - )) - AND (ws_item_sk = i_item_sk) - AND (ws_sold_date_sk = d_date_sk) - AND (d_year = 1998) - AND (d_moy = 5) - AND (ws_bill_addr_sk = ca_address_sk) - AND (ca_gmt_offset = -5) - GROUP BY i_manufact_id -) -SELECT - i_manufact_id -, sum(total_sales) total_sales -FROM - ( - SELECT * - FROM - ss -UNION ALL SELECT * - FROM - cs -UNION ALL SELECT * - FROM - ws -) tmp1 -GROUP BY i_manufact_id -ORDER BY total_sales ASC -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q34.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q34.groovy deleted file mode 100644 index aad3cdc275864f..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q34.groovy +++ /dev/null @@ -1,64 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q34_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q34 """ -SELECT - c_last_name -, c_first_name -, c_salutation -, c_preferred_cust_flag -, ss_ticket_number -, cnt -FROM - ( - SELECT - ss_ticket_number - , ss_customer_sk - , count(*) cnt - FROM - store_sales - , date_dim - , store - , household_demographics - WHERE (store_sales.ss_sold_date_sk = date_dim.d_date_sk) - AND (store_sales.ss_store_sk = store.s_store_sk) - AND (store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk) - AND ((date_dim.d_dom BETWEEN 1 AND 3) - OR (date_dim.d_dom BETWEEN 25 AND 28)) - AND ((household_demographics.hd_buy_potential = '>10000') - OR (household_demographics.hd_buy_potential = 'Unknown')) - AND (household_demographics.hd_vehicle_count > 0) - AND ((CASE WHEN (household_demographics.hd_vehicle_count > 0) THEN (CAST(household_demographics.hd_dep_count AS DECIMAL(7,2)) / household_demographics.hd_vehicle_count) ELSE null END) > CAST('1.2' AS DECIMAL(2,1))) - AND (date_dim.d_year IN (1999 , (1999 + 1) , (1999 + 2))) - AND (store.s_county IN ('Williamson County' , 'Williamson County' , 'Williamson County' , 'Williamson County' , 'Williamson County' , 'Williamson County' , 'Williamson County' , 'Williamson County')) - GROUP BY ss_ticket_number, ss_customer_sk -) dn -, customer -WHERE (ss_customer_sk = c_customer_sk) - AND (cnt BETWEEN 15 AND 20) -ORDER BY c_last_name ASC, c_first_name ASC, c_salutation ASC, c_preferred_cust_flag DESC, ss_ticket_number ASC -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q35.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q35.groovy deleted file mode 100644 index cf623eb634e4c6..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q35.groovy +++ /dev/null @@ -1,89 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q35_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ -/* - qt_q35 """ -SELECT - ca_state -, cd_gender -, cd_marital_status -, cd_dep_count -, count(*) cnt1 -, min(cd_dep_count) -, max(cd_dep_count) -, avg(cd_dep_count) -, cd_dep_employed_count -, count(*) cnt2 -, min(cd_dep_employed_count) -, max(cd_dep_employed_count) -, avg(cd_dep_employed_count) -, cd_dep_college_count -, count(*) cnt3 -, min(cd_dep_college_count) -, max(cd_dep_college_count) -, avg(cd_dep_college_count) -FROM - customer c -, customer_address ca -, customer_demographics -WHERE (c.c_current_addr_sk = ca.ca_address_sk) - AND (cd_demo_sk = c.c_current_cdemo_sk) - AND (EXISTS ( - SELECT * - FROM - store_sales - , date_dim - WHERE (c.c_customer_sk = ss_customer_sk) - AND (ss_sold_date_sk = d_date_sk) - AND (d_year = 2002) - AND (d_qoy < 4) -)) - AND ((EXISTS ( - SELECT * - FROM - web_sales - , date_dim - WHERE (c.c_customer_sk = ws_bill_customer_sk) - AND (ws_sold_date_sk = d_date_sk) - AND (d_year = 2002) - AND (d_qoy < 4) - )) - OR (EXISTS ( - SELECT * - FROM - catalog_sales - , date_dim - WHERE (c.c_customer_sk = cs_ship_customer_sk) - AND (cs_sold_date_sk = d_date_sk) - AND (d_year = 2002) - AND (d_qoy < 4) - ))) -GROUP BY ca_state, cd_gender, cd_marital_status, cd_dep_count, cd_dep_employed_count, cd_dep_college_count -ORDER BY ca_state ASC, cd_gender ASC, cd_marital_status ASC, cd_dep_count ASC, cd_dep_employed_count ASC, cd_dep_college_count ASC -LIMIT 100 -""" -*/ -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q36.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q36.groovy deleted file mode 100644 index 8da71f4b555cc0..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q36.groovy +++ /dev/null @@ -1,56 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q36_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q36 """ -SELECT - (sum(ss_net_profit) / sum(ss_ext_sales_price)) gross_margin -, i_category -, i_class -, (GROUPING (i_category) + GROUPING (i_class)) lochierarchy -, rank() OVER (PARTITION BY (GROUPING (i_category) + GROUPING (i_class)), (CASE WHEN (GROUPING (i_class) = 0) THEN i_category END) ORDER BY (sum(ss_net_profit) / sum(ss_ext_sales_price)) ASC) rank_within_parent -FROM - store_sales -, date_dim d1 -, item -, store -WHERE (d1.d_year = 2001) - AND (d1.d_date_sk = ss_sold_date_sk) - AND (i_item_sk = ss_item_sk) - AND (s_store_sk = ss_store_sk) - AND (s_state IN ( - 'TN' - , 'TN' - , 'TN' - , 'TN' - , 'TN' - , 'TN' - , 'TN' - , 'TN')) -GROUP BY ROLLUP (i_category, i_class) -ORDER BY lochierarchy DESC, (CASE WHEN (lochierarchy = 0) THEN i_category END) ASC, rank_within_parent ASC, i_category, i_class -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q37.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q37.groovy deleted file mode 100644 index 7bdc85c62713c1..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q37.groovy +++ /dev/null @@ -1,48 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q37_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q37 """ -SELECT - i_item_id -, i_item_desc -, i_current_price -FROM - item -, inventory -, date_dim -, catalog_sales -WHERE (i_current_price BETWEEN 68 AND (68 + 30)) - AND (inv_item_sk = i_item_sk) - AND (d_date_sk = inv_date_sk) - AND (CAST(d_date AS DATE) BETWEEN CAST('2000-02-01' AS DATE) AND (CAST('2000-02-01' AS DATE) + INTERVAL '60' DAY)) - AND (i_manufact_id IN (677, 940, 694, 808)) - AND (inv_quantity_on_hand BETWEEN 100 AND 500) - AND (cs_item_sk = i_item_sk) -GROUP BY i_item_id, i_item_desc, i_current_price -ORDER BY i_item_id ASC -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q38.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q38.groovy deleted file mode 100644 index f873cdaede0bef..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q38.groovy +++ /dev/null @@ -1,67 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q38_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q38 """ -SELECT count(*) -FROM - ( - SELECT DISTINCT - c_last_name - , c_first_name - , d_date - FROM - store_sales - , date_dim - , customer - WHERE (store_sales.ss_sold_date_sk = date_dim.d_date_sk) - AND (store_sales.ss_customer_sk = customer.c_customer_sk) - AND (d_month_seq BETWEEN 1200 AND (1200 + 11)) -INTERSECT SELECT DISTINCT - c_last_name - , c_first_name - , d_date - FROM - catalog_sales - , date_dim - , customer - WHERE (catalog_sales.cs_sold_date_sk = date_dim.d_date_sk) - AND (catalog_sales.cs_bill_customer_sk = customer.c_customer_sk) - AND (d_month_seq BETWEEN 1200 AND (1200 + 11)) -INTERSECT SELECT DISTINCT - c_last_name - , c_first_name - , d_date - FROM - web_sales - , date_dim - , customer - WHERE (web_sales.ws_sold_date_sk = date_dim.d_date_sk) - AND (web_sales.ws_bill_customer_sk = customer.c_customer_sk) - AND (d_month_seq BETWEEN 1200 AND (1200 + 11)) -) hot_cust -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q39_1.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q39_1.groovy deleted file mode 100644 index 7eea2bd291d4d0..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q39_1.groovy +++ /dev/null @@ -1,80 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q39_1_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q39_1 """ -WITH - inv AS ( - SELECT - w_warehouse_name - , w_warehouse_sk - , i_item_sk - , d_moy - , stdev - , mean - , (CASE mean WHEN 0 THEN null ELSE (stdev / mean) END) cov - FROM - ( - SELECT - w_warehouse_name - , w_warehouse_sk - , i_item_sk - , d_moy - , stddev_samp(inv_quantity_on_hand) stdev - , avg(inv_quantity_on_hand) mean - FROM - inventory - , item - , warehouse - , date_dim - WHERE (inv_item_sk = i_item_sk) - AND (inv_warehouse_sk = w_warehouse_sk) - AND (inv_date_sk = d_date_sk) - AND (d_year = 2001) - GROUP BY w_warehouse_name, w_warehouse_sk, i_item_sk, d_moy - ) foo - WHERE ((CASE mean WHEN 0 THEN 0 ELSE (stdev / mean) END) > 1) -) -SELECT - inv1.w_warehouse_sk -, inv1.i_item_sk -, inv1.d_moy -, inv1.mean -, inv1.cov -, inv2.w_warehouse_sk -, inv2.i_item_sk -, inv2.d_moy -, inv2.mean -, inv2.cov -FROM - inv inv1 -, inv inv2 -WHERE (inv1.i_item_sk = inv2.i_item_sk) - AND (inv1.w_warehouse_sk = inv2.w_warehouse_sk) - AND (inv1.d_moy = 1) - AND (inv2.d_moy = (1 + 1)) -ORDER BY inv1.w_warehouse_sk ASC, inv1.i_item_sk ASC, inv1.d_moy ASC, inv1.mean ASC, inv1.cov ASC, inv2.d_moy ASC, inv2.mean ASC, inv2.cov ASC -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q39_2.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q39_2.groovy deleted file mode 100644 index e46c4917515c4d..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q39_2.groovy +++ /dev/null @@ -1,81 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q39_2_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q39_2 """ -WITH - inv AS ( - SELECT - w_warehouse_name - , w_warehouse_sk - , i_item_sk - , d_moy - , stdev - , mean - , (CASE mean WHEN 0 THEN null ELSE (stdev / mean) END) cov - FROM - ( - SELECT - w_warehouse_name - , w_warehouse_sk - , i_item_sk - , d_moy - , stddev_samp(inv_quantity_on_hand) stdev - , avg(inv_quantity_on_hand) mean - FROM - inventory - , item - , warehouse - , date_dim - WHERE (inv_item_sk = i_item_sk) - AND (inv_warehouse_sk = w_warehouse_sk) - AND (inv_date_sk = d_date_sk) - AND (d_year = 2001) - GROUP BY w_warehouse_name, w_warehouse_sk, i_item_sk, d_moy - ) foo - WHERE ((CASE mean WHEN 0 THEN 0 ELSE (stdev / mean) END) > 1) -) -SELECT - inv1.w_warehouse_sk -, inv1.i_item_sk -, inv1.d_moy -, inv1.mean -, inv1.cov -, inv2.w_warehouse_sk -, inv2.i_item_sk -, inv2.d_moy -, inv2.mean -, inv2.cov -FROM - inv inv1 -, inv inv2 -WHERE (inv1.i_item_sk = inv2.i_item_sk) - AND (inv1.w_warehouse_sk = inv2.w_warehouse_sk) - AND (inv1.d_moy = 1) - AND (inv2.d_moy = (1 + 1)) - AND (inv1.cov > CAST('1.5' AS DECIMAL(2,1))) -ORDER BY inv1.w_warehouse_sk ASC, inv1.i_item_sk ASC, inv1.d_moy ASC, inv1.mean ASC, inv1.cov ASC, inv2.d_moy ASC, inv2.mean ASC, inv2.cov ASC -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q40.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q40.groovy deleted file mode 100644 index dca463d78d0eb9..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q40.groovy +++ /dev/null @@ -1,49 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q40_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q40 """ -SELECT - w_state -, i_item_id -, sum((CASE WHEN (CAST(d_date AS DATE) < CAST('2000-03-11' AS DATE)) THEN (cs_sales_price - COALESCE(cr_refunded_cash, 0)) ELSE 0 END)) sales_before -, sum((CASE WHEN (CAST(d_date AS DATE) >= CAST('2000-03-11' AS DATE)) THEN (cs_sales_price - COALESCE(cr_refunded_cash, 0)) ELSE 0 END)) sales_after -FROM - catalog_sales -LEFT JOIN catalog_returns ON (cs_order_number = cr_order_number) - AND (cs_item_sk = cr_item_sk) -, warehouse -, item -, date_dim -WHERE (i_current_price BETWEEN CAST('0.99' AS DECIMAL(3,2)) AND CAST('1.49' AS DECIMAL(3,2))) - AND (i_item_sk = cs_item_sk) - AND (cs_warehouse_sk = w_warehouse_sk) - AND (cs_sold_date_sk = d_date_sk) - AND (CAST(d_date AS DATE) BETWEEN (CAST('2000-03-11' AS DATE) - INTERVAL '30' DAY) AND (CAST('2000-03-11' AS DATE) + INTERVAL '30' DAY)) -GROUP BY w_state, i_item_id -ORDER BY w_state ASC, i_item_id ASC -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q41.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q41.groovy deleted file mode 100644 index 88c61037b37701..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q41.groovy +++ /dev/null @@ -1,98 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q41_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q41 """ -SELECT DISTINCT i_product_name -FROM - item i1 -WHERE (i_manufact_id BETWEEN 738 AND (738 + 40)) - AND (( - SELECT count(*) item_cnt - FROM - item - WHERE ((i_manufact = i1.i_manufact) - AND (((i_category = 'Women') - AND ((i_color = 'powder') - OR (i_color = 'khaki')) - AND ((i_units = 'Ounce') - OR (i_units = 'Oz')) - AND ((i_size = 'medium') - OR (i_size = 'extra large'))) - OR ((i_category = 'Women') - AND ((i_color = 'brown') - OR (i_color = 'honeydew')) - AND ((i_units = 'Bunch') - OR (i_units = 'Ton')) - AND ((i_size = 'N/A') - OR (i_size = 'small'))) - OR ((i_category = 'Men') - AND ((i_color = 'floral') - OR (i_color = 'deep')) - AND ((i_units = 'N/A') - OR (i_units = 'Dozen')) - AND ((i_size = 'petite') - OR (i_size = 'large'))) - OR ((i_category = 'Men') - AND ((i_color = 'light') - OR (i_color = 'cornflower')) - AND ((i_units = 'Box') - OR (i_units = 'Pound')) - AND ((i_size = 'medium') - OR (i_size = 'extra large'))))) - OR ((i_manufact = i1.i_manufact) - AND (((i_category = 'Women') - AND ((i_color = 'midnight') - OR (i_color = 'snow')) - AND ((i_units = 'Pallet') - OR (i_units = 'Gross')) - AND ((i_size = 'medium') - OR (i_size = 'extra large'))) - OR ((i_category = 'Women') - AND ((i_color = 'cyan') - OR (i_color = 'papaya')) - AND ((i_units = 'Cup') - OR (i_units = 'Dram')) - AND ((i_size = 'N/A') - OR (i_size = 'small'))) - OR ((i_category = 'Men') - AND ((i_color = 'orange') - OR (i_color = 'frosted')) - AND ((i_units = 'Each') - OR (i_units = 'Tbl')) - AND ((i_size = 'petite') - OR (i_size = 'large'))) - OR ((i_category = 'Men') - AND ((i_color = 'forest') - OR (i_color = 'ghost')) - AND ((i_units = 'Lb') - OR (i_units = 'Bundle')) - AND ((i_size = 'medium') - OR (i_size = 'extra large'))))) - ) > 0) -ORDER BY i_product_name ASC -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q42.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q42.groovy deleted file mode 100644 index 31716d6a3c5272..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q42.groovy +++ /dev/null @@ -1,46 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q42_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q42 """ -SELECT - dt.d_year -, item.i_category_id -, item.i_category -, sum(ss_ext_sales_price) -FROM - date_dim dt -, store_sales -, item -WHERE (dt.d_date_sk = store_sales.ss_sold_date_sk) - AND (store_sales.ss_item_sk = item.i_item_sk) - AND (item.i_manager_id = 1) - AND (dt.d_moy = 11) - AND (dt.d_year = 2000) -GROUP BY dt.d_year, item.i_category_id, item.i_category -ORDER BY sum(ss_ext_sales_price) DESC, dt.d_year ASC, item.i_category_id ASC, item.i_category ASC -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q43.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q43.groovy deleted file mode 100644 index 6a7bcc37f0359f..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q43.groovy +++ /dev/null @@ -1,50 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q43_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q43 """ -SELECT - s_store_name -, s_store_id -, sum((CASE WHEN (d_day_name = 'Sunday') THEN ss_sales_price ELSE null END)) sun_sales -, sum((CASE WHEN (d_day_name = 'Monday') THEN ss_sales_price ELSE null END)) mon_sales -, sum((CASE WHEN (d_day_name = 'Tuesday') THEN ss_sales_price ELSE null END)) tue_sales -, sum((CASE WHEN (d_day_name = 'Wednesday') THEN ss_sales_price ELSE null END)) wed_sales -, sum((CASE WHEN (d_day_name = 'Thursday') THEN ss_sales_price ELSE null END)) thu_sales -, sum((CASE WHEN (d_day_name = 'Friday') THEN ss_sales_price ELSE null END)) fri_sales -, sum((CASE WHEN (d_day_name = 'Saturday') THEN ss_sales_price ELSE null END)) sat_sales -FROM - date_dim -, store_sales -, store -WHERE (d_date_sk = ss_sold_date_sk) - AND (s_store_sk = ss_store_sk) - AND (s_gmt_offset = -5) - AND (d_year = 2000) -GROUP BY s_store_name, s_store_id -ORDER BY s_store_name ASC, s_store_id ASC, sun_sales ASC, mon_sales ASC, tue_sales ASC, wed_sales ASC, thu_sales ASC, fri_sales ASC, sat_sales ASC -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q44.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q44.groovy deleted file mode 100644 index e3dc65bb7392e3..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q44.groovy +++ /dev/null @@ -1,97 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q44_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q44 """ -SELECT - asceding.rnk -, i1.i_product_name best_performing -, i2.i_product_name worst_performing -FROM - ( - SELECT * - FROM - ( - SELECT - item_sk - , rank() OVER (ORDER BY rank_col ASC) rnk - FROM - ( - SELECT - ss_item_sk item_sk - , avg(ss_net_profit) rank_col - FROM - store_sales ss1 - WHERE (ss_store_sk = 4) - GROUP BY ss_item_sk - HAVING (avg(ss_net_profit) > (CAST('0.9' AS DECIMAL(2,1)) * ( - SELECT avg(ss_net_profit) rank_col - FROM - store_sales - WHERE (ss_store_sk = 4) - AND (ss_addr_sk IS NULL) - GROUP BY ss_store_sk - ))) - ) v1 - ) v11 - WHERE (rnk < 11) -) asceding -, ( - SELECT * - FROM - ( - SELECT - item_sk - , rank() OVER (ORDER BY rank_col DESC) rnk - FROM - ( - SELECT - ss_item_sk item_sk - , avg(ss_net_profit) rank_col - FROM - store_sales ss1 - WHERE (ss_store_sk = 4) - GROUP BY ss_item_sk - HAVING (avg(ss_net_profit) > (CAST('0.9' AS DECIMAL(2,1)) * ( - SELECT avg(ss_net_profit) rank_col - FROM - store_sales - WHERE (ss_store_sk = 4) - AND (ss_addr_sk IS NULL) - GROUP BY ss_store_sk - ))) - ) v2 - ) v21 - WHERE (rnk < 11) -) descending -, item i1 -, item i2 -WHERE (asceding.rnk = descending.rnk) - AND (i1.i_item_sk = asceding.item_sk) - AND (i2.i_item_sk = descending.item_sk) -ORDER BY asceding.rnk ASC -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q45.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q45.groovy deleted file mode 100644 index b1adb93f8244ff..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q45.groovy +++ /dev/null @@ -1,57 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q45_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ -/* - qt_q45 """ -SELECT - ca_zip -, ca_city -, sum(ws_sales_price) -FROM - web_sales -, customer -, customer_address -, date_dim -, item -WHERE (ws_bill_customer_sk = c_customer_sk) - AND (c_current_addr_sk = ca_address_sk) - AND (ws_item_sk = i_item_sk) - AND ((substr(ca_zip, 1, 5) IN ('85669' , '86197' , '88274' , '83405' , '86475' , '85392' , '85460' , '80348' , '81792')) - OR (i_item_id IN ( - SELECT i_item_id - FROM - item - WHERE (i_item_sk IN (2 , 3 , 5 , 7 , 11 , 13 , 17 , 19 , 23 , 29)) - ))) - AND (ws_sold_date_sk = d_date_sk) - AND (d_qoy = 2) - AND (d_year = 2001) -GROUP BY ca_zip, ca_city -ORDER BY ca_zip ASC, ca_city ASC -LIMIT 100 -""" -*/ -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q47.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q47.groovy deleted file mode 100644 index af2c8be0f28076..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q47.groovy +++ /dev/null @@ -1,91 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q47_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=100; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q47 """ -WITH - v1 AS ( - SELECT - i_category - , i_brand - , s_store_name - , s_company_name - , d_year - , d_moy - , sum(ss_sales_price) sum_sales - , avg(sum(ss_sales_price)) OVER (PARTITION BY i_category, i_brand, s_store_name, s_company_name, d_year) avg_monthly_sales - , rank() OVER (PARTITION BY i_category, i_brand, s_store_name, s_company_name ORDER BY d_year ASC, d_moy ASC) rn - FROM - item - , store_sales - , date_dim - , store - WHERE (ss_item_sk = i_item_sk) - AND (ss_sold_date_sk = d_date_sk) - AND (ss_store_sk = s_store_sk) - AND ((d_year = 1999) - OR ((d_year = (1999 - 1)) - AND (d_moy = 12)) - OR ((d_year = (1999 + 1)) - AND (d_moy = 1))) - GROUP BY i_category, i_brand, s_store_name, s_company_name, d_year, d_moy -) -, v2 AS ( - SELECT - v1.i_category - , v1.i_brand - , v1.s_store_name - , v1.s_company_name - , v1.d_year - , v1.d_moy - , v1.avg_monthly_sales - , v1.sum_sales - , v1_lag.sum_sales psum - , v1_lead.sum_sales nsum - FROM - v1 - , v1 v1_lag - , v1 v1_lead - WHERE (v1.i_category = v1_lag.i_category) - AND (v1.i_category = v1_lead.i_category) - AND (v1.i_brand = v1_lag.i_brand) - AND (v1.i_brand = v1_lead.i_brand) - AND (v1.s_store_name = v1_lag.s_store_name) - AND (v1.s_store_name = v1_lead.s_store_name) - AND (v1.s_company_name = v1_lag.s_company_name) - AND (v1.s_company_name = v1_lead.s_company_name) - AND (v1.rn = (v1_lag.rn + 1)) - AND (v1.rn = (v1_lead.rn - 1)) -) -SELECT * -FROM - v2 -WHERE (d_year = 1999) - AND (avg_monthly_sales > 0) - AND ((CASE WHEN (avg_monthly_sales > 0) THEN (abs((sum_sales - avg_monthly_sales)) / avg_monthly_sales) ELSE null END) > CAST('0.1' AS DECIMAL(2,1))) -ORDER BY (sum_sales - avg_monthly_sales) ASC, 3 ASC -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q48.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q48.groovy deleted file mode 100644 index 76126f3ae34667..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q48.groovy +++ /dev/null @@ -1,63 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q48_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q48 """ -SELECT sum(ss_quantity) -FROM - store_sales -, store -, customer_demographics -, customer_address -, date_dim -WHERE (s_store_sk = ss_store_sk) - AND (ss_sold_date_sk = d_date_sk) - AND (d_year = 2000) - AND (((cd_demo_sk = ss_cdemo_sk) - AND (cd_marital_status = 'M') - AND (cd_education_status = '4 yr Degree') - AND (ss_sales_price BETWEEN CAST('100.00' AS DECIMAL(5,2)) AND CAST('150.00' AS DECIMAL(5,2)))) - OR ((cd_demo_sk = ss_cdemo_sk) - AND (cd_marital_status = 'D') - AND (cd_education_status = '2 yr Degree') - AND (ss_sales_price BETWEEN CAST('50.00' AS DECIMAL(5,2)) AND CAST('100.00' AS DECIMAL(5,2)))) - OR ((cd_demo_sk = ss_cdemo_sk) - AND (cd_marital_status = 'S') - AND (cd_education_status = 'College') - AND (ss_sales_price BETWEEN CAST('150.00' AS DECIMAL(5,2)) AND CAST('200.00' AS DECIMAL(5,2))))) - AND (((ss_addr_sk = ca_address_sk) - AND (ca_country = 'United States') - AND (ca_state IN ('CO' , 'OH' , 'TX')) - AND (ss_net_profit BETWEEN 0 AND 2000)) - OR ((ss_addr_sk = ca_address_sk) - AND (ca_country = 'United States') - AND (ca_state IN ('OR' , 'MN' , 'KY')) - AND (ss_net_profit BETWEEN 150 AND 3000)) - OR ((ss_addr_sk = ca_address_sk) - AND (ca_country = 'United States') - AND (ca_state IN ('VA' , 'CA' , 'MS')) - AND (ss_net_profit BETWEEN 50 AND 25000))) -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q49.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q49.groovy deleted file mode 100644 index fbaddf96b4956f..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q49.groovy +++ /dev/null @@ -1,147 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q49_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q49 """ --- 目前union后跟得order没有效果,需要在外面包一层select后再order - -SELECT channel, item, return_ratio, return_rank, currency_rank -FROM -(SELECT - 'web' channel -, web.item -, web.return_ratio -, web.return_rank -, web.currency_rank -FROM - ( - SELECT - item - , return_ratio - , currency_ratio - , rank() OVER (ORDER BY return_ratio ASC) return_rank - , rank() OVER (ORDER BY currency_ratio ASC) currency_rank - FROM - ( - SELECT - ws.ws_item_sk item - , (CAST(sum(COALESCE(wr.wr_return_quantity, 0)) AS DECIMAL(15,4)) / CAST(sum(COALESCE(ws.ws_quantity, 0)) AS DECIMAL(15,4))) return_ratio - , (CAST(sum(COALESCE(wr.wr_return_amt, 0)) AS DECIMAL(15,4)) / CAST(sum(COALESCE(ws.ws_net_paid, 0)) AS DECIMAL(15,4))) currency_ratio - FROM - web_sales ws - LEFT JOIN web_returns wr ON (ws.ws_order_number = wr.wr_order_number) - AND (ws.ws_item_sk = wr.wr_item_sk) - , date_dim - WHERE (wr.wr_return_amt > 10000) - AND (ws.ws_net_profit > 1) - AND (ws.ws_net_paid > 0) - AND (ws.ws_quantity > 0) - AND (ws_sold_date_sk = d_date_sk) - AND (d_year = 2001) - AND (d_moy = 12) - GROUP BY ws.ws_item_sk - ) in_web -) web -WHERE (web.return_rank <= 10) - OR (web.currency_rank <= 10) -UNION SELECT - 'catalog' channel -, catalog.item -, catalog.return_ratio -, catalog.return_rank -, catalog.currency_rank -FROM - ( - SELECT - item - , return_ratio - , currency_ratio - , rank() OVER (ORDER BY return_ratio ASC) return_rank - , rank() OVER (ORDER BY currency_ratio ASC) currency_rank - FROM - ( - SELECT - cs.cs_item_sk item - , (CAST(sum(COALESCE(cr.cr_return_quantity, 0)) AS DECIMAL(15,4)) / CAST(sum(COALESCE(cs.cs_quantity, 0)) AS DECIMAL(15,4))) return_ratio - , (CAST(sum(COALESCE(cr.cr_return_amount, 0)) AS DECIMAL(15,4)) / CAST(sum(COALESCE(cs.cs_net_paid, 0)) AS DECIMAL(15,4))) currency_ratio - FROM - catalog_sales cs - LEFT JOIN catalog_returns cr ON (cs.cs_order_number = cr.cr_order_number) - AND (cs.cs_item_sk = cr.cr_item_sk) - , date_dim - WHERE (cr.cr_return_amount > 10000) - AND (cs.cs_net_profit > 1) - AND (cs.cs_net_paid > 0) - AND (cs.cs_quantity > 0) - AND (cs_sold_date_sk = d_date_sk) - AND (d_year = 2001) - AND (d_moy = 12) - GROUP BY cs.cs_item_sk - ) in_cat -) catalog -WHERE (catalog.return_rank <= 10) - OR (catalog.currency_rank <= 10) -UNION SELECT - 'store' channel -, store.item -, store.return_ratio -, store.return_rank -, store.currency_rank -FROM - ( - SELECT - item - , return_ratio - , currency_ratio - , rank() OVER (ORDER BY return_ratio ASC) return_rank - , rank() OVER (ORDER BY currency_ratio ASC) currency_rank - FROM - ( - SELECT - sts.ss_item_sk item - , (CAST(sum(COALESCE(sr.sr_return_quantity, 0)) AS DECIMAL(15,4)) / CAST(sum(COALESCE(sts.ss_quantity, 0)) AS DECIMAL(15,4))) return_ratio - , (CAST(sum(COALESCE(sr.sr_return_amt, 0)) AS DECIMAL(15,4)) / CAST(sum(COALESCE(sts.ss_net_paid, 0)) AS DECIMAL(15,4))) currency_ratio - FROM - store_sales sts - LEFT JOIN store_returns sr ON (sts.ss_ticket_number = sr.sr_ticket_number) - AND (sts.ss_item_sk = sr.sr_item_sk) - , date_dim - WHERE (sr.sr_return_amt > 10000) - AND (sts.ss_net_profit > 1) - AND (sts.ss_net_paid > 0) - AND (sts.ss_quantity > 0) - AND (ss_sold_date_sk = d_date_sk) - AND (d_year = 2001) - AND (d_moy = 12) - GROUP BY sts.ss_item_sk - ) in_store -) store -WHERE (store.return_rank <= 10) - OR (store.currency_rank <= 10) -) r -ORDER BY 1 ASC, 4 ASC, 5 ASC, 2 ASC -LIMIT 100; -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q49_rewrite.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q49_rewrite.groovy deleted file mode 100644 index 9ab0b51ec02d8b..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q49_rewrite.groovy +++ /dev/null @@ -1,142 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q49_rewrite_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q49_rewrite """ -(SELECT - 'web' channel -, web.item -, web.return_ratio -, web.return_rank -, web.currency_rank -FROM - ( - SELECT - item - , return_ratio - , currency_ratio - , rank() OVER (ORDER BY return_ratio ASC) return_rank - , rank() OVER (ORDER BY currency_ratio ASC) currency_rank - FROM - ( - SELECT - ws.ws_item_sk item - , (CAST(sum(COALESCE(wr.wr_return_quantity, 0)) AS DECIMAL(15,4)) / CAST(sum(COALESCE(ws.ws_quantity, 0)) AS DECIMAL(15,4))) return_ratio - , (CAST(sum(COALESCE(wr.wr_return_amt, 0)) AS DECIMAL(15,4)) / CAST(sum(COALESCE(ws.ws_net_paid, 0)) AS DECIMAL(15,4))) currency_ratio - FROM - web_sales ws - LEFT JOIN web_returns wr ON (ws.ws_order_number = wr.wr_order_number) - AND (ws.ws_item_sk = wr.wr_item_sk) - , date_dim - WHERE (wr.wr_return_amt > 10000) - AND (ws.ws_net_profit > 1) - AND (ws.ws_net_paid > 0) - AND (ws.ws_quantity > 0) - AND (ws_sold_date_sk = d_date_sk) - AND (d_year = 2001) - AND (d_moy = 12) - GROUP BY ws.ws_item_sk - ) in_web -) web -WHERE (web.return_rank <= 10) - OR (web.currency_rank <= 10)) -UNION (SELECT - 'catalog' channel -, catalog.item -, catalog.return_ratio -, catalog.return_rank -, catalog.currency_rank -FROM - ( - SELECT - item - , return_ratio - , currency_ratio - , rank() OVER (ORDER BY return_ratio ASC) return_rank - , rank() OVER (ORDER BY currency_ratio ASC) currency_rank - FROM - ( - SELECT - cs.cs_item_sk item - , (CAST(sum(COALESCE(cr.cr_return_quantity, 0)) AS DECIMAL(15,4)) / CAST(sum(COALESCE(cs.cs_quantity, 0)) AS DECIMAL(15,4))) return_ratio - , (CAST(sum(COALESCE(cr.cr_return_amount, 0)) AS DECIMAL(15,4)) / CAST(sum(COALESCE(cs.cs_net_paid, 0)) AS DECIMAL(15,4))) currency_ratio - FROM - catalog_sales cs - LEFT JOIN catalog_returns cr ON (cs.cs_order_number = cr.cr_order_number) - AND (cs.cs_item_sk = cr.cr_item_sk) - , date_dim - WHERE (cr.cr_return_amount > 10000) - AND (cs.cs_net_profit > 1) - AND (cs.cs_net_paid > 0) - AND (cs.cs_quantity > 0) - AND (cs_sold_date_sk = d_date_sk) - AND (d_year = 2001) - AND (d_moy = 12) - GROUP BY cs.cs_item_sk - ) in_cat -) catalog -WHERE (catalog.return_rank <= 10) - OR (catalog.currency_rank <= 10)) -UNION (SELECT - 'store' channel -, store.item -, store.return_ratio -, store.return_rank -, store.currency_rank -FROM - ( - SELECT - item - , return_ratio - , currency_ratio - , rank() OVER (ORDER BY return_ratio ASC) return_rank - , rank() OVER (ORDER BY currency_ratio ASC) currency_rank - FROM - ( - SELECT - sts.ss_item_sk item - , (CAST(sum(COALESCE(sr.sr_return_quantity, 0)) AS DECIMAL(15,4)) / CAST(sum(COALESCE(sts.ss_quantity, 0)) AS DECIMAL(15,4))) return_ratio - , (CAST(sum(COALESCE(sr.sr_return_amt, 0)) AS DECIMAL(15,4)) / CAST(sum(COALESCE(sts.ss_net_paid, 0)) AS DECIMAL(15,4))) currency_ratio - FROM - store_sales sts - LEFT JOIN store_returns sr ON (sts.ss_ticket_number = sr.sr_ticket_number) - AND (sts.ss_item_sk = sr.sr_item_sk) - , date_dim - WHERE (sr.sr_return_amt > 10000) - AND (sts.ss_net_profit > 1) - AND (sts.ss_net_paid > 0) - AND (sts.ss_quantity > 0) - AND (ss_sold_date_sk = d_date_sk) - AND (d_year = 2001) - AND (d_moy = 12) - GROUP BY sts.ss_item_sk - ) in_store -) store -WHERE (store.return_rank <= 10) - OR (store.currency_rank <= 10)) -ORDER BY 1 ASC, 4 ASC, 5 ASC, 2 ASC -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q50.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q50.groovy deleted file mode 100644 index 38c40367c27a5e..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q50.groovy +++ /dev/null @@ -1,65 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q50_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q50 """ -SELECT - s_store_name -, s_company_id -, s_street_number -, s_street_name -, s_street_type -, s_suite_number -, s_city -, s_county -, s_state -, s_zip -, sum((CASE WHEN ((sr_returned_date_sk - ss_sold_date_sk) <= 30) THEN 1 ELSE 0 END)) '30 days' -, sum((CASE WHEN ((sr_returned_date_sk - ss_sold_date_sk) > 30) - AND ((sr_returned_date_sk - ss_sold_date_sk) <= 60) THEN 1 ELSE 0 END)) '31-60 days' -, sum((CASE WHEN ((sr_returned_date_sk - ss_sold_date_sk) > 60) - AND ((sr_returned_date_sk - ss_sold_date_sk) <= 90) THEN 1 ELSE 0 END)) '61-90 days' -, sum((CASE WHEN ((sr_returned_date_sk - ss_sold_date_sk) > 90) - AND ((sr_returned_date_sk - ss_sold_date_sk) <= 120) THEN 1 ELSE 0 END)) '91-120 days' -, sum((CASE WHEN ((sr_returned_date_sk - ss_sold_date_sk) > 120) THEN 1 ELSE 0 END)) '>120 days' -FROM - store_sales -, store_returns -, store -, date_dim d1 -, date_dim d2 -WHERE (d2.d_year = 2001) - AND (d2.d_moy = 8) - AND (ss_ticket_number = sr_ticket_number) - AND (ss_item_sk = sr_item_sk) - AND (ss_sold_date_sk = d1.d_date_sk) - AND (sr_returned_date_sk = d2.d_date_sk) - AND (ss_customer_sk = sr_customer_sk) - AND (ss_store_sk = s_store_sk) -GROUP BY s_store_name, s_company_id, s_street_number, s_street_name, s_street_type, s_suite_number, s_city, s_county, s_state, s_zip -ORDER BY s_store_name ASC, s_company_id ASC, s_street_number ASC, s_street_name ASC, s_street_type ASC, s_suite_number ASC, s_city ASC, s_county ASC, s_state ASC, s_zip ASC -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q51.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q51.groovy deleted file mode 100644 index 651d0619358502..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q51.groovy +++ /dev/null @@ -1,82 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q51_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q51 """ -WITH - web_v1 AS ( - SELECT - ws_item_sk item_sk - , d_date - , sum(sum(ws_sales_price)) OVER (PARTITION BY ws_item_sk ORDER BY d_date ASC ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) cume_sales - FROM - web_sales - , date_dim - WHERE (ws_sold_date_sk = d_date_sk) - AND (d_month_seq BETWEEN 1200 AND (1200 + 11)) - AND (ws_item_sk IS NOT NULL) - GROUP BY ws_item_sk, d_date -) -, store_v1 AS ( - SELECT - ss_item_sk item_sk - , d_date - , sum(sum(ss_sales_price)) OVER (PARTITION BY ss_item_sk ORDER BY d_date ASC ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) cume_sales - FROM - store_sales - , date_dim - WHERE (ss_sold_date_sk = d_date_sk) - AND (d_month_seq BETWEEN 1200 AND (1200 + 11)) - AND (ss_item_sk IS NOT NULL) - GROUP BY ss_item_sk, d_date -) -SELECT * -FROM - ( - SELECT - item_sk - , d_date - , web_sales - , store_sales - , max(web_sales) OVER (PARTITION BY item_sk ORDER BY d_date ASC ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) web_cumulative - , max(store_sales) OVER (PARTITION BY item_sk ORDER BY d_date ASC ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) store_cumulative - FROM - ( - SELECT - (CASE WHEN (web.item_sk IS NOT NULL) THEN web.item_sk ELSE store.item_sk END) item_sk - , (CASE WHEN (web.d_date IS NOT NULL) THEN web.d_date ELSE store.d_date END) d_date - , web.cume_sales web_sales - , store.cume_sales store_sales - FROM - web_v1 web - FULL JOIN store_v1 store ON (web.item_sk = store.item_sk) - AND (web.d_date = store.d_date) - ) x -) y -WHERE (web_cumulative > store_cumulative) -ORDER BY item_sk ASC, d_date ASC -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q52.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q52.groovy deleted file mode 100644 index 71f73d4fa6ad89..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q52.groovy +++ /dev/null @@ -1,46 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q52_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q52 """ -SELECT - dt.d_year -, item.i_brand_id brand_id -, item.i_brand brand -, sum(ss_ext_sales_price) ext_price -FROM - date_dim dt -, store_sales -, item -WHERE (dt.d_date_sk = store_sales.ss_sold_date_sk) - AND (store_sales.ss_item_sk = item.i_item_sk) - AND (item.i_manager_id = 1) - AND (dt.d_moy = 11) - AND (dt.d_year = 2000) -GROUP BY dt.d_year, item.i_brand, item.i_brand_id -ORDER BY dt.d_year ASC, ext_price DESC, brand_id ASC -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q53.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q53.groovy deleted file mode 100644 index f84eb890174026..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q53.groovy +++ /dev/null @@ -1,56 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q53_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q53 """ -SELECT * -FROM - ( - SELECT - i_manufact_id - , sum(ss_sales_price) sum_sales - , avg(sum(ss_sales_price)) OVER (PARTITION BY i_manufact_id) avg_quarterly_sales - FROM - item - , store_sales - , date_dim - , store - WHERE (ss_item_sk = i_item_sk) - AND (ss_sold_date_sk = d_date_sk) - AND (ss_store_sk = s_store_sk) - AND (d_month_seq IN (1200 , (1200 + 1) , (1200 + 2) , (1200 + 3) , (1200 + 4) , (1200 + 5) , (1200 + 6) , (1200 + 7) , (1200 + 8) , (1200 + 9) , (1200 + 10) , (1200 + 11))) - AND (((i_category IN ('Books' , 'Children' , 'Electronics')) - AND (i_class IN ('personal' , 'portable' , 'reference' , 'self-help')) - AND (i_brand IN ('scholaramalgamalg #14' , 'scholaramalgamalg #7' , 'exportiunivamalg #9' , 'scholaramalgamalg #9'))) - OR ((i_category IN ('Women' , 'Music' , 'Men')) - AND (i_class IN ('accessories' , 'classical' , 'fragrances' , 'pants')) - AND (i_brand IN ('amalgimporto #1' , 'edu packscholar #1' , 'exportiimporto #1' , 'importoamalg #1')))) - GROUP BY i_manufact_id, d_qoy -) tmp1 -WHERE ((CASE WHEN (avg_quarterly_sales > 0) THEN (abs((CAST(sum_sales AS DECIMAL(22,4)) - avg_quarterly_sales)) / avg_quarterly_sales) ELSE null END) > CAST('0.1' AS DECIMAL(2,1))) -ORDER BY avg_quarterly_sales ASC, sum_sales ASC, i_manufact_id ASC -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q54.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q54.groovy deleted file mode 100644 index 6ce489b8e834c3..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q54.groovy +++ /dev/null @@ -1,104 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q54_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q54 """ -WITH - my_customers AS ( - SELECT DISTINCT - c_customer_sk - , c_current_addr_sk - FROM - ( - SELECT - cs_sold_date_sk sold_date_sk - , cs_bill_customer_sk customer_sk - , cs_item_sk item_sk - FROM - catalog_sales -UNION ALL SELECT - ws_sold_date_sk sold_date_sk - , ws_bill_customer_sk customer_sk - , ws_item_sk item_sk - FROM - web_sales - ) cs_or_ws_sales - , item - , date_dim - , customer - WHERE (sold_date_sk = d_date_sk) - AND (item_sk = i_item_sk) - AND (i_category = 'Women') - AND (i_class = 'maternity') - AND (c_customer_sk = cs_or_ws_sales.customer_sk) - AND (d_moy = 12) - AND (d_year = 1998) -) -, my_revenue AS ( - SELECT - c_customer_sk - , sum(ss_ext_sales_price) revenue - FROM - my_customers - , store_sales - , customer_address - , store - , date_dim - WHERE (c_current_addr_sk = ca_address_sk) - AND (ca_county = s_county) - AND (ca_state = s_state) - AND (ss_sold_date_sk = d_date_sk) - AND (c_customer_sk = ss_customer_sk) - AND (d_month_seq BETWEEN ( - SELECT DISTINCT (d_month_seq + 1) - FROM - date_dim - WHERE (d_year = 1998) - AND (d_moy = 12) - ) AND ( - SELECT DISTINCT (d_month_seq + 3) - FROM - date_dim - WHERE (d_year = 1998) - AND (d_moy = 12) - )) - GROUP BY c_customer_sk -) -, segments AS ( - SELECT CAST((revenue / 50) AS INTEGER) segment - FROM - my_revenue -) -SELECT - segment -, count(*) num_customers -, (segment * 50) segment_base -FROM - segments -GROUP BY segment -ORDER BY segment ASC, num_customers ASC -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q55.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q55.groovy deleted file mode 100644 index 53787e629e040e..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q55.groovy +++ /dev/null @@ -1,45 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q55_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q55 """ -SELECT - i_brand_id brand_id -, i_brand brand -, sum(ss_ext_sales_price) ext_price -FROM - date_dim -, store_sales -, item -WHERE (d_date_sk = ss_sold_date_sk) - AND (ss_item_sk = i_item_sk) - AND (i_manager_id = 28) - AND (d_moy = 11) - AND (d_year = 1999) -GROUP BY i_brand, i_brand_id -ORDER BY ext_price DESC, i_brand_id ASC -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q56.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q56.groovy deleted file mode 100644 index 41f38eb763b856..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q56.groovy +++ /dev/null @@ -1,117 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q56_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q56 """ -WITH - ss AS ( - SELECT - i_item_id - , sum(ss_ext_sales_price) total_sales - FROM - store_sales - , date_dim - , customer_address - , item - WHERE (i_item_id IN ( - SELECT i_item_id - FROM - item - WHERE (i_color IN ('slate' , 'blanched' , 'burnished')) - )) - AND (ss_item_sk = i_item_sk) - AND (ss_sold_date_sk = d_date_sk) - AND (d_year = 2001) - AND (d_moy = 2) - AND (ss_addr_sk = ca_address_sk) - AND (ca_gmt_offset = -5) - GROUP BY i_item_id -) -, cs AS ( - SELECT - i_item_id - , sum(cs_ext_sales_price) total_sales - FROM - catalog_sales - , date_dim - , customer_address - , item - WHERE (i_item_id IN ( - SELECT i_item_id - FROM - item - WHERE (i_color IN ('slate' , 'blanched' , 'burnished')) - )) - AND (cs_item_sk = i_item_sk) - AND (cs_sold_date_sk = d_date_sk) - AND (d_year = 2001) - AND (d_moy = 2) - AND (cs_bill_addr_sk = ca_address_sk) - AND (ca_gmt_offset = -5) - GROUP BY i_item_id -) -, ws AS ( - SELECT - i_item_id - , sum(ws_ext_sales_price) total_sales - FROM - web_sales - , date_dim - , customer_address - , item - WHERE (i_item_id IN ( - SELECT i_item_id - FROM - item - WHERE (i_color IN ('slate' , 'blanched' , 'burnished')) - )) - AND (ws_item_sk = i_item_sk) - AND (ws_sold_date_sk = d_date_sk) - AND (d_year = 2001) - AND (d_moy = 2) - AND (ws_bill_addr_sk = ca_address_sk) - AND (ca_gmt_offset = -5) - GROUP BY i_item_id -) -SELECT - i_item_id -, sum(total_sales) total_sales -FROM - ( - SELECT * - FROM - ss -UNION ALL SELECT * - FROM - cs -UNION ALL SELECT * - FROM - ws -) tmp1 -GROUP BY i_item_id -ORDER BY total_sales ASC, i_item_id ASC -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q57.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q57.groovy deleted file mode 100644 index a320a4df279cee..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q57.groovy +++ /dev/null @@ -1,87 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q57_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=100; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q57 """ -WITH - v1 AS ( - SELECT - i_category - , i_brand - , cc_name - , d_year - , d_moy - , sum(cs_sales_price) sum_sales - , avg(sum(cs_sales_price)) OVER (PARTITION BY i_category, i_brand, cc_name, d_year) avg_monthly_sales - , rank() OVER (PARTITION BY i_category, i_brand, cc_name ORDER BY d_year ASC, d_moy ASC) rn - FROM - item - , catalog_sales - , date_dim - , call_center - WHERE (cs_item_sk = i_item_sk) - AND (cs_sold_date_sk = d_date_sk) - AND (cc_call_center_sk = cs_call_center_sk) - AND ((d_year = 1999) - OR ((d_year = (1999 - 1)) - AND (d_moy = 12)) - OR ((d_year = (1999 + 1)) - AND (d_moy = 1))) - GROUP BY i_category, i_brand, cc_name, d_year, d_moy -) -, v2 AS ( - SELECT - v1.i_category - , v1.i_brand - , v1.cc_name - , v1.d_year - , v1.d_moy - , v1.avg_monthly_sales - , v1.sum_sales - , v1_lag.sum_sales psum - , v1_lead.sum_sales nsum - FROM - v1 - , v1 v1_lag - , v1 v1_lead - WHERE (v1.i_category = v1_lag.i_category) - AND (v1.i_category = v1_lead.i_category) - AND (v1.i_brand = v1_lag.i_brand) - AND (v1.i_brand = v1_lead.i_brand) - AND (v1.cc_name = v1_lag.cc_name) - AND (v1.cc_name = v1_lead.cc_name) - AND (v1.rn = (v1_lag.rn + 1)) - AND (v1.rn = (v1_lead.rn - 1)) -) -SELECT * -FROM - v2 -WHERE (d_year = 1999) - AND (avg_monthly_sales > 0) - AND ((CASE WHEN (avg_monthly_sales > 0) THEN (abs((sum_sales - avg_monthly_sales)) / avg_monthly_sales) ELSE null END) > CAST('0.1' AS DECIMAL(2,1))) -ORDER BY (sum_sales - avg_monthly_sales) ASC, 3 ASC -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q58.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q58.groovy deleted file mode 100644 index 637d632c6a651b..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q58.groovy +++ /dev/null @@ -1,122 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q58_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q58 """ -WITH - ss_items AS ( - SELECT - i_item_id item_id - , sum(ss_ext_sales_price) ss_item_rev - FROM - store_sales - , item - , date_dim - WHERE (ss_item_sk = i_item_sk) - AND (d_date IN ( - SELECT d_date - FROM - date_dim - WHERE (d_week_seq = ( - SELECT d_week_seq - FROM - date_dim - WHERE (d_date = CAST('2000-01-03' AS DATE)) - )) - )) - AND (ss_sold_date_sk = d_date_sk) - GROUP BY i_item_id -) -, cs_items AS ( - SELECT - i_item_id item_id - , sum(cs_ext_sales_price) cs_item_rev - FROM - catalog_sales - , item - , date_dim - WHERE (cs_item_sk = i_item_sk) - AND (d_date IN ( - SELECT d_date - FROM - date_dim - WHERE (d_week_seq = ( - SELECT d_week_seq - FROM - date_dim - WHERE (d_date = CAST('2000-01-03' AS DATE)) - )) - )) - AND (cs_sold_date_sk = d_date_sk) - GROUP BY i_item_id -) -, ws_items AS ( - SELECT - i_item_id item_id - , sum(ws_ext_sales_price) ws_item_rev - FROM - web_sales - , item - , date_dim - WHERE (ws_item_sk = i_item_sk) - AND (d_date IN ( - SELECT d_date - FROM - date_dim - WHERE (d_week_seq = ( - SELECT d_week_seq - FROM - date_dim - WHERE (d_date = CAST('2000-01-03' AS DATE)) - )) - )) - AND (ws_sold_date_sk = d_date_sk) - GROUP BY i_item_id -) -SELECT - ss_items.item_id -, ss_item_rev -, CAST((((ss_item_rev / ((CAST(ss_item_rev AS DECIMAL(16,7)) + cs_item_rev) + ws_item_rev)) / 3) * 100) AS DECIMAL(7,2)) ss_dev -, cs_item_rev -, CAST((((cs_item_rev / ((CAST(ss_item_rev AS DECIMAL(16,7)) + cs_item_rev) + ws_item_rev)) / 3) * 100) AS DECIMAL(7,2)) cs_dev -, ws_item_rev -, CAST((((ws_item_rev / ((CAST(ss_item_rev AS DECIMAL(16,7)) + cs_item_rev) + ws_item_rev)) / 3) * 100) AS DECIMAL(7,2)) ws_dev -, (((ss_item_rev + cs_item_rev) + ws_item_rev) / 3) average -FROM - ss_items -, cs_items -, ws_items -WHERE (ss_items.item_id = cs_items.item_id) - AND (ss_items.item_id = ws_items.item_id) - AND (ss_item_rev BETWEEN (CAST('0.9' AS DECIMAL(2,1)) * cs_item_rev) AND (CAST('1.1' AS DECIMAL(2,1)) * cs_item_rev)) - AND (ss_item_rev BETWEEN (CAST('0.9' AS DECIMAL(2,1)) * ws_item_rev) AND (CAST('1.1' AS DECIMAL(2,1)) * ws_item_rev)) - AND (cs_item_rev BETWEEN (CAST('0.9' AS DECIMAL(2,1)) * ss_item_rev) AND (CAST('1.1' AS DECIMAL(2,1)) * ss_item_rev)) - AND (cs_item_rev BETWEEN (CAST('0.9' AS DECIMAL(2,1)) * ws_item_rev) AND (CAST('1.1' AS DECIMAL(2,1)) * ws_item_rev)) - AND (ws_item_rev BETWEEN (CAST('0.9' AS DECIMAL(2,1)) * ss_item_rev) AND (CAST('1.1' AS DECIMAL(2,1)) * ss_item_rev)) - AND (ws_item_rev BETWEEN (CAST('0.9' AS DECIMAL(2,1)) * cs_item_rev) AND (CAST('1.1' AS DECIMAL(2,1)) * cs_item_rev)) -ORDER BY ss_items.item_id ASC, ss_item_rev ASC -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q59.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q59.groovy deleted file mode 100644 index eb065d22fd6700..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q59.groovy +++ /dev/null @@ -1,103 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q59_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q59 """ -WITH - wss AS ( - SELECT - d_week_seq - , ss_store_sk - , sum((CASE WHEN (d_day_name = 'Sunday') THEN ss_sales_price ELSE null END)) sun_sales - , sum((CASE WHEN (d_day_name = 'Monday') THEN ss_sales_price ELSE null END)) mon_sales - , sum((CASE WHEN (d_day_name = 'Tuesday') THEN ss_sales_price ELSE null END)) tue_sales - , sum((CASE WHEN (d_day_name = 'Wednesday') THEN ss_sales_price ELSE null END)) wed_sales - , sum((CASE WHEN (d_day_name = 'Thursday ') THEN ss_sales_price ELSE null END)) thu_sales - , sum((CASE WHEN (d_day_name = 'Friday') THEN ss_sales_price ELSE null END)) fri_sales - , sum((CASE WHEN (d_day_name = 'Saturday') THEN ss_sales_price ELSE null END)) sat_sales - FROM - store_sales - , date_dim - WHERE (d_date_sk = ss_sold_date_sk) - GROUP BY d_week_seq, ss_store_sk -) -SELECT - s_store_name1 -, s_store_id1 -, d_week_seq1 -, (sun_sales1 / sun_sales2) -, (mon_sales1 / mon_sales2) -, (tue_sales1 / tue_sales2) -, (wed_sales1 / wed_sales2) -, (thu_sales1 / thu_sales2) -, (fri_sales1 / fri_sales2) -, (sat_sales1 / sat_sales2) -FROM - ( - SELECT - s_store_name s_store_name1 - , wss.d_week_seq d_week_seq1 - , s_store_id s_store_id1 - , sun_sales sun_sales1 - , mon_sales mon_sales1 - , tue_sales tue_sales1 - , wed_sales wed_sales1 - , thu_sales thu_sales1 - , fri_sales fri_sales1 - , sat_sales sat_sales1 - FROM - wss - , store - , date_dim d - WHERE (d.d_week_seq = wss.d_week_seq) - AND (ss_store_sk = s_store_sk) - AND (d_month_seq BETWEEN 1212 AND (1212 + 11)) -) y -, ( - SELECT - s_store_name s_store_name2 - , wss.d_week_seq d_week_seq2 - , s_store_id s_store_id2 - , sun_sales sun_sales2 - , mon_sales mon_sales2 - , tue_sales tue_sales2 - , wed_sales wed_sales2 - , thu_sales thu_sales2 - , fri_sales fri_sales2 - , sat_sales sat_sales2 - FROM - wss - , store - , date_dim d - WHERE (d.d_week_seq = wss.d_week_seq) - AND (ss_store_sk = s_store_sk) - AND (d_month_seq BETWEEN (1212 + 12) AND (1212 + 23)) -) x -WHERE (s_store_id1 = s_store_id2) - AND (d_week_seq1 = (d_week_seq2 - 52)) -ORDER BY s_store_name1 ASC, s_store_id1 ASC, d_week_seq1 ASC -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q60.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q60.groovy deleted file mode 100644 index 0335d8cb589685..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q60.groovy +++ /dev/null @@ -1,117 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q60_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q60 """ -WITH - ss AS ( - SELECT - i_item_id - , sum(ss_ext_sales_price) total_sales - FROM - store_sales - , date_dim - , customer_address - , item - WHERE (i_item_id IN ( - SELECT i_item_id - FROM - item - WHERE (i_category IN ('Music')) - )) - AND (ss_item_sk = i_item_sk) - AND (ss_sold_date_sk = d_date_sk) - AND (d_year = 1998) - AND (d_moy = 9) - AND (ss_addr_sk = ca_address_sk) - AND (ca_gmt_offset = -5) - GROUP BY i_item_id -) -, cs AS ( - SELECT - i_item_id - , sum(cs_ext_sales_price) total_sales - FROM - catalog_sales - , date_dim - , customer_address - , item - WHERE (i_item_id IN ( - SELECT i_item_id - FROM - item - WHERE (i_category IN ('Music')) - )) - AND (cs_item_sk = i_item_sk) - AND (cs_sold_date_sk = d_date_sk) - AND (d_year = 1998) - AND (d_moy = 9) - AND (cs_bill_addr_sk = ca_address_sk) - AND (ca_gmt_offset = -5) - GROUP BY i_item_id -) -, ws AS ( - SELECT - i_item_id - , sum(ws_ext_sales_price) total_sales - FROM - web_sales - , date_dim - , customer_address - , item - WHERE (i_item_id IN ( - SELECT i_item_id - FROM - item - WHERE (i_category IN ('Music')) - )) - AND (ws_item_sk = i_item_sk) - AND (ws_sold_date_sk = d_date_sk) - AND (d_year = 1998) - AND (d_moy = 9) - AND (ws_bill_addr_sk = ca_address_sk) - AND (ca_gmt_offset = -5) - GROUP BY i_item_id -) -SELECT - i_item_id -, sum(total_sales) total_sales -FROM - ( - SELECT * - FROM - ss -UNION ALL SELECT * - FROM - cs -UNION ALL SELECT * - FROM - ws -) tmp1 -GROUP BY i_item_id -ORDER BY i_item_id ASC, total_sales ASC -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q61.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q61.groovy deleted file mode 100644 index 8ede55f9e0daa4..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q61.groovy +++ /dev/null @@ -1,81 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q61_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q61 """ -SELECT - promotions -, total -, ((CAST(promotions AS DECIMAL(15,4)) / CAST(total AS DECIMAL(15,4))) * 100) -FROM - ( - SELECT sum(ss_ext_sales_price) promotions - FROM - store_sales - , store - , promotion - , date_dim - , customer - , customer_address - , item - WHERE (ss_sold_date_sk = d_date_sk) - AND (ss_store_sk = s_store_sk) - AND (ss_promo_sk = p_promo_sk) - AND (ss_customer_sk = c_customer_sk) - AND (ca_address_sk = c_current_addr_sk) - AND (ss_item_sk = i_item_sk) - AND (ca_gmt_offset = -5) - AND (i_category = 'Jewelry') - AND ((p_channel_dmail = 'Y') - OR (p_channel_email = 'Y') - OR (p_channel_tv = 'Y')) - AND (s_gmt_offset = -5) - AND (d_year = 1998) - AND (d_moy = 11) -) promotional_sales -, ( - SELECT sum(ss_ext_sales_price) total - FROM - store_sales - , store - , date_dim - , customer - , customer_address - , item - WHERE (ss_sold_date_sk = d_date_sk) - AND (ss_store_sk = s_store_sk) - AND (ss_customer_sk = c_customer_sk) - AND (ca_address_sk = c_current_addr_sk) - AND (ss_item_sk = i_item_sk) - AND (ca_gmt_offset = -5) - AND (i_category = 'Jewelry') - AND (s_gmt_offset = -5) - AND (d_year = 1998) - AND (d_moy = 11) -) all_sales -ORDER BY promotions ASC, total ASC -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q62.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q62.groovy deleted file mode 100644 index 4190b32d43be87..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q62.groovy +++ /dev/null @@ -1,55 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q62_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q62 """ -SELECT - substr(w_warehouse_name, 1, 20) -, sm_type -, web_name -, sum((CASE WHEN ((ws_ship_date_sk - ws_sold_date_sk) <= 30) THEN 1 ELSE 0 END)) '30 days' -, sum((CASE WHEN ((ws_ship_date_sk - ws_sold_date_sk) > 30) - AND ((ws_ship_date_sk - ws_sold_date_sk) <= 60) THEN 1 ELSE 0 END)) '31-60 days' -, sum((CASE WHEN ((ws_ship_date_sk - ws_sold_date_sk) > 60) - AND ((ws_ship_date_sk - ws_sold_date_sk) <= 90) THEN 1 ELSE 0 END)) '61-90 days' -, sum((CASE WHEN ((ws_ship_date_sk - ws_sold_date_sk) > 90) - AND ((ws_ship_date_sk - ws_sold_date_sk) <= 120) THEN 1 ELSE 0 END)) '91-120 days' -, sum((CASE WHEN ((ws_ship_date_sk - ws_sold_date_sk) > 120) THEN 1 ELSE 0 END)) '>120 days' -FROM - web_sales -, warehouse -, ship_mode -, web_site -, date_dim -WHERE (d_month_seq BETWEEN 1200 AND (1200 + 11)) - AND (ws_ship_date_sk = d_date_sk) - AND (ws_warehouse_sk = w_warehouse_sk) - AND (ws_ship_mode_sk = sm_ship_mode_sk) - AND (ws_web_site_sk = web_site_sk) -GROUP BY substr(w_warehouse_name, 1, 20), sm_type, web_name -ORDER BY substr(w_warehouse_name, 1, 20) ASC, sm_type ASC, web_name ASC -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q63.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q63.groovy deleted file mode 100644 index 079e8ed610089f..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q63.groovy +++ /dev/null @@ -1,56 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q63_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q63 """ -SELECT * -FROM - ( - SELECT - i_manager_id - , sum(ss_sales_price) sum_sales - , avg(sum(ss_sales_price)) OVER (PARTITION BY i_manager_id) avg_monthly_sales - FROM - item - , store_sales - , date_dim - , store - WHERE (ss_item_sk = i_item_sk) - AND (ss_sold_date_sk = d_date_sk) - AND (ss_store_sk = s_store_sk) - AND (d_month_seq IN (1200 , (1200 + 1) , (1200 + 2) , (1200 + 3) , (1200 + 4) , (1200 + 5) , (1200 + 6) , (1200 + 7) , (1200 + 8) , (1200 + 9) , (1200 + 10) , (1200 + 11))) - AND (((i_category IN ('Books' , 'Children' , 'Electronics')) - AND (i_class IN ('personal' , 'portable' , 'refernece' , 'self-help')) - AND (i_brand IN ('scholaramalgamalg #14' , 'scholaramalgamalg #7' , 'exportiunivamalg #9' , 'scholaramalgamalg #9'))) - OR ((i_category IN ('Women' , 'Music' , 'Men')) - AND (i_class IN ('accessories' , 'classical' , 'fragrances' , 'pants')) - AND (i_brand IN ('amalgimporto #1' , 'edu packscholar #1' , 'exportiimporto #1' , 'importoamalg #1')))) - GROUP BY i_manager_id, d_moy -) tmp1 -WHERE ((CASE WHEN (avg_monthly_sales > 0) THEN (abs((sum_sales - avg_monthly_sales)) / avg_monthly_sales) ELSE null END) > CAST('0.1' AS DECIMAL(2,1))) -ORDER BY i_manager_id ASC, avg_monthly_sales ASC, sum_sales ASC -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q64.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q64.groovy deleted file mode 100644 index b3ae5ad3caba77..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q64.groovy +++ /dev/null @@ -1,139 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q64_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=100; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q64 """ -WITH - cs_ui AS ( - SELECT - cs_item_sk - , sum(cs_ext_list_price) sale - , sum(((cr_refunded_cash + cr_reversed_charge) + cr_store_credit)) refund - FROM - catalog_sales - , catalog_returns - WHERE (cs_item_sk = cr_item_sk) - AND (cs_order_number = cr_order_number) - GROUP BY cs_item_sk - HAVING (sum(cs_ext_list_price) > (2 * sum(((cr_refunded_cash + cr_reversed_charge) + cr_store_credit)))) -) -, cross_sales AS ( - SELECT - i_product_name product_name - , i_item_sk item_sk - , s_store_name store_name - , s_zip store_zip - , ad1.ca_street_number b_street_number - , ad1.ca_street_name b_street_name - , ad1.ca_city b_city - , ad1.ca_zip b_zip - , ad2.ca_street_number c_street_number - , ad2.ca_street_name c_street_name - , ad2.ca_city c_city - , ad2.ca_zip c_zip - , d1.d_year syear - , d2.d_year fsyear - , d3.d_year s2year - , count(*) cnt - , sum(ss_wholesale_cost) s1 - , sum(ss_list_price) s2 - , sum(ss_coupon_amt) s3 - FROM - store_sales - , store_returns - , cs_ui - , date_dim d1 - , date_dim d2 - , date_dim d3 - , store - , customer - , customer_demographics cd1 - , customer_demographics cd2 - , promotion - , household_demographics hd1 - , household_demographics hd2 - , customer_address ad1 - , customer_address ad2 - , income_band ib1 - , income_band ib2 - , item - WHERE (ss_store_sk = s_store_sk) - AND (ss_sold_date_sk = d1.d_date_sk) - AND (ss_customer_sk = c_customer_sk) - AND (ss_cdemo_sk = cd1.cd_demo_sk) - AND (ss_hdemo_sk = hd1.hd_demo_sk) - AND (ss_addr_sk = ad1.ca_address_sk) - AND (ss_item_sk = i_item_sk) - AND (ss_item_sk = sr_item_sk) - AND (ss_ticket_number = sr_ticket_number) - AND (ss_item_sk = cs_ui.cs_item_sk) - AND (c_current_cdemo_sk = cd2.cd_demo_sk) - AND (c_current_hdemo_sk = hd2.hd_demo_sk) - AND (c_current_addr_sk = ad2.ca_address_sk) - AND (c_first_sales_date_sk = d2.d_date_sk) - AND (c_first_shipto_date_sk = d3.d_date_sk) - AND (ss_promo_sk = p_promo_sk) - AND (hd1.hd_income_band_sk = ib1.ib_income_band_sk) - AND (hd2.hd_income_band_sk = ib2.ib_income_band_sk) - AND (cd1.cd_marital_status <> cd2.cd_marital_status) - AND (i_color IN ('purple' , 'burlywood' , 'indian' , 'spring' , 'floral' , 'medium')) - AND (i_current_price BETWEEN 64 AND (64 + 10)) - AND (i_current_price BETWEEN (64 + 1) AND (64 + 15)) - GROUP BY i_product_name, i_item_sk, s_store_name, s_zip, ad1.ca_street_number, ad1.ca_street_name, ad1.ca_city, ad1.ca_zip, ad2.ca_street_number, ad2.ca_street_name, ad2.ca_city, ad2.ca_zip, d1.d_year, d2.d_year, d3.d_year -) -SELECT - cs1.product_name -, cs1.store_name -, cs1.store_zip -, cs1.b_street_number -, cs1.b_street_name -, cs1.b_city -, cs1.b_zip -, cs1.c_street_number -, cs1.c_street_name -, cs1.c_city -, cs1.c_zip -, cs1.syear -, cs1.cnt -, cs1.s1 s11 -, cs1.s2 s21 -, cs1.s3 s31 -, cs2.s1 s12 -, cs2.s2 s22 -, cs2.s3 s32 -, cs2.syear -, cs2.cnt -FROM - cross_sales cs1 -, cross_sales cs2 -WHERE (cs1.item_sk = cs2.item_sk) - AND (cs1.syear = 1999) - AND (cs2.syear = (1999 + 1)) - AND (cs2.cnt <= cs1.cnt) - AND (cs1.store_name = cs2.store_name) - AND (cs1.store_zip = cs2.store_zip) -ORDER BY cs1.product_name ASC, cs1.store_name ASC, cs2.cnt ASC, 14, 15, 16, 17, 18 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q65.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q65.groovy deleted file mode 100644 index 132e6b0bfaaa32..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q65.groovy +++ /dev/null @@ -1,76 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q65_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q65 """ -SELECT - s_store_name -, i_item_desc -, sc.revenue -, i_current_price -, i_wholesale_cost -, i_brand -FROM - store -, item -, ( - SELECT - ss_store_sk - , avg(revenue) ave - FROM - ( - SELECT - ss_store_sk - , ss_item_sk - , sum(ss_sales_price) revenue - FROM - store_sales - , date_dim - WHERE (ss_sold_date_sk = d_date_sk) - AND (d_month_seq BETWEEN 1176 AND (1176 + 11)) - GROUP BY ss_store_sk, ss_item_sk - ) sa - GROUP BY ss_store_sk -) sb -, ( - SELECT - ss_store_sk - , ss_item_sk - , sum(ss_sales_price) revenue - FROM - store_sales - , date_dim - WHERE (ss_sold_date_sk = d_date_sk) - AND (d_month_seq BETWEEN 1176 AND (1176 + 11)) - GROUP BY ss_store_sk, ss_item_sk -) sc -WHERE (sb.ss_store_sk = sc.ss_store_sk) - AND (sc.revenue <= (CAST('0.1' AS DECIMAL(2,1)) * sb.ave)) - AND (s_store_sk = sc.ss_store_sk) - AND (i_item_sk = sc.ss_item_sk) -ORDER BY s_store_name ASC, i_item_desc ASC -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q66.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q66.groovy deleted file mode 100644 index e91825e267f524..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q66.groovy +++ /dev/null @@ -1,175 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q66_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q66 """ -SELECT - w_warehouse_name -, w_warehouse_sq_ft -, w_city -, w_county -, w_state -, w_country -, ship_carriers -, year -, sum(jan_sales) jan_sales -, sum(feb_sales) feb_sales -, sum(mar_sales) mar_sales -, sum(apr_sales) apr_sales -, sum(may_sales) may_sales -, sum(jun_sales) jun_sales -, sum(jul_sales) jul_sales -, sum(aug_sales) aug_sales -, sum(sep_sales) sep_sales -, sum(oct_sales) oct_sales -, sum(nov_sales) nov_sales -, sum(dec_sales) dec_sales -, sum((jan_sales / w_warehouse_sq_ft)) jan_sales_per_sq_foot -, sum((feb_sales / w_warehouse_sq_ft)) feb_sales_per_sq_foot -, sum((mar_sales / w_warehouse_sq_ft)) mar_sales_per_sq_foot -, sum((apr_sales / w_warehouse_sq_ft)) apr_sales_per_sq_foot -, sum((may_sales / w_warehouse_sq_ft)) may_sales_per_sq_foot -, sum((jun_sales / w_warehouse_sq_ft)) jun_sales_per_sq_foot -, sum((jul_sales / w_warehouse_sq_ft)) jul_sales_per_sq_foot -, sum((aug_sales / w_warehouse_sq_ft)) aug_sales_per_sq_foot -, sum((sep_sales / w_warehouse_sq_ft)) sep_sales_per_sq_foot -, sum((oct_sales / w_warehouse_sq_ft)) oct_sales_per_sq_foot -, sum((nov_sales / w_warehouse_sq_ft)) nov_sales_per_sq_foot -, sum((dec_sales / w_warehouse_sq_ft)) dec_sales_per_sq_foot -, sum(jan_net) jan_net -, sum(feb_net) feb_net -, sum(mar_net) mar_net -, sum(apr_net) apr_net -, sum(may_net) may_net -, sum(jun_net) jun_net -, sum(jul_net) jul_net -, sum(aug_net) aug_net -, sum(sep_net) sep_net -, sum(oct_net) oct_net -, sum(nov_net) nov_net -, sum(dec_net) dec_net -FROM -( - SELECT - w_warehouse_name - , w_warehouse_sq_ft - , w_city - , w_county - , w_state - , w_country - , concat(concat('DHL', ','), 'BARIAN') ship_carriers - , d_year YEAR - , sum((CASE WHEN (d_moy = 1) THEN (ws_ext_sales_price * ws_quantity) ELSE 0 END)) jan_sales - , sum((CASE WHEN (d_moy = 2) THEN (ws_ext_sales_price * ws_quantity) ELSE 0 END)) feb_sales - , sum((CASE WHEN (d_moy = 3) THEN (ws_ext_sales_price * ws_quantity) ELSE 0 END)) mar_sales - , sum((CASE WHEN (d_moy = 4) THEN (ws_ext_sales_price * ws_quantity) ELSE 0 END)) apr_sales - , sum((CASE WHEN (d_moy = 5) THEN (ws_ext_sales_price * ws_quantity) ELSE 0 END)) may_sales - , sum((CASE WHEN (d_moy = 6) THEN (ws_ext_sales_price * ws_quantity) ELSE 0 END)) jun_sales - , sum((CASE WHEN (d_moy = 7) THEN (ws_ext_sales_price * ws_quantity) ELSE 0 END)) jul_sales - , sum((CASE WHEN (d_moy = 8) THEN (ws_ext_sales_price * ws_quantity) ELSE 0 END)) aug_sales - , sum((CASE WHEN (d_moy = 9) THEN (ws_ext_sales_price * ws_quantity) ELSE 0 END)) sep_sales - , sum((CASE WHEN (d_moy = 10) THEN (ws_ext_sales_price * ws_quantity) ELSE 0 END)) oct_sales - , sum((CASE WHEN (d_moy = 11) THEN (ws_ext_sales_price * ws_quantity) ELSE 0 END)) nov_sales - , sum((CASE WHEN (d_moy = 12) THEN (ws_ext_sales_price * ws_quantity) ELSE 0 END)) dec_sales - , sum((CASE WHEN (d_moy = 1) THEN (ws_net_paid * ws_quantity) ELSE 0 END)) jan_net - , sum((CASE WHEN (d_moy = 2) THEN (ws_net_paid * ws_quantity) ELSE 0 END)) feb_net - , sum((CASE WHEN (d_moy = 3) THEN (ws_net_paid * ws_quantity) ELSE 0 END)) mar_net - , sum((CASE WHEN (d_moy = 4) THEN (ws_net_paid * ws_quantity) ELSE 0 END)) apr_net - , sum((CASE WHEN (d_moy = 5) THEN (ws_net_paid * ws_quantity) ELSE 0 END)) may_net - , sum((CASE WHEN (d_moy = 6) THEN (ws_net_paid * ws_quantity) ELSE 0 END)) jun_net - , sum((CASE WHEN (d_moy = 7) THEN (ws_net_paid * ws_quantity) ELSE 0 END)) jul_net - , sum((CASE WHEN (d_moy = 8) THEN (ws_net_paid * ws_quantity) ELSE 0 END)) aug_net - , sum((CASE WHEN (d_moy = 9) THEN (ws_net_paid * ws_quantity) ELSE 0 END)) sep_net - , sum((CASE WHEN (d_moy = 10) THEN (ws_net_paid * ws_quantity) ELSE 0 END)) oct_net - , sum((CASE WHEN (d_moy = 11) THEN (ws_net_paid * ws_quantity) ELSE 0 END)) nov_net - , sum((CASE WHEN (d_moy = 12) THEN (ws_net_paid * ws_quantity) ELSE 0 END)) dec_net - FROM - web_sales - , warehouse - , date_dim - , time_dim - , ship_mode - WHERE (ws_warehouse_sk = w_warehouse_sk) - AND (ws_sold_date_sk = d_date_sk) - AND (ws_sold_time_sk = t_time_sk) - AND (ws_ship_mode_sk = sm_ship_mode_sk) - AND (d_year = 2001) - AND (t_time BETWEEN 30838 AND (30838 + 28800)) - AND (sm_carrier IN ('DHL' , 'BARIAN')) - GROUP BY w_warehouse_name, w_warehouse_sq_ft, w_city, w_county, w_state, w_country, d_year - UNION ALL - SELECT - w_warehouse_name - , w_warehouse_sq_ft - , w_city - , w_county - , w_state - , w_country - , concat(concat('DHL', ','), 'BARIAN') ship_carriers - , d_year YEAR - , sum((CASE WHEN (d_moy = 1) THEN (cs_sales_price * cs_quantity) ELSE 0 END)) jan_sales - , sum((CASE WHEN (d_moy = 2) THEN (cs_sales_price * cs_quantity) ELSE 0 END)) feb_sales - , sum((CASE WHEN (d_moy = 3) THEN (cs_sales_price * cs_quantity) ELSE 0 END)) mar_sales - , sum((CASE WHEN (d_moy = 4) THEN (cs_sales_price * cs_quantity) ELSE 0 END)) apr_sales - , sum((CASE WHEN (d_moy = 5) THEN (cs_sales_price * cs_quantity) ELSE 0 END)) may_sales - , sum((CASE WHEN (d_moy = 6) THEN (cs_sales_price * cs_quantity) ELSE 0 END)) jun_sales - , sum((CASE WHEN (d_moy = 7) THEN (cs_sales_price * cs_quantity) ELSE 0 END)) jul_sales - , sum((CASE WHEN (d_moy = 8) THEN (cs_sales_price * cs_quantity) ELSE 0 END)) aug_sales - , sum((CASE WHEN (d_moy = 9) THEN (cs_sales_price * cs_quantity) ELSE 0 END)) sep_sales - , sum((CASE WHEN (d_moy = 10) THEN (cs_sales_price * cs_quantity) ELSE 0 END)) oct_sales - , sum((CASE WHEN (d_moy = 11) THEN (cs_sales_price * cs_quantity) ELSE 0 END)) nov_sales - , sum((CASE WHEN (d_moy = 12) THEN (cs_sales_price * cs_quantity) ELSE 0 END)) dec_sales - , sum((CASE WHEN (d_moy = 1) THEN (cs_net_paid_inc_tax * cs_quantity) ELSE 0 END)) jan_net - , sum((CASE WHEN (d_moy = 2) THEN (cs_net_paid_inc_tax * cs_quantity) ELSE 0 END)) feb_net - , sum((CASE WHEN (d_moy = 3) THEN (cs_net_paid_inc_tax * cs_quantity) ELSE 0 END)) mar_net - , sum((CASE WHEN (d_moy = 4) THEN (cs_net_paid_inc_tax * cs_quantity) ELSE 0 END)) apr_net - , sum((CASE WHEN (d_moy = 5) THEN (cs_net_paid_inc_tax * cs_quantity) ELSE 0 END)) may_net - , sum((CASE WHEN (d_moy = 6) THEN (cs_net_paid_inc_tax * cs_quantity) ELSE 0 END)) jun_net - , sum((CASE WHEN (d_moy = 7) THEN (cs_net_paid_inc_tax * cs_quantity) ELSE 0 END)) jul_net - , sum((CASE WHEN (d_moy = 8) THEN (cs_net_paid_inc_tax * cs_quantity) ELSE 0 END)) aug_net - , sum((CASE WHEN (d_moy = 9) THEN (cs_net_paid_inc_tax * cs_quantity) ELSE 0 END)) sep_net - , sum((CASE WHEN (d_moy = 10) THEN (cs_net_paid_inc_tax * cs_quantity) ELSE 0 END)) oct_net - , sum((CASE WHEN (d_moy = 11) THEN (cs_net_paid_inc_tax * cs_quantity) ELSE 0 END)) nov_net - , sum((CASE WHEN (d_moy = 12) THEN (cs_net_paid_inc_tax * cs_quantity) ELSE 0 END)) dec_net - FROM - catalog_sales - , warehouse - , date_dim - , time_dim - , ship_mode - WHERE (cs_warehouse_sk = w_warehouse_sk) - AND (cs_sold_date_sk = d_date_sk) - AND (cs_sold_time_sk = t_time_sk) - AND (cs_ship_mode_sk = sm_ship_mode_sk) - AND (d_year = 2001) - AND (t_time BETWEEN 30838 AND (30838 + 28800)) - AND (sm_carrier IN ('DHL' , 'BARIAN')) - GROUP BY w_warehouse_name, w_warehouse_sq_ft, w_city, w_county, w_state, w_country, d_year - ) x -GROUP BY w_warehouse_name, w_warehouse_sq_ft, w_city, w_county, w_state, w_country, ship_carriers, year -ORDER BY w_warehouse_name ASC -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q67.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q67.groovy deleted file mode 100644 index a51232f4da46a0..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q67.groovy +++ /dev/null @@ -1,70 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q67_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q67 """ -SELECT * -FROM - ( - SELECT - i_category - , i_class - , i_brand - , i_product_name - , d_year - , d_qoy - , d_moy - , s_store_id - , sumsales - , rank() OVER (PARTITION BY i_category ORDER BY sumsales DESC) rk - FROM - ( - SELECT - i_category - , i_class - , i_brand - , i_product_name - , d_year - , d_qoy - , d_moy - , s_store_id - , sum(COALESCE((ss_sales_price * ss_quantity), 0)) sumsales - FROM - store_sales - , date_dim - , store - , item - WHERE (ss_sold_date_sk = d_date_sk) - AND (ss_item_sk = i_item_sk) - AND (ss_store_sk = s_store_sk) - AND (d_month_seq BETWEEN 1200 AND (1200 + 11)) - GROUP BY ROLLUP (i_category, i_class, i_brand, i_product_name, d_year, d_qoy, d_moy, s_store_id) - ) dw1 -) dw2 -WHERE (rk <= 100) -ORDER BY i_category ASC, i_class ASC, i_brand ASC, i_product_name ASC, d_year ASC, d_qoy ASC, d_moy ASC, s_store_id ASC, sumsales ASC, rk ASC -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q68.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q68.groovy deleted file mode 100644 index d52f42c6ee58ab..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q68.groovy +++ /dev/null @@ -1,71 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q68_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q68 """ -SELECT - c_last_name -, c_first_name -, ca_city -, bought_city -, ss_ticket_number -, extended_price -, extended_tax -, list_price -FROM - ( - SELECT - ss_ticket_number - , ss_customer_sk - , ca_city bought_city - , sum(ss_ext_sales_price) extended_price - , sum(ss_ext_list_price) list_price - , sum(ss_ext_tax) extended_tax - FROM - store_sales - , date_dim - , store - , household_demographics - , customer_address - WHERE (store_sales.ss_sold_date_sk = date_dim.d_date_sk) - AND (store_sales.ss_store_sk = store.s_store_sk) - AND (store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk) - AND (store_sales.ss_addr_sk = customer_address.ca_address_sk) - AND (date_dim.d_dom BETWEEN 1 AND 2) - AND ((household_demographics.hd_dep_count = 4) - OR (household_demographics.hd_vehicle_count = 3)) - AND (date_dim.d_year IN (1999 , (1999 + 1) , (1999 + 2))) - AND (store.s_city IN ('Midway' , 'Fairview')) - GROUP BY ss_ticket_number, ss_customer_sk, ss_addr_sk, ca_city -) dn -, customer -, customer_address current_addr -WHERE (ss_customer_sk = c_customer_sk) - AND (customer.c_current_addr_sk = current_addr.ca_address_sk) - AND (current_addr.ca_city <> bought_city) -ORDER BY c_last_name ASC, ss_ticket_number ASC -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q69.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q69.groovy deleted file mode 100644 index 36bc9171c91d70..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q69.groovy +++ /dev/null @@ -1,78 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q69_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q69 """ -SELECT - cd_gender -, cd_marital_status -, cd_education_status -, count(*) cnt1 -, cd_purchase_estimate -, count(*) cnt2 -, cd_credit_rating -, count(*) cnt3 -FROM - customer c -, customer_address ca -, customer_demographics -WHERE (c.c_current_addr_sk = ca.ca_address_sk) - AND (ca_state IN ('KY', 'GA', 'NM')) - AND (cd_demo_sk = c.c_current_cdemo_sk) - AND (EXISTS ( - SELECT * - FROM - store_sales - , date_dim - WHERE (c.c_customer_sk = ss_customer_sk) - AND (ss_sold_date_sk = d_date_sk) - AND (d_year = 2001) - AND (d_moy BETWEEN 4 AND (4 + 2)) -)) - AND (NOT (EXISTS ( - SELECT * - FROM - web_sales - , date_dim - WHERE (c.c_customer_sk = ws_bill_customer_sk) - AND (ws_sold_date_sk = d_date_sk) - AND (d_year = 2001) - AND (d_moy BETWEEN 4 AND (4 + 2)) -))) - AND (NOT (EXISTS ( - SELECT * - FROM - catalog_sales - , date_dim - WHERE (c.c_customer_sk = cs_ship_customer_sk) - AND (cs_sold_date_sk = d_date_sk) - AND (d_year = 2001) - AND (d_moy BETWEEN 4 AND (4 + 2)) -))) -GROUP BY cd_gender, cd_marital_status, cd_education_status, cd_purchase_estimate, cd_credit_rating -ORDER BY cd_gender ASC, cd_marital_status ASC, cd_education_status ASC, cd_purchase_estimate ASC, cd_credit_rating ASC -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q70.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q70.groovy deleted file mode 100644 index 4382906f148a59..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q70.groovy +++ /dev/null @@ -1,63 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q70_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q70 """ -SELECT - sum(ss_net_profit) total_sum -, s_state -, s_county -, (GROUPING (s_state) + GROUPING (s_county)) lochierarchy -, rank() OVER (PARTITION BY (GROUPING (s_state) + GROUPING (s_county)), (CASE WHEN (GROUPING (s_county) = 0) THEN s_state END) ORDER BY sum(ss_net_profit) DESC) rank_within_parent -FROM - store_sales -, date_dim d1 -, store -WHERE (d1.d_month_seq BETWEEN 1200 AND (1200 + 11)) - AND (d1.d_date_sk = ss_sold_date_sk) - AND (s_store_sk = ss_store_sk) - AND (s_state IN ( - SELECT s_state - FROM - ( - SELECT - s_state s_state - , rank() OVER (PARTITION BY s_state ORDER BY sum(ss_net_profit) DESC) ranking - FROM - store_sales - , store - , date_dim - WHERE (d_month_seq BETWEEN 1200 AND (1200 + 11)) - AND (d_date_sk = ss_sold_date_sk) - AND (s_store_sk = ss_store_sk) - GROUP BY s_state - ) tmp1 - WHERE (ranking <= 5) -)) -GROUP BY ROLLUP (s_state, s_county) -ORDER BY lochierarchy DESC, (CASE WHEN (lochierarchy = 0) THEN s_state END) ASC, rank_within_parent ASC -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q71.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q71.groovy deleted file mode 100644 index 40d0940e0af17a..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q71.groovy +++ /dev/null @@ -1,80 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q71_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q71 """ -SELECT - i_brand_id brand_id -, i_brand brand -, t_hour -, t_minute -, sum(ext_price) ext_price -FROM - item -, ( - SELECT - ws_ext_sales_price ext_price - , ws_sold_date_sk sold_date_sk - , ws_item_sk sold_item_sk - , ws_sold_time_sk time_sk - FROM - web_sales - , date_dim - WHERE (d_date_sk = ws_sold_date_sk) - AND (d_moy = 11) - AND (d_year = 1999) -UNION ALL SELECT - cs_ext_sales_price ext_price - , cs_sold_date_sk sold_date_sk - , cs_item_sk sold_item_sk - , cs_sold_time_sk time_sk - FROM - catalog_sales - , date_dim - WHERE (d_date_sk = cs_sold_date_sk) - AND (d_moy = 11) - AND (d_year = 1999) -UNION ALL SELECT - ss_ext_sales_price ext_price - , ss_sold_date_sk sold_date_sk - , ss_item_sk sold_item_sk - , ss_sold_time_sk time_sk - FROM - store_sales - , date_dim - WHERE (d_date_sk = ss_sold_date_sk) - AND (d_moy = 11) - AND (d_year = 1999) -) tmp -, time_dim -WHERE (sold_item_sk = i_item_sk) - AND (i_manager_id = 1) - AND (time_sk = t_time_sk) - AND ((t_meal_time = 'breakfast') - OR (t_meal_time = 'dinner')) -GROUP BY i_brand, i_brand_id, t_hour, t_minute -ORDER BY ext_price DESC, i_brand_id ASC -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q72.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q72.groovy deleted file mode 100644 index 54b04396fd5d2d..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q72.groovy +++ /dev/null @@ -1,61 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q72_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ -/* - qt_q72 """ --- For ASAN build, it will take too long time to run q72, disable for now -SELECT - i_item_desc -, w_warehouse_name -, d1.d_week_seq -, sum((CASE WHEN (p_promo_sk IS NULL) THEN 1 ELSE 0 END)) no_promo -, sum((CASE WHEN (p_promo_sk IS NOT NULL) THEN 1 ELSE 0 END)) promo -, count(*) total_cnt -FROM - catalog_sales -INNER JOIN inventory ON (cs_item_sk = inv_item_sk) -INNER JOIN warehouse ON (w_warehouse_sk = inv_warehouse_sk) -INNER JOIN item ON (i_item_sk = cs_item_sk) -INNER JOIN customer_demographics ON (cs_bill_cdemo_sk = cd_demo_sk) -INNER JOIN household_demographics ON (cs_bill_hdemo_sk = hd_demo_sk) -INNER JOIN date_dim d1 ON (cs_sold_date_sk = d1.d_date_sk) -INNER JOIN date_dim d2 ON (inv_date_sk = d2.d_date_sk) -INNER JOIN date_dim d3 ON (cs_ship_date_sk = d3.d_date_sk) -LEFT JOIN promotion ON (cs_promo_sk = p_promo_sk) -LEFT JOIN catalog_returns ON (cr_item_sk = cs_item_sk) - AND (cr_order_number = cs_order_number) -WHERE (d1.d_week_seq = d2.d_week_seq) - AND (inv_quantity_on_hand < cs_quantity) - AND (d3.d_date > (d1.d_date + INTERVAL '5' DAY)) - AND (hd_buy_potential = '>10000') - AND (d1.d_year = 1999) - AND (cd_marital_status = 'D') -GROUP BY i_item_desc, w_warehouse_name, d1.d_week_seq -ORDER BY total_cnt DESC, i_item_desc ASC, w_warehouse_name ASC, d1.d_week_seq ASC -LIMIT 100 -""" -*/ -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q73.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q73.groovy deleted file mode 100644 index e6d36b6d3a46c5..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q73.groovy +++ /dev/null @@ -1,63 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q73_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q73 """ -SELECT - c_last_name -, c_first_name -, c_salutation -, c_preferred_cust_flag -, ss_ticket_number -, cnt -FROM - ( - SELECT - ss_ticket_number - , ss_customer_sk - , count(*) cnt - FROM - store_sales - , date_dim - , store - , household_demographics - WHERE (store_sales.ss_sold_date_sk = date_dim.d_date_sk) - AND (store_sales.ss_store_sk = store.s_store_sk) - AND (store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk) - AND (date_dim.d_dom BETWEEN 1 AND 2) - AND ((household_demographics.hd_buy_potential = '>10000') - OR (household_demographics.hd_buy_potential = 'Unknown')) - AND (household_demographics.hd_vehicle_count > 0) - AND ((CASE WHEN (household_demographics.hd_vehicle_count > 0) THEN (CAST(household_demographics.hd_dep_count AS DECIMAL(7,2)) / household_demographics.hd_vehicle_count) ELSE null END) > 1) - AND (date_dim.d_year IN (1999 , (1999 + 1) , (1999 + 2))) - AND (store.s_county IN ('Williamson County' , 'Franklin Parish' , 'Bronx County' , 'Orange County')) - GROUP BY ss_ticket_number, ss_customer_sk -) dj -, customer -WHERE (ss_customer_sk = c_customer_sk) - AND (cnt BETWEEN 1 AND 5) -ORDER BY cnt DESC, c_last_name ASC -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q74.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q74.groovy deleted file mode 100644 index ce8fea2afd4378..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q74.groovy +++ /dev/null @@ -1,87 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q74_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q74 """ -WITH - year_total AS ( - SELECT - c_customer_id customer_id - , c_first_name customer_first_name - , c_last_name customer_last_name - , d_year YEAR - , sum(ss_net_paid) year_total - , 's' sale_type - FROM - customer - , store_sales - , date_dim - WHERE (c_customer_sk = ss_customer_sk) - AND (ss_sold_date_sk = d_date_sk) - AND (d_year IN (2001 , (2001 + 1))) - GROUP BY c_customer_id, c_first_name, c_last_name, d_year -UNION ALL SELECT - c_customer_id customer_id - , c_first_name customer_first_name - , c_last_name customer_last_name - , d_year YEAR - , sum(ws_net_paid) year_total - , 'w' sale_type - FROM - customer - , web_sales - , date_dim - WHERE (c_customer_sk = ws_bill_customer_sk) - AND (ws_sold_date_sk = d_date_sk) - AND (d_year IN (2001 , (2001 + 1))) - GROUP BY c_customer_id, c_first_name, c_last_name, d_year -) -SELECT - t_s_secyear.customer_id -, t_s_secyear.customer_first_name -, t_s_secyear.customer_last_name -FROM - year_total t_s_firstyear -, year_total t_s_secyear -, year_total t_w_firstyear -, year_total t_w_secyear -WHERE (t_s_secyear.customer_id = t_s_firstyear.customer_id) - AND (t_s_firstyear.customer_id = t_w_secyear.customer_id) - AND (t_s_firstyear.customer_id = t_w_firstyear.customer_id) - AND (t_s_firstyear.sale_type = 's') - AND (t_w_firstyear.sale_type = 'w') - AND (t_s_secyear.sale_type = 's') - AND (t_w_secyear.sale_type = 'w') - AND (t_s_firstyear.year = 2001) - AND (t_s_secyear.year = (2001 + 1)) - AND (t_w_firstyear.year = 2001) - AND (t_w_secyear.year = (2001 + 1)) - AND (t_s_firstyear.year_total > 0) - AND (t_w_firstyear.year_total > 0) - AND ((CASE WHEN (t_w_firstyear.year_total > 0) THEN (t_w_secyear.year_total / t_w_firstyear.year_total) ELSE null END) > (CASE WHEN (t_s_firstyear.year_total > 0) THEN (t_s_secyear.year_total / t_s_firstyear.year_total) ELSE null END)) -ORDER BY 1 ASC, 1 ASC, 1 ASC -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q75.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q75.groovy deleted file mode 100644 index 7d795447d73756..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q75.groovy +++ /dev/null @@ -1,112 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q75_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=100; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q75 """ -WITH - all_sales AS ( - SELECT - d_year - , i_brand_id - , i_class_id - , i_category_id - , i_manufact_id - , sum(sales_cnt) sales_cnt - , sum(sales_amt) sales_amt - FROM - ( - SELECT - d_year - , i_brand_id - , i_class_id - , i_category_id - , i_manufact_id - , (cs_quantity - COALESCE(cr_return_quantity, 0)) sales_cnt - , (cs_ext_sales_price - COALESCE(cr_return_amount, CAST('0.0' AS DECIMAL(2,1)))) sales_amt - FROM - catalog_sales - INNER JOIN item ON (i_item_sk = cs_item_sk) - INNER JOIN date_dim ON (d_date_sk = cs_sold_date_sk) - LEFT JOIN catalog_returns ON (cs_order_number = cr_order_number) - AND (cs_item_sk = cr_item_sk) - WHERE (i_category = 'Books') -UNION SELECT - d_year - , i_brand_id - , i_class_id - , i_category_id - , i_manufact_id - , (ss_quantity - COALESCE(sr_return_quantity, 0)) sales_cnt - , (ss_ext_sales_price - COALESCE(sr_return_amt, CAST('0.0' AS DECIMAL(2,1)))) sales_amt - FROM - store_sales - INNER JOIN item ON (i_item_sk = ss_item_sk) - INNER JOIN date_dim ON (d_date_sk = ss_sold_date_sk) - LEFT JOIN store_returns ON (ss_ticket_number = sr_ticket_number) - AND (ss_item_sk = sr_item_sk) - WHERE (i_category = 'Books') -UNION SELECT - d_year - , i_brand_id - , i_class_id - , i_category_id - , i_manufact_id - , (ws_quantity - COALESCE(wr_return_quantity, 0)) sales_cnt - , (ws_ext_sales_price - COALESCE(wr_return_amt, CAST('0.0' AS DECIMAL(2,1)))) sales_amt - FROM - web_sales - INNER JOIN item ON (i_item_sk = ws_item_sk) - INNER JOIN date_dim ON (d_date_sk = ws_sold_date_sk) - LEFT JOIN web_returns ON (ws_order_number = wr_order_number) - AND (ws_item_sk = wr_item_sk) - WHERE (i_category = 'Books') - ) sales_detail - GROUP BY d_year, i_brand_id, i_class_id, i_category_id, i_manufact_id -) -SELECT - prev_yr.d_year prev_year -, curr_yr.d_year year -, curr_yr.i_brand_id -, curr_yr.i_class_id -, curr_yr.i_category_id -, curr_yr.i_manufact_id -, prev_yr.sales_cnt prev_yr_cnt -, curr_yr.sales_cnt curr_yr_cnt -, (curr_yr.sales_cnt - prev_yr.sales_cnt) sales_cnt_diff -, (curr_yr.sales_amt - prev_yr.sales_amt) sales_amt_diff -FROM - all_sales curr_yr -, all_sales prev_yr -WHERE (curr_yr.i_brand_id = prev_yr.i_brand_id) - AND (curr_yr.i_class_id = prev_yr.i_class_id) - AND (curr_yr.i_category_id = prev_yr.i_category_id) - AND (curr_yr.i_manufact_id = prev_yr.i_manufact_id) - AND (curr_yr.d_year = 2002) - AND (prev_yr.d_year = (2002 - 1)) - AND ((CAST(curr_yr.sales_cnt AS DECIMAL(17,2)) / CAST(prev_yr.sales_cnt AS DECIMAL(17,2))) < CAST('0.9' AS DECIMAL(2,1))) -ORDER BY sales_cnt_diff ASC, sales_amt_diff ASC -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q76.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q76.groovy deleted file mode 100644 index a99e8165bde247..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q76.groovy +++ /dev/null @@ -1,85 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q76_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q76 """ -SELECT - channel -, col_name -, d_year -, d_qoy -, i_category -, count(*) sales_cnt -, sum(ext_sales_price) sales_amt -FROM - ( - SELECT - 'store' channel - , 'ss_store_sk' col_name - , d_year - , d_qoy - , i_category - , ss_ext_sales_price ext_sales_price - FROM - store_sales - , item - , date_dim - WHERE (ss_store_sk IS NULL) - AND (ss_sold_date_sk = d_date_sk) - AND (ss_item_sk = i_item_sk) -UNION ALL SELECT - 'web' channel - , 'ws_ship_customer_sk' col_name - , d_year - , d_qoy - , i_category - , ws_ext_sales_price ext_sales_price - FROM - web_sales - , item - , date_dim - WHERE (ws_ship_customer_sk IS NULL) - AND (ws_sold_date_sk = d_date_sk) - AND (ws_item_sk = i_item_sk) -UNION ALL SELECT - 'catalog' channel - , 'cs_ship_addr_sk' col_name - , d_year - , d_qoy - , i_category - , cs_ext_sales_price ext_sales_price - FROM - catalog_sales - , item - , date_dim - WHERE (cs_ship_addr_sk IS NULL) - AND (cs_sold_date_sk = d_date_sk) - AND (cs_item_sk = i_item_sk) -) foo -GROUP BY channel, col_name, d_year, d_qoy, i_category -ORDER BY channel ASC, col_name ASC, d_year ASC, d_qoy ASC, i_category ASC -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q77.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q77.groovy deleted file mode 100644 index c869b8b9c1b8f5..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q77.groovy +++ /dev/null @@ -1,149 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q77_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q77 """ -WITH - ss AS ( - SELECT - s_store_sk - , sum(ss_ext_sales_price) sales - , sum(ss_net_profit) profit - FROM - store_sales - , date_dim - , store - WHERE (ss_sold_date_sk = d_date_sk) - AND (d_date BETWEEN CAST('2000-08-23' AS DATE) AND (CAST('2000-08-23' AS DATE) + INTERVAL '30' DAY)) - AND (ss_store_sk = s_store_sk) - GROUP BY s_store_sk -) -, sr AS ( - SELECT - s_store_sk - , sum(sr_return_amt) returns - , sum(sr_net_loss) profit_loss - FROM - store_returns - , date_dim - , store - WHERE (sr_returned_date_sk = d_date_sk) - AND (d_date BETWEEN CAST('2000-08-23' AS DATE) AND (CAST('2000-08-23' AS DATE) + INTERVAL '30' DAY)) - AND (sr_store_sk = s_store_sk) - GROUP BY s_store_sk -) -, cs AS ( - SELECT - cs_call_center_sk - , sum(cs_ext_sales_price) sales - , sum(cs_net_profit) profit - FROM - catalog_sales - , date_dim - WHERE (cs_sold_date_sk = d_date_sk) - AND (d_date BETWEEN CAST('2000-08-23' AS DATE) AND (CAST('2000-08-23' AS DATE) + INTERVAL '30' DAY)) - GROUP BY cs_call_center_sk -) -, cr AS ( - SELECT - cr_call_center_sk - , sum(cr_return_amount) returns - , sum(cr_net_loss) profit_loss - FROM - catalog_returns - , date_dim - WHERE (cr_returned_date_sk = d_date_sk) - AND (d_date BETWEEN CAST('2000-08-23' AS DATE) AND (CAST('2000-08-23' AS DATE) + INTERVAL '30' DAY)) - GROUP BY cr_call_center_sk -) -, ws AS ( - SELECT - wp_web_page_sk - , sum(ws_ext_sales_price) sales - , sum(ws_net_profit) profit - FROM - web_sales - , date_dim - , web_page - WHERE (ws_sold_date_sk = d_date_sk) - AND (d_date BETWEEN CAST('2000-08-23' AS DATE) AND (CAST('2000-08-23' AS DATE) + INTERVAL '30' DAY)) - AND (ws_web_page_sk = wp_web_page_sk) - GROUP BY wp_web_page_sk -) -, wr AS ( - SELECT - wp_web_page_sk - , sum(wr_return_amt) returns - , sum(wr_net_loss) profit_loss - FROM - web_returns - , date_dim - , web_page - WHERE (wr_returned_date_sk = d_date_sk) - AND (d_date BETWEEN CAST('2000-08-23' AS DATE) AND (CAST('2000-08-23' AS DATE) + INTERVAL '30' DAY)) - AND (wr_web_page_sk = wp_web_page_sk) - GROUP BY wp_web_page_sk -) -SELECT - channel -, id -, sum(sales) sales -, sum(returns) returns -, sum(profit) profit -FROM - ( - SELECT - 'store channel' channel - , ss.s_store_sk id - , sales - , COALESCE(returns, 0) returns - , (profit - COALESCE(profit_loss, 0)) profit - FROM - ss - LEFT JOIN sr ON (ss.s_store_sk = sr.s_store_sk) -UNION ALL SELECT - 'catalog channel' channel - , cs_call_center_sk id - , sales - , returns - , (profit - profit_loss) profit - FROM - cs - , cr -UNION ALL SELECT - 'web channel' channel - , ws.wp_web_page_sk id - , sales - , COALESCE(returns, 0) returns - , (profit - COALESCE(profit_loss, 0)) profit - FROM - ws - LEFT JOIN wr ON (ws.wp_web_page_sk = wr.wp_web_page_sk) -) x -GROUP BY ROLLUP (channel, id) -ORDER BY channel ASC, id ASC, sales ASC -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q78.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q78.groovy deleted file mode 100644 index 6ee9f33cb9b867..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q78.groovy +++ /dev/null @@ -1,105 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q78_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ -/* - qt_q78 """ --- at current, run q78 will get wrong result, still under fixing -WITH - ws AS ( - SELECT - d_year ws_sold_year - , ws_item_sk - , ws_bill_customer_sk ws_customer_sk - , sum(ws_quantity) ws_qty - , sum(ws_wholesale_cost) ws_wc - , sum(ws_sales_price) ws_sp - FROM - web_sales - LEFT JOIN web_returns ON (wr_order_number = ws_order_number) - AND (ws_item_sk = wr_item_sk) - INNER JOIN date_dim ON (ws_sold_date_sk = d_date_sk) - WHERE (wr_order_number IS NULL) - GROUP BY d_year, ws_item_sk, ws_bill_customer_sk -) -, cs AS ( - SELECT - d_year cs_sold_year - , cs_item_sk - , cs_bill_customer_sk cs_customer_sk - , sum(cs_quantity) cs_qty - , sum(cs_wholesale_cost) cs_wc - , sum(cs_sales_price) cs_sp - FROM - catalog_sales - LEFT JOIN catalog_returns ON (cr_order_number = cs_order_number) - AND (cs_item_sk = cr_item_sk) - INNER JOIN date_dim ON (cs_sold_date_sk = d_date_sk) - WHERE (cr_order_number IS NULL) - GROUP BY d_year, cs_item_sk, cs_bill_customer_sk -) -, ss AS ( - SELECT - d_year ss_sold_year - , ss_item_sk - , ss_customer_sk - , sum(ss_quantity) ss_qty - , sum(ss_wholesale_cost) ss_wc - , sum(ss_sales_price) ss_sp - FROM - store_sales - LEFT JOIN store_returns ON (sr_ticket_number = ss_ticket_number) - AND (ss_item_sk = sr_item_sk) - INNER JOIN date_dim ON (ss_sold_date_sk = d_date_sk) - WHERE (sr_ticket_number IS NULL) - GROUP BY d_year, ss_item_sk, ss_customer_sk -) -SELECT - ss_sold_year -, ss_item_sk -, ss_customer_sk -, round((CAST(ss_qty AS DECIMAL(10,2)) / COALESCE((ws_qty + cs_qty), 1)), 2) ratio -, ss_qty store_qty -, ss_wc store_wholesale_cost -, ss_sp store_sales_price -, (COALESCE(ws_qty, 0) + COALESCE(cs_qty, 0)) other_chan_qty -, (COALESCE(ws_wc, 0) + COALESCE(cs_wc, 0)) other_chan_wholesale_cost -, (COALESCE(ws_sp, 0) + COALESCE(cs_sp, 0)) other_chan_sales_price -FROM - ss -LEFT JOIN ws ON (ws_sold_year = ss_sold_year) - AND (ws_item_sk = ss_item_sk) - AND (ws_customer_sk = ss_customer_sk) -LEFT JOIN cs ON (cs_sold_year = ss_sold_year) - AND (cs_item_sk = cs_item_sk) - AND (cs_customer_sk = ss_customer_sk) -WHERE (COALESCE(ws_qty, 0) > 0) - AND (COALESCE(cs_qty, 0) > 0) - AND (ss_sold_year = 2000) -ORDER BY ss_sold_year ASC, ss_item_sk ASC, ss_customer_sk ASC, ss_qty DESC, ss_wc DESC, ss_sp DESC, other_chan_qty ASC, other_chan_wholesale_cost ASC, other_chan_sales_price ASC, round((CAST(ss_qty AS DECIMAL(10,2)) / COALESCE((ws_qty + cs_qty), 1)), 2) ASC -LIMIT 100 -""" -*/ -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q79.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q79.groovy deleted file mode 100644 index e22beae644640e..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q79.groovy +++ /dev/null @@ -1,63 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q79_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q79 """ -SELECT - c_last_name -, c_first_name -, substr(s_city, 1, 30) -, ss_ticket_number -, amt -, profit -FROM - ( - SELECT - ss_ticket_number - , ss_customer_sk - , store.s_city - , sum(ss_coupon_amt) amt - , sum(ss_net_profit) profit - FROM - store_sales - , date_dim - , store - , household_demographics - WHERE (store_sales.ss_sold_date_sk = date_dim.d_date_sk) - AND (store_sales.ss_store_sk = store.s_store_sk) - AND (store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk) - AND ((household_demographics.hd_dep_count = 6) - OR (household_demographics.hd_vehicle_count > 2)) - AND (date_dim.d_dow = 1) - AND (date_dim.d_year IN (1999 , (1999 + 1) , (1999 + 2))) - AND (store.s_number_employees BETWEEN 200 AND 295) - GROUP BY ss_ticket_number, ss_customer_sk, ss_addr_sk, store.s_city -) ms -, customer -WHERE (ss_customer_sk = c_customer_sk) -ORDER BY c_last_name ASC, c_first_name ASC, substr(s_city, 1, 30) ASC, profit ASC, ss_ticket_number, amt -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q80.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q80.groovy deleted file mode 100644 index ccd40c0edf9db0..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q80.groovy +++ /dev/null @@ -1,135 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q80_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q80 """ -WITH - ssr AS ( - SELECT - s_store_id store_id - , sum(ss_ext_sales_price) sales - , sum(COALESCE(sr_return_amt, 0)) returns - , sum((ss_net_profit - COALESCE(sr_net_loss, 0))) profit - FROM - store_sales - LEFT JOIN store_returns ON (ss_item_sk = sr_item_sk) - AND (ss_ticket_number = sr_ticket_number) - , date_dim - , store - , item - , promotion - WHERE (ss_sold_date_sk = d_date_sk) - AND (CAST(d_date AS DATE) BETWEEN CAST('2000-08-23' AS DATE) AND (CAST('2000-08-23' AS DATE) + INTERVAL '30' DAY)) - AND (ss_store_sk = s_store_sk) - AND (ss_item_sk = i_item_sk) - AND (i_current_price > 50) - AND (ss_promo_sk = p_promo_sk) - AND (p_channel_tv = 'N') - GROUP BY s_store_id -) -, csr AS ( - SELECT - cp_catalog_page_id catalog_page_id - , sum(cs_ext_sales_price) sales - , sum(COALESCE(cr_return_amount, 0)) returns - , sum((cs_net_profit - COALESCE(cr_net_loss, 0))) profit - FROM - catalog_sales - LEFT JOIN catalog_returns ON (cs_item_sk = cr_item_sk) - AND (cs_order_number = cr_order_number) - , date_dim - , catalog_page - , item - , promotion - WHERE (cs_sold_date_sk = d_date_sk) - AND (CAST(d_date AS DATE) BETWEEN CAST('2000-08-23' AS DATE) AND (CAST('2000-08-23' AS DATE) + INTERVAL '30' DAY)) - AND (cs_catalog_page_sk = cp_catalog_page_sk) - AND (cs_item_sk = i_item_sk) - AND (i_current_price > 50) - AND (cs_promo_sk = p_promo_sk) - AND (p_channel_tv = 'N') - GROUP BY cp_catalog_page_id -) -, wsr AS ( - SELECT - web_site_id - , sum(ws_ext_sales_price) sales - , sum(COALESCE(wr_return_amt, 0)) returns - , sum((ws_net_profit - COALESCE(wr_net_loss, 0))) profit - FROM - web_sales - LEFT JOIN web_returns ON (ws_item_sk = wr_item_sk) - AND (ws_order_number = wr_order_number) - , date_dim - , web_site - , item - , promotion - WHERE (ws_sold_date_sk = d_date_sk) - AND (CAST(d_date AS DATE) BETWEEN CAST('2000-08-23' AS DATE) AND (CAST('2000-08-23' AS DATE) + INTERVAL '30' DAY)) - AND (ws_web_site_sk = web_site_sk) - AND (ws_item_sk = i_item_sk) - AND (i_current_price > 50) - AND (ws_promo_sk = p_promo_sk) - AND (p_channel_tv = 'N') - GROUP BY web_site_id -) -SELECT - channel -, id -, sum(sales) sales -, sum(returns) returns -, sum(profit) profit -FROM - ( - SELECT - 'store channel' channel - , concat('store', store_id) id - , sales - , returns - , profit - FROM - ssr -UNION ALL SELECT - 'catalog channel' channel - , concat('catalog_page', catalog_page_id) id - , sales - , returns - , profit - FROM - csr -UNION ALL SELECT - 'web channel' channel - , concat('web_site', web_site_id) id - , sales - , returns - , profit - FROM - wsr -) x -GROUP BY ROLLUP (channel, id) -ORDER BY channel ASC, id ASC -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q81.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q81.groovy deleted file mode 100644 index 7f5d625229aebc..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q81.groovy +++ /dev/null @@ -1,76 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q81_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q81 """ -WITH - customer_total_return AS ( - SELECT - cr_returning_customer_sk ctr_customer_sk - , ca_state ctr_state - , sum(cr_return_amt_inc_tax) ctr_total_return - FROM - catalog_returns - , date_dim - , customer_address - WHERE (cr_returned_date_sk = d_date_sk) - AND (d_year = 2000) - AND (cr_returning_addr_sk = ca_address_sk) - GROUP BY cr_returning_customer_sk, ca_state -) -SELECT - c_customer_id -, c_salutation -, c_first_name -, c_last_name -, ca_street_number -, ca_street_name -, ca_street_type -, ca_suite_number -, ca_city -, ca_county -, ca_state -, ca_zip -, ca_country -, ca_gmt_offset -, ca_location_type -, ctr_total_return -FROM - customer_total_return ctr1 -, customer_address -, customer -WHERE (ctr1.ctr_total_return > ( - SELECT (avg(ctr_total_return) * CAST('1.2' AS DECIMAL(2,1))) - FROM - customer_total_return ctr2 - WHERE (ctr1.ctr_state = ctr2.ctr_state) - )) - AND (ca_address_sk = c_current_addr_sk) - AND (ca_state = 'GA') - AND (ctr1.ctr_customer_sk = c_customer_sk) -ORDER BY c_customer_id ASC, c_salutation ASC, c_first_name ASC, c_last_name ASC, ca_street_number ASC, ca_street_name ASC, ca_street_type ASC, ca_suite_number ASC, ca_city ASC, ca_county ASC, ca_state ASC, ca_zip ASC, ca_country ASC, ca_gmt_offset ASC, ca_location_type ASC, ctr_total_return ASC -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q82.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q82.groovy deleted file mode 100644 index d8afc0e1860165..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q82.groovy +++ /dev/null @@ -1,48 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q82_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q82 """ -SELECT - i_item_id -, i_item_desc -, i_current_price -FROM - item -, inventory -, date_dim -, store_sales -WHERE (i_current_price BETWEEN 62 AND (62 + 30)) - AND (inv_item_sk = i_item_sk) - AND (d_date_sk = inv_date_sk) - AND (CAST(d_date AS DATE) BETWEEN CAST('2000-05-25' AS DATE) AND (CAST('2000-05-25' AS DATE) + INTERVAL '60' DAY)) - AND (i_manufact_id IN (129, 270, 821, 423)) - AND (inv_quantity_on_hand BETWEEN 100 AND 500) - AND (ss_item_sk = i_item_sk) -GROUP BY i_item_id, i_item_desc, i_current_price -ORDER BY i_item_id ASC -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q83.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q83.groovy deleted file mode 100644 index 9146c1d36bd795..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q83.groovy +++ /dev/null @@ -1,116 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q83_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q83 """ -WITH - sr_items AS ( - SELECT - i_item_id item_id - , sum(sr_return_quantity) sr_item_qty - FROM - store_returns - , item - , date_dim - WHERE (sr_item_sk = i_item_sk) - AND (d_date IN ( - SELECT d_date - FROM - date_dim - WHERE (d_week_seq IN ( - SELECT d_week_seq - FROM - date_dim - WHERE (d_date IN (CAST('2000-06-30' AS DATE) , CAST('2000-09-27' AS DATE) , CAST('2000-11-17' AS DATE))) - )) - )) - AND (sr_returned_date_sk = d_date_sk) - GROUP BY i_item_id -) -, cr_items AS ( - SELECT - i_item_id item_id - , sum(cr_return_quantity) cr_item_qty - FROM - catalog_returns - , item - , date_dim - WHERE (cr_item_sk = i_item_sk) - AND (d_date IN ( - SELECT d_date - FROM - date_dim - WHERE (d_week_seq IN ( - SELECT d_week_seq - FROM - date_dim - WHERE (d_date IN (CAST('2000-06-30' AS DATE) , CAST('2000-09-27' AS DATE) , CAST('2000-11-17' AS DATE))) - )) - )) - AND (cr_returned_date_sk = d_date_sk) - GROUP BY i_item_id -) -, wr_items AS ( - SELECT - i_item_id item_id - , sum(wr_return_quantity) wr_item_qty - FROM - web_returns - , item - , date_dim - WHERE (wr_item_sk = i_item_sk) - AND (d_date IN ( - SELECT d_date - FROM - date_dim - WHERE (d_week_seq IN ( - SELECT d_week_seq - FROM - date_dim - WHERE (d_date IN (CAST('2000-06-30' AS DATE) , CAST('2000-09-27' AS DATE) , CAST('2000-11-17' AS DATE))) - )) - )) - AND (wr_returned_date_sk = d_date_sk) - GROUP BY i_item_id -) -SELECT - sr_items.item_id -, sr_item_qty -, CAST((((sr_item_qty / ((CAST(sr_item_qty AS DECIMAL(9,4)) + cr_item_qty) + wr_item_qty)) / CAST('3.0' AS DECIMAL(2,1))) * 100) AS DECIMAL(7,2)) sr_dev -, cr_item_qty -, CAST((((cr_item_qty / ((CAST(sr_item_qty AS DECIMAL(9,4)) + cr_item_qty) + wr_item_qty)) / CAST('3.0' AS DECIMAL(2,1))) * 100) AS DECIMAL(7,2)) cr_dev -, wr_item_qty -, CAST((((wr_item_qty / ((CAST(sr_item_qty AS DECIMAL(9,4)) + cr_item_qty) + wr_item_qty)) / CAST('3.0' AS DECIMAL(2,1))) * 100) AS DECIMAL(7,2)) wr_dev -, (((sr_item_qty + cr_item_qty) + wr_item_qty) / CAST('3.00' AS DECIMAL(5,2))) average -FROM - sr_items -, cr_items -, wr_items -WHERE (sr_items.item_id = cr_items.item_id) - AND (sr_items.item_id = wr_items.item_id) -ORDER BY sr_items.item_id ASC, sr_item_qty ASC -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q84.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q84.groovy deleted file mode 100644 index d64ab5d4f7d202..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q84.groovy +++ /dev/null @@ -1,49 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q84_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q84 """ -SELECT - c_customer_id customer_id -, concat(concat(c_last_name, ', '), c_first_name) customername -FROM - customer -, customer_address -, customer_demographics -, household_demographics -, income_band -, store_returns -WHERE (ca_city = 'Edgewood') - AND (c_current_addr_sk = ca_address_sk) - AND (ib_lower_bound >= 38128) - AND (ib_upper_bound <= (38128 + 50000)) - AND (ib_income_band_sk = hd_income_band_sk) - AND (cd_demo_sk = c_current_cdemo_sk) - AND (hd_demo_sk = c_current_hdemo_sk) - AND (sr_cdemo_sk = cd_demo_sk) -ORDER BY c_customer_id ASC -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q85.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q85.groovy deleted file mode 100644 index 11330cd1dc7a0e..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q85.groovy +++ /dev/null @@ -1,79 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q85_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q85 """ -SELECT - substr(r_reason_desc, 1, 20) -, avg(ws_quantity) -, avg(wr_refunded_cash) -, avg(wr_fee) -FROM - web_sales -, web_returns -, web_page -, customer_demographics cd1 -, customer_demographics cd2 -, customer_address -, date_dim -, reason -WHERE (ws_web_page_sk = wp_web_page_sk) - AND (ws_item_sk = wr_item_sk) - AND (ws_order_number = wr_order_number) - AND (ws_sold_date_sk = d_date_sk) - AND (d_year = 2000) - AND (cd1.cd_demo_sk = wr_refunded_cdemo_sk) - AND (cd2.cd_demo_sk = wr_returning_cdemo_sk) - AND (ca_address_sk = wr_refunded_addr_sk) - AND (r_reason_sk = wr_reason_sk) - AND (((cd1.cd_marital_status = 'M') - AND (cd1.cd_marital_status = cd2.cd_marital_status) - AND (cd1.cd_education_status = 'Advanced Degree') - AND (cd1.cd_education_status = cd2.cd_education_status) - AND (ws_sales_price BETWEEN CAST('100.00' AS DECIMAL(5,2)) AND CAST('150.00' AS DECIMAL(5,2)))) - OR ((cd1.cd_marital_status = 'S') - AND (cd1.cd_marital_status = cd2.cd_marital_status) - AND (cd1.cd_education_status = 'College') - AND (cd1.cd_education_status = cd2.cd_education_status) - AND (ws_sales_price BETWEEN CAST('50.00' AS DECIMAL(5,2)) AND CAST('100.00' AS DECIMAL(5,2)))) - OR ((cd1.cd_marital_status = 'W') - AND (cd1.cd_marital_status = cd2.cd_marital_status) - AND (cd1.cd_education_status = '2 yr Degree') - AND (cd1.cd_education_status = cd2.cd_education_status) - AND (ws_sales_price BETWEEN CAST('150.00' AS DECIMAL(5,2)) AND CAST('200.00' AS DECIMAL(5,2))))) - AND (((ca_country = 'United States') - AND (ca_state IN ('IN' , 'OH' , 'NJ')) - AND (ws_net_profit BETWEEN 100 AND 200)) - OR ((ca_country = 'United States') - AND (ca_state IN ('WI' , 'CT' , 'KY')) - AND (ws_net_profit BETWEEN 150 AND 300)) - OR ((ca_country = 'United States') - AND (ca_state IN ('LA' , 'IA' , 'AR')) - AND (ws_net_profit BETWEEN 50 AND 250))) -GROUP BY r_reason_desc -ORDER BY substr(r_reason_desc, 1, 20) ASC, avg(ws_quantity) ASC, avg(wr_refunded_cash) ASC, avg(wr_fee) ASC -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q86.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q86.groovy deleted file mode 100644 index bbc956a82fce27..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q86.groovy +++ /dev/null @@ -1,45 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q86_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q86 """ -SELECT - sum(ws_net_paid) total_sum -, i_category -, i_class -, (GROUPING (i_category) + GROUPING (i_class)) lochierarchy -, rank() OVER (PARTITION BY (GROUPING (i_category) + GROUPING (i_class)), (CASE WHEN (GROUPING (i_class) = 0) THEN i_category END) ORDER BY sum(ws_net_paid) DESC) rank_within_parent -FROM - web_sales -, date_dim d1 -, item -WHERE (d1.d_month_seq BETWEEN 1200 AND (1200 + 11)) - AND (d1.d_date_sk = ws_sold_date_sk) - AND (i_item_sk = ws_item_sk) -GROUP BY ROLLUP (i_category, i_class) -ORDER BY lochierarchy DESC, (CASE WHEN (lochierarchy = 0) THEN i_category END) ASC, rank_within_parent ASC -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q87.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q87.groovy deleted file mode 100644 index c6479dbebe65ad..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q87.groovy +++ /dev/null @@ -1,69 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q87_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q87 """ -SELECT count(*) -FROM - ( -( - SELECT DISTINCT - c_last_name - , c_first_name - , d_date - FROM - store_sales - , date_dim - , customer - WHERE (store_sales.ss_sold_date_sk = date_dim.d_date_sk) - AND (store_sales.ss_customer_sk = customer.c_customer_sk) - AND (d_month_seq BETWEEN 1200 AND (1200 + 11)) - ) EXCEPT ( - SELECT DISTINCT - c_last_name - , c_first_name - , d_date - FROM - catalog_sales - , date_dim - , customer - WHERE (catalog_sales.cs_sold_date_sk = date_dim.d_date_sk) - AND (catalog_sales.cs_bill_customer_sk = customer.c_customer_sk) - AND (d_month_seq BETWEEN 1200 AND (1200 + 11)) - ) EXCEPT ( - SELECT DISTINCT - c_last_name - , c_first_name - , d_date - FROM - web_sales - , date_dim - , customer - WHERE (web_sales.ws_sold_date_sk = date_dim.d_date_sk) - AND (web_sales.ws_bill_customer_sk = customer.c_customer_sk) - AND (d_month_seq BETWEEN 1200 AND (1200 + 11)) - ) ) cool_cust -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q88.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q88.groovy deleted file mode 100644 index 8077197a61ae75..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q88.groovy +++ /dev/null @@ -1,191 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q88_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q88 """ -SELECT * -FROM - ( - SELECT count(*) h8_30_to_9 - FROM - store_sales - , household_demographics - , time_dim - , store - WHERE (ss_sold_time_sk = time_dim.t_time_sk) - AND (ss_hdemo_sk = household_demographics.hd_demo_sk) - AND (ss_store_sk = s_store_sk) - AND (time_dim.t_hour = 8) - AND (time_dim.t_minute >= 30) - AND (((household_demographics.hd_dep_count = 4) - AND (household_demographics.hd_vehicle_count <= (4 + 2))) - OR ((household_demographics.hd_dep_count = 2) - AND (household_demographics.hd_vehicle_count <= (2 + 2))) - OR ((household_demographics.hd_dep_count = 0) - AND (household_demographics.hd_vehicle_count <= (0 + 2)))) - AND (store.s_store_name = 'ese') -) s1 -, ( - SELECT count(*) h9_to_9_30 - FROM - store_sales - , household_demographics - , time_dim - , store - WHERE (ss_sold_time_sk = time_dim.t_time_sk) - AND (ss_hdemo_sk = household_demographics.hd_demo_sk) - AND (ss_store_sk = s_store_sk) - AND (time_dim.t_hour = 9) - AND (time_dim.t_minute < 30) - AND (((household_demographics.hd_dep_count = 4) - AND (household_demographics.hd_vehicle_count <= (4 + 2))) - OR ((household_demographics.hd_dep_count = 2) - AND (household_demographics.hd_vehicle_count <= (2 + 2))) - OR ((household_demographics.hd_dep_count = 0) - AND (household_demographics.hd_vehicle_count <= (0 + 2)))) - AND (store.s_store_name = 'ese') -) s2 -, ( - SELECT count(*) h9_30_to_10 - FROM - store_sales - , household_demographics - , time_dim - , store - WHERE (ss_sold_time_sk = time_dim.t_time_sk) - AND (ss_hdemo_sk = household_demographics.hd_demo_sk) - AND (ss_store_sk = s_store_sk) - AND (time_dim.t_hour = 9) - AND (time_dim.t_minute >= 30) - AND (((household_demographics.hd_dep_count = 4) - AND (household_demographics.hd_vehicle_count <= (4 + 2))) - OR ((household_demographics.hd_dep_count = 2) - AND (household_demographics.hd_vehicle_count <= (2 + 2))) - OR ((household_demographics.hd_dep_count = 0) - AND (household_demographics.hd_vehicle_count <= (0 + 2)))) - AND (store.s_store_name = 'ese') -) s3 -, ( - SELECT count(*) h10_to_10_30 - FROM - store_sales - , household_demographics - , time_dim - , store - WHERE (ss_sold_time_sk = time_dim.t_time_sk) - AND (ss_hdemo_sk = household_demographics.hd_demo_sk) - AND (ss_store_sk = s_store_sk) - AND (time_dim.t_hour = 10) - AND (time_dim.t_minute < 30) - AND (((household_demographics.hd_dep_count = 4) - AND (household_demographics.hd_vehicle_count <= (4 + 2))) - OR ((household_demographics.hd_dep_count = 2) - AND (household_demographics.hd_vehicle_count <= (2 + 2))) - OR ((household_demographics.hd_dep_count = 0) - AND (household_demographics.hd_vehicle_count <= (0 + 2)))) - AND (store.s_store_name = 'ese') -) s4 -, ( - SELECT count(*) h10_30_to_11 - FROM - store_sales - , household_demographics - , time_dim - , store - WHERE (ss_sold_time_sk = time_dim.t_time_sk) - AND (ss_hdemo_sk = household_demographics.hd_demo_sk) - AND (ss_store_sk = s_store_sk) - AND (time_dim.t_hour = 10) - AND (time_dim.t_minute >= 30) - AND (((household_demographics.hd_dep_count = 4) - AND (household_demographics.hd_vehicle_count <= (4 + 2))) - OR ((household_demographics.hd_dep_count = 2) - AND (household_demographics.hd_vehicle_count <= (2 + 2))) - OR ((household_demographics.hd_dep_count = 0) - AND (household_demographics.hd_vehicle_count <= (0 + 2)))) - AND (store.s_store_name = 'ese') -) s5 -, ( - SELECT count(*) h11_to_11_30 - FROM - store_sales - , household_demographics - , time_dim - , store - WHERE (ss_sold_time_sk = time_dim.t_time_sk) - AND (ss_hdemo_sk = household_demographics.hd_demo_sk) - AND (ss_store_sk = s_store_sk) - AND (time_dim.t_hour = 11) - AND (time_dim.t_minute < 30) - AND (((household_demographics.hd_dep_count = 4) - AND (household_demographics.hd_vehicle_count <= (4 + 2))) - OR ((household_demographics.hd_dep_count = 2) - AND (household_demographics.hd_vehicle_count <= (2 + 2))) - OR ((household_demographics.hd_dep_count = 0) - AND (household_demographics.hd_vehicle_count <= (0 + 2)))) - AND (store.s_store_name = 'ese') -) s6 -, ( - SELECT count(*) h11_30_to_12 - FROM - store_sales - , household_demographics - , time_dim - , store - WHERE (ss_sold_time_sk = time_dim.t_time_sk) - AND (ss_hdemo_sk = household_demographics.hd_demo_sk) - AND (ss_store_sk = s_store_sk) - AND (time_dim.t_hour = 11) - AND (time_dim.t_minute >= 30) - AND (((household_demographics.hd_dep_count = 4) - AND (household_demographics.hd_vehicle_count <= (4 + 2))) - OR ((household_demographics.hd_dep_count = 2) - AND (household_demographics.hd_vehicle_count <= (2 + 2))) - OR ((household_demographics.hd_dep_count = 0) - AND (household_demographics.hd_vehicle_count <= (0 + 2)))) - AND (store.s_store_name = 'ese') -) s7 -, ( - SELECT count(*) h12_to_12_30 - FROM - store_sales - , household_demographics - , time_dim - , store - WHERE (ss_sold_time_sk = time_dim.t_time_sk) - AND (ss_hdemo_sk = household_demographics.hd_demo_sk) - AND (ss_store_sk = s_store_sk) - AND (time_dim.t_hour = 12) - AND (time_dim.t_minute < 30) - AND (((household_demographics.hd_dep_count = 4) - AND (household_demographics.hd_vehicle_count <= (4 + 2))) - OR ((household_demographics.hd_dep_count = 2) - AND (household_demographics.hd_vehicle_count <= (2 + 2))) - OR ((household_demographics.hd_dep_count = 0) - AND (household_demographics.hd_vehicle_count <= (0 + 2)))) - AND (store.s_store_name = 'ese') -) s8 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q89.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q89.groovy deleted file mode 100644 index d6e6bf9ae70fbb..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q89.groovy +++ /dev/null @@ -1,59 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q89_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q89 """ -SELECT * -FROM - ( - SELECT - i_category - , i_class - , i_brand - , s_store_name - , s_company_name - , d_moy - , sum(ss_sales_price) sum_sales - , avg(sum(ss_sales_price)) OVER (PARTITION BY i_category, i_brand, s_store_name, s_company_name) avg_monthly_sales - FROM - item - , store_sales - , date_dim - , store - WHERE (ss_item_sk = i_item_sk) - AND (ss_sold_date_sk = d_date_sk) - AND (ss_store_sk = s_store_sk) - AND (d_year IN (1999)) - AND (((i_category IN ('Books' , 'Electronics' , 'Sports')) - AND (i_class IN ('computers' , 'stereo' , 'football'))) - OR ((i_category IN ('Men' , 'Jewelry' , 'Women')) - AND (i_class IN ('shirts' , 'birdal' , 'dresses')))) - GROUP BY i_category, i_class, i_brand, s_store_name, s_company_name, d_moy -) tmp1 -WHERE ((CASE WHEN (avg_monthly_sales <> 0) THEN (abs((sum_sales - avg_monthly_sales)) / avg_monthly_sales) ELSE null END) > CAST('0.1' AS DECIMAL(2,1))) -ORDER BY (sum_sales - avg_monthly_sales) ASC, s_store_name ASC -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q90.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q90.groovy deleted file mode 100644 index 7724c6d0eb816e..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q90.groovy +++ /dev/null @@ -1,61 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q90_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q90 """ -SELECT (CAST(amc AS DECIMAL(15,4)) / CAST(pmc AS DECIMAL(15,4))) am_pm_ratio -FROM - ( - SELECT count(*) amc - FROM - web_sales - , household_demographics - , time_dim - , web_page - WHERE (ws_sold_time_sk = time_dim.t_time_sk) - AND (ws_ship_hdemo_sk = household_demographics.hd_demo_sk) - AND (ws_web_page_sk = web_page.wp_web_page_sk) - AND (time_dim.t_hour BETWEEN 8 AND (8 + 1)) - AND (household_demographics.hd_dep_count = 6) - AND (web_page.wp_char_count BETWEEN 5000 AND 5200) -) at -, ( - SELECT count(*) pmc - FROM - web_sales - , household_demographics - , time_dim - , web_page - WHERE (ws_sold_time_sk = time_dim.t_time_sk) - AND (ws_ship_hdemo_sk = household_demographics.hd_demo_sk) - AND (ws_web_page_sk = web_page.wp_web_page_sk) - AND (time_dim.t_hour BETWEEN 19 AND (19 + 1)) - AND (household_demographics.hd_dep_count = 6) - AND (web_page.wp_char_count BETWEEN 5000 AND 5200) -) pt -ORDER BY am_pm_ratio ASC -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q91.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q91.groovy deleted file mode 100644 index bc56a712531d2d..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q91.groovy +++ /dev/null @@ -1,58 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q91_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q91 """ -SELECT - cc_call_center_id Call_Center -, cc_name Call_Center_Name -, cc_manager Manager -, sum(cr_net_loss) Returns_Loss -FROM - call_center -, catalog_returns -, date_dim -, customer -, customer_address -, customer_demographics -, household_demographics -WHERE (cr_call_center_sk = cc_call_center_sk) - AND (cr_returned_date_sk = d_date_sk) - AND (cr_returning_customer_sk = c_customer_sk) - AND (cd_demo_sk = c_current_cdemo_sk) - AND (hd_demo_sk = c_current_hdemo_sk) - AND (ca_address_sk = c_current_addr_sk) - AND (d_year = 1998) - AND (d_moy = 11) - AND (((cd_marital_status = 'M') - AND (cd_education_status = 'Unknown')) - OR ((cd_marital_status = 'W') - AND (cd_education_status = 'Advanced Degree'))) - AND (hd_buy_potential LIKE 'Unknown%') - AND (ca_gmt_offset = -7) -GROUP BY cc_call_center_id, cc_name, cc_manager, cd_marital_status, cd_education_status -ORDER BY sum(cr_net_loss) DESC -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q92.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q92.groovy deleted file mode 100644 index 3194c15030ef27..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q92.groovy +++ /dev/null @@ -1,51 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q92_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - multi_sql """ - use regression_test_tpcds_sf1_unique_p1; - set enable_local_shuffle=false; - """ - - qt_q92 """ -SELECT sum(ws_ext_discount_amt) 'Excess Discount Amount' -FROM - web_sales -, item -, date_dim -WHERE (i_manufact_id = 350) - AND (i_item_sk = ws_item_sk) - AND (d_date BETWEEN CAST('2000-01-27' AS DATE) AND (CAST('2000-01-27' AS DATE) + INTERVAL '90' DAY)) - AND (d_date_sk = ws_sold_date_sk) - AND (ws_ext_discount_amt > ( - SELECT (CAST('1.3' AS DECIMAL(2,1)) * avg(ws_ext_discount_amt)) - FROM - web_sales - , date_dim - WHERE (ws_item_sk = i_item_sk) - AND (d_date BETWEEN CAST('2000-01-27' AS DATE) AND (CAST('2000-01-27' AS DATE) + INTERVAL '90' DAY)) - AND (d_date_sk = ws_sold_date_sk) - )) -ORDER BY sum(ws_ext_discount_amt) ASC -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q93.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q93.groovy deleted file mode 100644 index a2f4d8c3b90045..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q93.groovy +++ /dev/null @@ -1,50 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q93_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q93 """ -SELECT - ss_customer_sk -, sum(act_sales) sumsales -FROM - ( - SELECT - ss_item_sk - , ss_ticket_number - , ss_customer_sk - , (CASE WHEN (sr_return_quantity IS NOT NULL) THEN ((ss_quantity - sr_return_quantity) * ss_sales_price) ELSE (ss_quantity * ss_sales_price) END) act_sales - FROM - store_sales - LEFT JOIN store_returns ON (sr_item_sk = ss_item_sk) - AND (sr_ticket_number = ss_ticket_number) - , reason - WHERE (sr_reason_sk = r_reason_sk) - AND (r_reason_desc = 'reason 28') -) t -GROUP BY ss_customer_sk -ORDER BY sumsales ASC, ss_customer_sk ASC -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q94.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q94.groovy deleted file mode 100644 index ce5ed847ce571c..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q94.groovy +++ /dev/null @@ -1,59 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q94_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q94 """ -SELECT - count(DISTINCT ws_order_number) 'order count' -, sum(ws_ext_ship_cost) 'total shipping cost' -, sum(ws_net_profit) 'total net profit' -FROM - web_sales ws1 -, date_dim -, customer_address -, web_site -WHERE (d_date BETWEEN CAST('1999-2-01' AS DATE) AND (CAST('1999-2-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 = 'IL') - AND (ws1.ws_web_site_sk = web_site_sk) - AND (web_company_name = 'pri') - AND (EXISTS ( - SELECT * - FROM - web_sales ws2 - WHERE (ws1.ws_order_number = ws2.ws_order_number) - AND (ws1.ws_warehouse_sk <> ws2.ws_warehouse_sk) -)) - AND (NOT (EXISTS ( - SELECT * - FROM - web_returns wr1 - WHERE (ws1.ws_order_number = wr1.wr_order_number) -))) -ORDER BY count(DISTINCT ws_order_number) ASC -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q95.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q95.groovy deleted file mode 100644 index 9bc5e5b2bbae1b..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q95.groovy +++ /dev/null @@ -1,70 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q95_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q95 """ -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) 'order count' -, sum(ws_ext_ship_cost) 'total shipping cost' -, sum(ws_net_profit) 'total net profit' -FROM - web_sales ws1 -, date_dim -, customer_address -, web_site -WHERE (CAST(d_date AS DATE) BETWEEN CAST('1999-2-01' AS DATE) AND (CAST('1999-2-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 = 'IL') - 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) ASC -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q96.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q96.groovy deleted file mode 100644 index 474073b10b59dd..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q96.groovy +++ /dev/null @@ -1,44 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q96_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q96 """ -SELECT count(*) -FROM - store_sales -, household_demographics -, time_dim -, store -WHERE (ss_sold_time_sk = time_dim.t_time_sk) - AND (ss_hdemo_sk = household_demographics.hd_demo_sk) - AND (ss_store_sk = s_store_sk) - AND (time_dim.t_hour = 20) - AND (time_dim.t_minute >= 30) - AND (household_demographics.hd_dep_count = 7) - AND (store.s_store_name = 'ese') -ORDER BY count(*) ASC -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q97.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q97.groovy deleted file mode 100644 index 2a8ac3e21015ac..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q97.groovy +++ /dev/null @@ -1,64 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q97_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q97 """ -WITH - ssci AS ( - SELECT - ss_customer_sk customer_sk - , ss_item_sk item_sk - FROM - store_sales - , date_dim - WHERE (ss_sold_date_sk = d_date_sk) - AND (d_month_seq BETWEEN 1200 AND (1200 + 11)) - GROUP BY ss_customer_sk, ss_item_sk -) -, csci AS ( - SELECT - cs_bill_customer_sk customer_sk - , cs_item_sk item_sk - FROM - catalog_sales - , date_dim - WHERE (cs_sold_date_sk = d_date_sk) - AND (d_month_seq BETWEEN 1200 AND (1200 + 11)) - GROUP BY cs_bill_customer_sk, cs_item_sk -) -SELECT - sum((CASE WHEN (ssci.customer_sk IS NOT NULL) - AND (csci.customer_sk IS NULL) THEN 1 ELSE 0 END)) store_only -, sum((CASE WHEN (ssci.customer_sk IS NULL) - AND (csci.customer_sk IS NOT NULL) THEN 1 ELSE 0 END)) catalog_only -, sum((CASE WHEN (ssci.customer_sk IS NOT NULL) - AND (csci.customer_sk IS NOT NULL) THEN 1 ELSE 0 END)) store_and_catalog -FROM - ssci -FULL JOIN csci ON (ssci.customer_sk = csci.customer_sk) - AND (ssci.item_sk = csci.item_sk) -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q98.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q98.groovy deleted file mode 100644 index b28776964b7341..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q98.groovy +++ /dev/null @@ -1,47 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q98_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q98 """ -SELECT - i_item_id -, i_item_desc -, i_category -, i_class -, i_current_price -, sum(ss_ext_sales_price) itemrevenue -, ((sum(ss_ext_sales_price) * 100) / sum(sum(ss_ext_sales_price)) OVER (PARTITION BY i_class)) revenueratio -FROM - store_sales -, item -, date_dim -WHERE (ss_item_sk = i_item_sk) - AND (i_category IN ('Sports', 'Books', 'Home')) - AND (ss_sold_date_sk = d_date_sk) - AND (CAST(d_date AS DATE) BETWEEN CAST('1999-02-22' AS DATE) AND (CAST('1999-02-22' AS DATE) + INTERVAL '30' DAY)) -GROUP BY i_item_id, i_item_desc, i_category, i_class, i_current_price -ORDER BY i_category ASC, i_class ASC, i_item_id ASC, i_item_desc ASC, revenueratio ASC -""" -} diff --git a/regression-test/suites/tpcds_sf1_unique_p1/spill/q99.groovy b/regression-test/suites/tpcds_sf1_unique_p1/spill/q99.groovy deleted file mode 100644 index 5bc0ee63ce4358..00000000000000 --- a/regression-test/suites/tpcds_sf1_unique_p1/spill/q99.groovy +++ /dev/null @@ -1,55 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q99_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpcds_sf1_unique_p1; - """ - qt_q99 """ -SELECT - substr(w_warehouse_name, 1, 20) -, sm_type -, cc_name -, sum((CASE WHEN ((cs_ship_date_sk - cs_sold_date_sk) <= 30) THEN 1 ELSE 0 END)) '30 days' -, sum((CASE WHEN ((cs_ship_date_sk - cs_sold_date_sk) > 30) - AND ((cs_ship_date_sk - cs_sold_date_sk) <= 60) THEN 1 ELSE 0 END)) '31-60 days' -, sum((CASE WHEN ((cs_ship_date_sk - cs_sold_date_sk) > 60) - AND ((cs_ship_date_sk - cs_sold_date_sk) <= 90) THEN 1 ELSE 0 END)) '61-90 days' -, sum((CASE WHEN ((cs_ship_date_sk - cs_sold_date_sk) > 90) - AND ((cs_ship_date_sk - cs_sold_date_sk) <= 120) THEN 1 ELSE 0 END)) '91-120 days' -, sum((CASE WHEN ((cs_ship_date_sk - cs_sold_date_sk) > 120) THEN 1 ELSE 0 END)) '>120 days' -FROM - catalog_sales -, warehouse -, ship_mode -, call_center -, date_dim -WHERE (d_month_seq BETWEEN 1200 AND (1200 + 11)) - AND (cs_ship_date_sk = d_date_sk) - AND (cs_warehouse_sk = w_warehouse_sk) - AND (cs_ship_mode_sk = sm_ship_mode_sk) - AND (cs_call_center_sk = cc_call_center_sk) -GROUP BY substr(w_warehouse_name, 1, 20), sm_type, cc_name -ORDER BY substr(w_warehouse_name, 1, 20) ASC, sm_type ASC, cc_name ASC -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpch_sf0.1_p1/spill/q01.groovy b/regression-test/suites/tpch_sf0.1_p1/spill/q01.groovy deleted file mode 100644 index dc8390eb487263..00000000000000 --- a/regression-test/suites/tpch_sf0.1_p1/spill/q01.groovy +++ /dev/null @@ -1,51 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q01_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpch_sf0_1_p1; - """ - qt_q01 """ --- tables: lineitem -SELECT - l_returnflag, - l_linestatus, - sum(l_quantity) AS sum_qty, - sum(l_extendedprice) AS sum_base_price, - sum(l_extendedprice * (1 - l_discount)) AS sum_disc_price, - sum(l_extendedprice * (1 - l_discount) * (1 + l_tax)) AS sum_charge, - avg(l_quantity) AS avg_qty, - avg(l_extendedprice) AS avg_price, - avg(l_discount) AS avg_disc, - count(*) AS count_order -FROM - lineitem -WHERE - l_shipdate <= DATE '1998-12-01' - INTERVAL '90' DAY -GROUP BY -l_returnflag, -l_linestatus -ORDER BY -l_returnflag, -l_linestatus -""" -} \ No newline at end of file diff --git a/regression-test/suites/tpch_sf0.1_p1/spill/q02.groovy b/regression-test/suites/tpch_sf0.1_p1/spill/q02.groovy deleted file mode 100644 index 1d32eae44dc282..00000000000000 --- a/regression-test/suites/tpch_sf0.1_p1/spill/q02.groovy +++ /dev/null @@ -1,71 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q02_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpch_sf0_1_p1; - """ - qt_q02 """ --- tables: part,supplier,partsupp,nation,region -SELECT - s_acctbal, - s_name, - n_name, - p_partkey, - p_mfgr, - s_address, - s_phone, - s_comment -FROM - part, - supplier, - partsupp, - nation, - region -WHERE - p_partkey = ps_partkey - AND s_suppkey = ps_suppkey - AND p_size = 15 - AND p_type LIKE '%BRASS' - AND s_nationkey = n_nationkey - AND n_regionkey = r_regionkey - AND r_name = 'EUROPE' - AND ps_supplycost = ( - SELECT min(ps_supplycost) - FROM - partsupp, supplier, - nation, region - WHERE - p_partkey = ps_partkey - AND s_suppkey = ps_suppkey - AND s_nationkey = n_nationkey - AND n_regionkey = r_regionkey - AND r_name = 'EUROPE' - ) -ORDER BY - s_acctbal DESC, - n_name, - s_name, - p_partkey -LIMIT 100 -""" -} diff --git a/regression-test/suites/tpch_sf0.1_p1/spill/q03.groovy b/regression-test/suites/tpch_sf0.1_p1/spill/q03.groovy deleted file mode 100644 index 80d5f905f1a6b4..00000000000000 --- a/regression-test/suites/tpch_sf0.1_p1/spill/q03.groovy +++ /dev/null @@ -1,54 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q03_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpch_sf0_1_p1; - """ - qt_q03 """ --- tables: customer,orders,lineitem -SELECT -/*+SET_VAR(enable_force_spill=true, min_revocable_mem=1)*/ - l_orderkey, - sum(l_extendedprice * (1 - l_discount)) AS revenue, - o_orderdate, - o_shippriority -FROM - customer, - orders, - lineitem -WHERE - c_mktsegment = 'BUILDING' - AND c_custkey = o_custkey - AND l_orderkey = o_orderkey - AND o_orderdate < DATE '1995-03-15' - AND l_shipdate > DATE '1995-03-15' -GROUP BY - l_orderkey, - o_orderdate, - o_shippriority -ORDER BY - revenue DESC, - o_orderdate -LIMIT 10 -""" -} diff --git a/regression-test/suites/tpch_sf0.1_p1/spill/q04.groovy b/regression-test/suites/tpch_sf0.1_p1/spill/q04.groovy deleted file mode 100644 index c87e6fb13781ac..00000000000000 --- a/regression-test/suites/tpch_sf0.1_p1/spill/q04.groovy +++ /dev/null @@ -1,50 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q04_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpch_sf0_1_p1; - """ - qt_q04 """ --- tables: orders,lineitem -SELECT -/*+SET_VAR(enable_force_spill=true, min_revocable_mem=1)*/ - o_orderpriority, - count(*) AS order_count -FROM orders -WHERE - o_orderdate >= DATE '1993-07-01' - AND o_orderdate < DATE '1993-07-01' + INTERVAL '3' MONTH -AND EXISTS ( -SELECT * -FROM lineitem -WHERE -l_orderkey = o_orderkey -AND l_commitdate < l_receiptdate -) -GROUP BY -o_orderpriority -ORDER BY -o_orderpriority - -""" -} \ No newline at end of file diff --git a/regression-test/suites/tpch_sf0.1_p1/spill/q05.groovy b/regression-test/suites/tpch_sf0.1_p1/spill/q05.groovy deleted file mode 100644 index 84c14a49c49fa3..00000000000000 --- a/regression-test/suites/tpch_sf0.1_p1/spill/q05.groovy +++ /dev/null @@ -1,56 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q05_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpch_sf0_1_p1; - """ - qt_q05 """ --- tables: customer,orders,lineitem,supplier,nation,region -SELECT -/*+SET_VAR(enable_force_spill=true, min_revocable_mem=1)*/ - n_name, - sum(l_extendedprice * (1 - l_discount)) AS revenue -FROM - customer, - orders, - lineitem, - supplier, - nation, - region -WHERE - c_custkey = o_custkey - AND l_orderkey = o_orderkey - AND l_suppkey = s_suppkey - AND c_nationkey = s_nationkey - AND s_nationkey = n_nationkey - AND n_regionkey = r_regionkey - AND r_name = 'ASIA' - AND o_orderdate >= DATE '1994-01-01' - AND o_orderdate < DATE '1994-01-01' + INTERVAL '1' YEAR -GROUP BY -n_name -ORDER BY -revenue DESC - -""" -} \ No newline at end of file diff --git a/regression-test/suites/tpch_sf0.1_p1/spill/q06.groovy b/regression-test/suites/tpch_sf0.1_p1/spill/q06.groovy deleted file mode 100644 index a63c041b137fdc..00000000000000 --- a/regression-test/suites/tpch_sf0.1_p1/spill/q06.groovy +++ /dev/null @@ -1,41 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q06_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpch_sf0_1_p1; - """ - qt_q06 """ --- tables: lineitem -SELECT -/*+SET_VAR(enable_force_spill=true, min_revocable_mem=1)*/ - sum(l_extendedprice * l_discount) AS revenue -FROM - lineitem -WHERE - l_shipdate >= DATE '1994-01-01' - AND l_shipdate < DATE '1994-01-01' + INTERVAL '1' YEAR -AND l_discount BETWEEN 0.06 - 0.01 AND .06 + 0.01 -AND l_quantity < 24 - -""" -} diff --git a/regression-test/suites/tpch_sf0.1_p1/spill/q07.groovy b/regression-test/suites/tpch_sf0.1_p1/spill/q07.groovy deleted file mode 100644 index 3a09e72b7ef7a2..00000000000000 --- a/regression-test/suites/tpch_sf0.1_p1/spill/q07.groovy +++ /dev/null @@ -1,70 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q07_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpch_sf0_1_p1; - """ - qt_q07 """ --- tables: supplier,lineitem,orders,customer,nation -SELECT -/*+SET_VAR(enable_force_spill=true, min_revocable_mem=1)*/ - supp_nation, - cust_nation, - l_year, - sum(volume) AS revenue -FROM ( - SELECT - n1.n_name AS supp_nation, - n2.n_name AS cust_nation, - extract(YEAR FROM l_shipdate) AS l_year, - l_extendedprice * (1 - l_discount) AS volume - FROM - supplier, - lineitem, - orders, - customer, - nation n1, - nation n2 - WHERE - s_suppkey = l_suppkey - AND o_orderkey = l_orderkey - AND c_custkey = o_custkey - AND s_nationkey = n1.n_nationkey - AND c_nationkey = n2.n_nationkey - AND ( - (n1.n_name = 'FRANCE' AND n2.n_name = 'GERMANY') - OR (n1.n_name = 'GERMANY' AND n2.n_name = 'FRANCE') - ) - AND l_shipdate BETWEEN DATE '1995-01-01' AND DATE '1996-12-31' - ) AS shipping -GROUP BY - supp_nation, - cust_nation, - l_year -ORDER BY - supp_nation, - cust_nation, - l_year - -""" -} \ No newline at end of file diff --git a/regression-test/suites/tpch_sf0.1_p1/spill/q08.groovy b/regression-test/suites/tpch_sf0.1_p1/spill/q08.groovy deleted file mode 100644 index 0bdf04392922eb..00000000000000 --- a/regression-test/suites/tpch_sf0.1_p1/spill/q08.groovy +++ /dev/null @@ -1,69 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q08_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpch_sf0_1_p1; - """ - qt_q08 """ --- tables: part,supplier,lineitem,orders,customer,nation,region -SELECT -/*+SET_VAR(enable_force_spill=true, min_revocable_mem=1)*/ - o_year, - sum(CASE - WHEN nation = 'BRAZIL' - THEN volume - ELSE 0 - END) / sum(volume) AS mkt_share -FROM ( - SELECT - extract(YEAR FROM o_orderdate) AS o_year, - l_extendedprice * (1 - l_discount) AS volume, - n2.n_name AS nation - FROM - part, - supplier, - lineitem, - orders, - customer, - nation n1, - nation n2, - region - WHERE - p_partkey = l_partkey - AND s_suppkey = l_suppkey - AND l_orderkey = o_orderkey - AND o_custkey = c_custkey - AND c_nationkey = n1.n_nationkey - AND n1.n_regionkey = r_regionkey - AND r_name = 'AMERICA' - AND s_nationkey = n2.n_nationkey - AND o_orderdate BETWEEN DATE '1995-01-01' AND DATE '1996-12-31' - AND p_type = 'ECONOMY ANODIZED STEEL' - ) AS all_nations -GROUP BY - o_year -ORDER BY - o_year - -""" -} \ No newline at end of file diff --git a/regression-test/suites/tpch_sf0.1_p1/spill/q09.groovy b/regression-test/suites/tpch_sf0.1_p1/spill/q09.groovy deleted file mode 100644 index 282e20b9bffc76..00000000000000 --- a/regression-test/suites/tpch_sf0.1_p1/spill/q09.groovy +++ /dev/null @@ -1,62 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q09_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpch_sf0_1_p1; - """ - qt_q09 """ --- tables: part,supplier,lineitem,partsupp,orders,nation -SELECT - nation, - o_year, - sum(amount) AS sum_profit -FROM ( - SELECT - n_name AS nation, - extract(YEAR FROM o_orderdate) AS o_year, - l_extendedprice * (1 - l_discount) - ps_supplycost * l_quantity AS amount - FROM - part, - supplier, - lineitem, - partsupp, - orders, - nation - WHERE - s_suppkey = l_suppkey - AND ps_suppkey = l_suppkey - AND ps_partkey = l_partkey - AND p_partkey = l_partkey - AND o_orderkey = l_orderkey - AND s_nationkey = n_nationkey - AND p_name LIKE '%green%' - ) AS profit -GROUP BY - nation, - o_year -ORDER BY - nation, - o_year DESC - -""" -} \ No newline at end of file diff --git a/regression-test/suites/tpch_sf0.1_p1/spill/q10.groovy b/regression-test/suites/tpch_sf0.1_p1/spill/q10.groovy deleted file mode 100644 index 2626bff0fea6ed..00000000000000 --- a/regression-test/suites/tpch_sf0.1_p1/spill/q10.groovy +++ /dev/null @@ -1,64 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q10_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpch_sf0_1_p1; - """ - qt_q10 """ --- tables: customer,orders,lineitem,nation -SELECT -/*+SET_VAR(enable_force_spill=true, min_revocable_mem=1)*/ - c_custkey, - c_name, - sum(l_extendedprice * (1 - l_discount)) AS revenue, - c_acctbal, - n_name, - c_address, - c_phone, - c_comment -FROM - customer, - orders, - lineitem, - nation -WHERE - c_custkey = o_custkey - AND l_orderkey = o_orderkey - AND o_orderdate >= DATE '1993-10-01' - AND o_orderdate < DATE '1993-10-01' + INTERVAL '3' MONTH - AND l_returnflag = 'R' - AND c_nationkey = n_nationkey -GROUP BY - c_custkey, - c_name, - c_acctbal, - c_phone, - n_name, - c_address, - c_comment -ORDER BY - revenue DESC -LIMIT 20 - -""" -} \ No newline at end of file diff --git a/regression-test/suites/tpch_sf0.1_p1/spill/q11.groovy b/regression-test/suites/tpch_sf0.1_p1/spill/q11.groovy deleted file mode 100644 index 07b8a3b97715c9..00000000000000 --- a/regression-test/suites/tpch_sf0.1_p1/spill/q11.groovy +++ /dev/null @@ -1,59 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q11_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpch_sf0_1_p1; - """ - qt_q11 """ --- tables: partsupp,supplier,nation -SELECT -/*+SET_VAR(enable_force_spill=true, min_revocable_mem=1)*/ - ps_partkey, - sum(ps_supplycost * ps_availqty) AS value -FROM - partsupp, - supplier, - nation -WHERE - ps_suppkey = s_suppkey - AND s_nationkey = n_nationkey - AND n_name = 'GERMANY' -GROUP BY - ps_partkey -HAVING - sum(ps_supplycost * ps_availqty) > ( - SELECT sum(ps_supplycost * ps_availqty) * 0.0001 - FROM - partsupp, - supplier, - nation - WHERE - ps_suppkey = s_suppkey - AND s_nationkey = n_nationkey - AND n_name = 'GERMANY' - ) -ORDER BY - value DESC - -""" -} \ No newline at end of file diff --git a/regression-test/suites/tpch_sf0.1_p1/spill/q12.groovy b/regression-test/suites/tpch_sf0.1_p1/spill/q12.groovy deleted file mode 100644 index 73f5b19bdb2cfb..00000000000000 --- a/regression-test/suites/tpch_sf0.1_p1/spill/q12.groovy +++ /dev/null @@ -1,60 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q12_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpch_sf0_1_p1; - """ - qt_q12 """ --- tables: orders,lineitem -SELECT -/*+SET_VAR(enable_force_spill=true, min_revocable_mem=1)*/ - l_shipmode, - sum(CASE - WHEN o_orderpriority = '1-URGENT' - OR o_orderpriority = '2-HIGH' - THEN 1 - ELSE 0 - END) AS high_line_count, - sum(CASE - WHEN o_orderpriority <> '1-URGENT' - AND o_orderpriority <> '2-HIGH' - THEN 1 - ELSE 0 - END) AS low_line_count -FROM - orders, - lineitem -WHERE - o_orderkey = l_orderkey - AND l_shipmode IN ('MAIL', 'SHIP') - AND l_commitdate < l_receiptdate - AND l_shipdate < l_commitdate - AND l_receiptdate >= DATE '1994-01-01' - AND l_receiptdate < DATE '1994-01-01' + INTERVAL '1' YEAR -GROUP BY - l_shipmode -ORDER BY - l_shipmode - -""" -} \ No newline at end of file diff --git a/regression-test/suites/tpch_sf0.1_p1/spill/q13.groovy b/regression-test/suites/tpch_sf0.1_p1/spill/q13.groovy deleted file mode 100644 index 64cd5e0babd008..00000000000000 --- a/regression-test/suites/tpch_sf0.1_p1/spill/q13.groovy +++ /dev/null @@ -1,52 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q13_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpch_sf0_1_p1; - """ - qt_q13 """ --- tables: customer -SELECT -/*+SET_VAR(enable_force_spill=true, min_revocable_mem=1)*/ - c_count, - count(*) AS custdist -FROM ( - SELECT - c_custkey, - count(o_orderkey) AS c_count - FROM - customer - LEFT OUTER JOIN orders ON - c_custkey = o_custkey - AND o_comment NOT LIKE '%special%requests%' - GROUP BY - c_custkey - ) AS c_orders -GROUP BY - c_count -ORDER BY - custdist DESC, - c_count DESC - -""" -} \ No newline at end of file diff --git a/regression-test/suites/tpch_sf0.1_p1/spill/q14.groovy b/regression-test/suites/tpch_sf0.1_p1/spill/q14.groovy deleted file mode 100644 index 3bb423b92f1da1..00000000000000 --- a/regression-test/suites/tpch_sf0.1_p1/spill/q14.groovy +++ /dev/null @@ -1,45 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q14_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpch_sf0_1_p1; - """ - qt_q14 """ --- tables: lineitem,part -SELECT -/*+SET_VAR(enable_force_spill=true, min_revocable_mem=1)*/ - 100.00 * sum(CASE - WHEN p_type LIKE 'PROMO%' - THEN l_extendedprice * (1 - l_discount) - ELSE 0 - END) / sum(l_extendedprice * (1 - l_discount)) AS promo_revenue -FROM - lineitem, - part -WHERE - l_partkey = p_partkey - AND l_shipdate >= DATE '1995-09-01' - AND l_shipdate < DATE '1995-09-01' + INTERVAL '1' MONTH - -""" -} \ No newline at end of file diff --git a/regression-test/suites/tpch_sf0.1_p1/spill/q15.groovy b/regression-test/suites/tpch_sf0.1_p1/spill/q15.groovy deleted file mode 100644 index ffe0e68c5e8d90..00000000000000 --- a/regression-test/suites/tpch_sf0.1_p1/spill/q15.groovy +++ /dev/null @@ -1,48 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q15_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpch_sf0_1_p1; - """ - qt_q15 """ -SELECT -/*+SET_VAR(enable_force_spill=true, min_revocable_mem=1)*/ - s_suppkey, - s_name, - s_address, - s_phone, - total_revenue -FROM - supplier, - revenue1 -WHERE - s_suppkey = supplier_no - AND total_revenue = ( - SELECT max(total_revenue) - FROM - revenue1 - ) -ORDER BY - s_suppkey; -""" -} diff --git a/regression-test/suites/tpch_sf0.1_p1/spill/q16.groovy b/regression-test/suites/tpch_sf0.1_p1/spill/q16.groovy deleted file mode 100644 index b8f5347dacb6dc..00000000000000 --- a/regression-test/suites/tpch_sf0.1_p1/spill/q16.groovy +++ /dev/null @@ -1,60 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q16_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpch_sf0_1_p1; - """ - qt_q16 """ --- tables: partsupp,part,supplier -SELECT -/*+SET_VAR(enable_force_spill=true, min_revocable_mem=1)*/ - p_brand, - p_type, - p_size, - count(DISTINCT ps_suppkey) AS supplier_cnt -FROM - partsupp, - part -WHERE - p_partkey = ps_partkey - AND p_brand <> 'Brand#45' - AND p_type NOT LIKE 'MEDIUM POLISHED%' - AND p_size IN (49, 14, 23, 45, 19, 3, 36, 9) - AND ps_suppkey NOT IN ( - SELECT s_suppkey - FROM - supplier - WHERE - s_comment LIKE '%Customer%Complaints%' - ) -GROUP BY - p_brand, - p_type, - p_size -ORDER BY - supplier_cnt DESC, - p_brand, - p_type, - p_size -""" -} \ No newline at end of file diff --git a/regression-test/suites/tpch_sf0.1_p1/spill/q17.groovy b/regression-test/suites/tpch_sf0.1_p1/spill/q17.groovy deleted file mode 100644 index 01aeaa49e3d217..00000000000000 --- a/regression-test/suites/tpch_sf0.1_p1/spill/q17.groovy +++ /dev/null @@ -1,47 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q17_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpch_sf0_1_p1; - """ - qt_q17 """ --- tables: lineitem,part -SELECT -/*+SET_VAR(enable_force_spill=true, min_revocable_mem=1)*/ - sum(l_extendedprice) / 7.0 AS avg_yearly -FROM - lineitem, - part -WHERE - p_partkey = l_partkey - AND p_brand = 'Brand#23' - AND p_container = 'MED BOX' - AND l_quantity < ( - SELECT 0.2 * avg(l_quantity) - FROM - lineitem - WHERE - l_partkey = p_partkey - ) -""" -} \ No newline at end of file diff --git a/regression-test/suites/tpch_sf0.1_p1/spill/q18.groovy b/regression-test/suites/tpch_sf0.1_p1/spill/q18.groovy deleted file mode 100644 index b8d712928cf351..00000000000000 --- a/regression-test/suites/tpch_sf0.1_p1/spill/q18.groovy +++ /dev/null @@ -1,64 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q18_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpch_sf0_1_p1; - """ - qt_q18 """ --- tables: customer,orders,lineitem -SELECT -/*+SET_VAR(enable_force_spill=true, min_revocable_mem=1)*/ - c_name, - c_custkey, - o_orderkey, - o_orderdate, - o_totalprice, - sum(l_quantity) -FROM - customer, - orders, - lineitem -WHERE - o_orderkey IN ( - SELECT l_orderkey - FROM - lineitem - GROUP BY - l_orderkey - HAVING - sum(l_quantity) > 300 - ) - AND c_custkey = o_custkey - AND o_orderkey = l_orderkey -GROUP BY - c_name, - c_custkey, - o_orderkey, - o_orderdate, - o_totalprice -ORDER BY - o_totalprice DESC, - o_orderdate -LIMIT 100 -""" -} \ No newline at end of file diff --git a/regression-test/suites/tpch_sf0.1_p1/spill/q19.groovy b/regression-test/suites/tpch_sf0.1_p1/spill/q19.groovy deleted file mode 100644 index 511f875a6544f8..00000000000000 --- a/regression-test/suites/tpch_sf0.1_p1/spill/q19.groovy +++ /dev/null @@ -1,66 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q19_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpch_sf0_1_p1; - """ - qt_q19 """ --- tables: lineitem,part -SELECT -/*+SET_VAR(enable_force_spill=true, min_revocable_mem=1)*/ - sum(l_extendedprice * (1 - l_discount)) AS revenue -FROM - lineitem, - part -WHERE - ( - p_partkey = l_partkey - AND p_brand = 'Brand#12' - AND p_container IN ('SM CASE', 'SM BOX', 'SM PACK', 'SM PKG') - AND l_quantity >= 1 AND l_quantity <= 1 + 10 - AND p_size BETWEEN 1 AND 5 - AND l_shipmode IN ('AIR', 'AIR REG') - AND l_shipinstruct = 'DELIVER IN PERSON' - ) - OR - ( - p_partkey = l_partkey - AND p_brand = 'Brand#23' - AND p_container IN ('MED BAG', 'MED BOX', 'MED PKG', 'MED PACK') - AND l_quantity >= 10 AND l_quantity <= 10 + 10 - AND p_size BETWEEN 1 AND 10 - AND l_shipmode IN ('AIR', 'AIR REG') - AND l_shipinstruct = 'DELIVER IN PERSON' - ) - OR - ( - p_partkey = l_partkey - AND p_brand = 'Brand#34' - AND p_container IN ('LG CASE', 'LG BOX', 'LG PACK', 'LG PKG') - AND l_quantity >= 20 AND l_quantity <= 20 + 10 - AND p_size BETWEEN 1 AND 15 - AND l_shipmode IN ('AIR', 'AIR REG') - AND l_shipinstruct = 'DELIVER IN PERSON' - ) -""" -} \ No newline at end of file diff --git a/regression-test/suites/tpch_sf0.1_p1/spill/q20.groovy b/regression-test/suites/tpch_sf0.1_p1/spill/q20.groovy deleted file mode 100644 index 21a57bcbbe02db..00000000000000 --- a/regression-test/suites/tpch_sf0.1_p1/spill/q20.groovy +++ /dev/null @@ -1,63 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q20_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpch_sf0_1_p1; - """ - qt_q20 """ --- tables: supplier,nation,partsupp,lineitem,part -SELECT -/*+SET_VAR(enable_force_spill=true, min_revocable_mem=1)*/ - s_name, - s_address -FROM - supplier, nation -WHERE - s_suppkey IN ( - SELECT ps_suppkey - FROM - partsupp - WHERE - ps_partkey IN ( - SELECT p_partkey - FROM - part - WHERE - p_name LIKE 'forest%' - ) - AND ps_availqty > ( - SELECT 0.5 * sum(l_quantity) - FROM - lineitem - WHERE - l_partkey = ps_partkey - AND l_suppkey = ps_suppkey - AND l_shipdate >= date('1994-01-01') - AND l_shipdate < date('1994-01-01') + interval '1' YEAR -) -) -AND s_nationkey = n_nationkey -AND n_name = 'CANADA' -ORDER BY s_name -""" -} \ No newline at end of file diff --git a/regression-test/suites/tpch_sf0.1_p1/spill/q21.groovy b/regression-test/suites/tpch_sf0.1_p1/spill/q21.groovy deleted file mode 100644 index c32546362ec0bc..00000000000000 --- a/regression-test/suites/tpch_sf0.1_p1/spill/q21.groovy +++ /dev/null @@ -1,69 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q21_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpch_sf0_1_p1; - """ - qt_q21 """ --- tables: supplier,lineitem,orders,nation -SELECT -/*+SET_VAR(enable_force_spill=true, min_revocable_mem=1)*/ - s_name, - count(*) AS numwait -FROM - supplier, - lineitem l1, - orders, - nation -WHERE - s_suppkey = l1.l_suppkey - AND o_orderkey = l1.l_orderkey - AND o_orderstatus = 'F' - AND l1.l_receiptdate > l1.l_commitdate - AND exists( - SELECT * - FROM - lineitem l2 - WHERE - l2.l_orderkey = l1.l_orderkey - AND l2.l_suppkey <> l1.l_suppkey - ) - AND NOT exists( - SELECT * - FROM - lineitem l3 - WHERE - l3.l_orderkey = l1.l_orderkey - AND l3.l_suppkey <> l1.l_suppkey - AND l3.l_receiptdate > l3.l_commitdate - ) - AND s_nationkey = n_nationkey - AND n_name = 'SAUDI ARABIA' -GROUP BY - s_name -ORDER BY - numwait DESC, - s_name -LIMIT 100 -""" -} \ No newline at end of file diff --git a/regression-test/suites/tpch_sf0.1_p1/spill/q22.groovy b/regression-test/suites/tpch_sf0.1_p1/spill/q22.groovy deleted file mode 100644 index 26a15704d9b9ec..00000000000000 --- a/regression-test/suites/tpch_sf0.1_p1/spill/q22.groovy +++ /dev/null @@ -1,65 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -suite("q22_spill") { - sql """ - set enable_force_spill=true; - """ - sql """ - set min_revocable_mem=1; - """ - sql """ - use regression_test_tpch_sf0_1_p1; - """ - qt_q22 """ --- tables: orders,customer -SELECT -/*+SET_VAR(enable_force_spill=true, min_revocable_mem=1)*/ - cntrycode, - count(*) AS numcust, - sum(c_acctbal) AS totacctbal -FROM ( - SELECT - substr(c_phone, 1, 2) AS cntrycode, - c_acctbal - FROM - customer - WHERE - substr(c_phone, 1, 2) IN - ('13', '31', '23', '29', '30', '18', '17') - AND c_acctbal > ( - SELECT avg(c_acctbal) - FROM - customer - WHERE - c_acctbal > 0.00 - AND substr(c_phone, 1, 2) IN - ('13', '31', '23', '29', '30', '18', '17') - ) - AND NOT exists( - SELECT * - FROM - orders - WHERE - o_custkey = c_custkey - ) - ) AS custsale -GROUP BY - cntrycode -ORDER BY - cntrycode -""" -} \ No newline at end of file diff --git a/regression-test/suites/tpch_sf1_p2/spill/partitioned_agg_fault_injection.groovy b/regression-test/suites/tpch_sf1_p2/spill/partitioned_agg_fault_injection.groovy deleted file mode 100644 index f80b0a987bd134..00000000000000 --- a/regression-test/suites/tpch_sf1_p2/spill/partitioned_agg_fault_injection.groovy +++ /dev/null @@ -1,149 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -suite("partitioned_agg_fault_injection", "p2, nonConcurrent") { - multi_sql """ - use regression_test_tpch_sf1_p2; - set enable_force_spill=true; - set min_revocable_mem=1024; - """ - def test_sql = """ - select - l_orderkey, - l_suppkey, - l_partkey, - l_quantity, - l_extendedprice, - l_discount, - l_returnflag, - l_linestatus, - l_commitdate, - l_receiptdate, - l_shipinstruct, - l_shipmode, - sum(l_tax) -from - lineitem -group by - l_orderkey, - l_suppkey, - l_partkey, - l_quantity, - l_extendedprice, - l_discount, - l_returnflag, - l_linestatus, - l_commitdate, - l_receiptdate, - l_shipinstruct, - l_shipmode - """ - try { - GetDebugPoint().enableDebugPointForAllBEs("fault_inject::spill_stream::spill_block") - sql test_sql - } catch(Exception e) { - log.error(e.getMessage()) - assertTrue(e.getMessage().contains("fault_inject spill_stream spill_block failed")) - } finally { - GetDebugPoint().disableDebugPointForAllBEs("fault_inject::spill_stream::spill_block") - } - - try { - GetDebugPoint().enableDebugPointForAllBEs("fault_inject::spill_stream::prepare_spill") - sql test_sql - } catch(Exception e) { - log.error(e.getMessage()) - assertTrue(e.getMessage().contains("fault_inject spill_stream prepare_spill failed")) - } finally { - GetDebugPoint().disableDebugPointForAllBEs("fault_inject::spill_stream::prepare_spill") - } - - try { - GetDebugPoint().enableDebugPointForAllBEs("fault_inject::spill_stream::spill_eof") - sql test_sql - } catch(Exception e) { - log.error(e.getMessage()) - assertTrue(e.getMessage().contains("fault_inject spill_stream spill_eof failed")) - } finally { - GetDebugPoint().disableDebugPointForAllBEs("fault_inject::spill_stream::spill_eof") - } - - try { - GetDebugPoint().enableDebugPointForAllBEs("fault_inject::spill_stream::read_next_block") - sql test_sql - } catch(Exception e) { - log.error(e.getMessage()) - assertTrue(e.getMessage().contains("fault_inject spill_stream read_next_block failed")) - } finally { - GetDebugPoint().disableDebugPointForAllBEs("fault_inject::spill_stream::read_next_block") - } - - try { - GetDebugPoint().enableDebugPointForAllBEs("fault_inject::partitioned_agg_sink::sink") - sql test_sql - } catch(Exception e) { - log.error(e.getMessage()) - assertTrue(e.getMessage().contains("fault_inject partitioned_agg_sink sink failed")) - } finally { - GetDebugPoint().disableDebugPointForAllBEs("fault_inject::partitioned_agg_sink::sink") - } - - try { - GetDebugPoint().enableDebugPointForAllBEs("fault_inject::partitioned_agg_sink::revoke_memory_submit_func") - sql test_sql - } catch(Exception e) { - assertTrue(e.getMessage().contains("fault_inject partitioned_agg_sink revoke_memory submit_func failed")); - } finally { - GetDebugPoint().disableDebugPointForAllBEs("fault_inject::partitioned_agg_sink::revoke_memory_submit_func") - } - - try { - GetDebugPoint().enableDebugPointForAllBEs("fault_inject::partitioned_agg_sink::revoke_memory_cancel") - sql test_sql - } catch(Exception e) { - assertTrue(e.getMessage().contains("fault_inject partitioned_agg_sink revoke_memory canceled")); - } finally { - GetDebugPoint().disableDebugPointForAllBEs("fault_inject::partitioned_agg_sink::revoke_memory_cancel") - } - - try { - GetDebugPoint().enableDebugPointForAllBEs("fault_inject::partitioned_agg_source::recover_spill_data") - sql test_sql - } catch(Exception e) { - assertTrue(e.getMessage().contains("fault_inject partitioned_agg_source recover_spill_data failed")); - } finally { - GetDebugPoint().disableDebugPointForAllBEs("fault_inject::partitioned_agg_source::recover_spill_data") - } - - try { - GetDebugPoint().enableDebugPointForAllBEs("fault_inject::partitioned_agg_source::merge_spill_data_cancel") - sql test_sql - } catch(Exception e) { - assertTrue(e.getMessage().contains("fault_inject partitioned_agg_source merge spill data canceled")); - } finally { - GetDebugPoint().disableDebugPointForAllBEs("fault_inject::partitioned_agg_source::merge_spill_data_cancel") - } - - try { - GetDebugPoint().enableDebugPointForAllBEs("fault_inject::partitioned_agg_source::submit_func") - sql test_sql - } catch(Exception e) { - assertTrue(e.getMessage().contains("fault_inject partitioned_agg_source submit_func failed")); - } finally { - GetDebugPoint().disableDebugPointForAllBEs("fault_inject::partitioned_agg_source::submit_func") - } -} \ No newline at end of file diff --git a/regression-test/suites/tpch_sf1_p2/spill/partitioned_hash_join_fault_injection.groovy b/regression-test/suites/tpch_sf1_p2/spill/partitioned_hash_join_fault_injection.groovy deleted file mode 100644 index b79e584ca97b5f..00000000000000 --- a/regression-test/suites/tpch_sf1_p2/spill/partitioned_hash_join_fault_injection.groovy +++ /dev/null @@ -1,216 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -suite("partitioned_hash_join_fault_injection", "p2, nonConcurrent") { - multi_sql """ - use regression_test_tpch_sf1_p2; - set enable_force_spill=true; - set min_revocable_mem=1024; - """ - def test_sql = """ - SELECT - L_ORDERKEY, - L_COMMENT, - O_ORDERKEY, - L_QUANTITY, - L_SHIPINSTRUCT - FROM - lineitem, - orders - WHERE - L_ORDERKEY = o_orderkey - """ - try { - GetDebugPoint().enableDebugPointForAllBEs("fault_inject::spill_stream::spill_block") - sql test_sql - } catch(Exception e) { - log.error(e.getMessage()) - assertTrue(e.getMessage().contains("fault_inject spill_stream spill_block failed")) - } finally { - GetDebugPoint().disableDebugPointForAllBEs("fault_inject::spill_stream::spill_block") - } - - try { - GetDebugPoint().enableDebugPointForAllBEs("fault_inject::spill_stream::prepare_spill") - sql test_sql - } catch(Exception e) { - log.error(e.getMessage()) - assertTrue(e.getMessage().contains("fault_inject spill_stream prepare_spill failed")) - } finally { - GetDebugPoint().disableDebugPointForAllBEs("fault_inject::spill_stream::prepare_spill") - } - - try { - GetDebugPoint().enableDebugPointForAllBEs("fault_inject::spill_stream::spill_eof") - sql test_sql - } catch(Exception e) { - log.error(e.getMessage()) - assertTrue(e.getMessage().contains("fault_inject spill_stream spill_eof failed")) - } finally { - GetDebugPoint().disableDebugPointForAllBEs("fault_inject::spill_stream::spill_eof") - } - - try { - GetDebugPoint().enableDebugPointForAllBEs("fault_inject::spill_stream::read_next_block") - sql test_sql - } catch(Exception e) { - log.error(e.getMessage()) - assertTrue(e.getMessage().contains("fault_inject spill_stream read_next_block failed")) - } finally { - GetDebugPoint().disableDebugPointForAllBEs("fault_inject::spill_stream::read_next_block") - } - - try { - GetDebugPoint().enableDebugPointForAllBEs("fault_inject::partitioned_hash_join_sink::revoke_unpartitioned_block_submit_func") - sql test_sql - } catch(Exception e) { - log.error(e.getMessage()) - assertTrue(e.getMessage().contains("fault_inject partitioned_hash_join_sink revoke_unpartitioned_block submit_func failed")) - } finally { - GetDebugPoint().disableDebugPointForAllBEs("fault_inject::partitioned_hash_join_sink::revoke_unpartitioned_block_submit_func") - } - - try { - GetDebugPoint().enableDebugPointForAllBEs("fault_inject::partitioned_hash_join_sink::revoke_memory_submit_func") - sql test_sql - } catch(Exception e) { - log.error(e.getMessage()) - assertTrue(e.getMessage().contains("fault_inject partitioned_hash_join_sink revoke_memory submit_func failed")) - } finally { - GetDebugPoint().disableDebugPointForAllBEs("fault_inject::partitioned_hash_join_sink::revoke_memory_submit_func") - } - - try { - GetDebugPoint().enableDebugPointForAllBEs("fault_inject::partitioned_hash_join_sink::revoke_memory_cancel") - sql test_sql - } catch(Exception e) { - log.error(e.getMessage()) - assertTrue(e.getMessage().contains("fault_inject partitioned_hash_join_sink revoke_memory canceled")) - } finally { - GetDebugPoint().disableDebugPointForAllBEs("fault_inject::partitioned_hash_join_sink::revoke_memory_cancel") - } - - try { - GetDebugPoint().enableDebugPointForAllBEs("fault_inject::partitioned_hash_join_sink::sink") - sql test_sql - } catch(Exception e) { - log.error(e.getMessage()) - assertTrue(e.getMessage().contains("fault_inject partitioned_hash_join_sink sink failed")) - } finally { - GetDebugPoint().disableDebugPointForAllBEs("fault_inject::partitioned_hash_join_sink::sink") - } - - try { - GetDebugPoint().enableDebugPointForAllBEs("fault_inject::partitioned_hash_join_probe::spill_probe_blocks") - sql test_sql - } catch(Exception e) { - log.error(e.getMessage()) - assertTrue(e.getMessage().contains("fault_inject partitioned_hash_join_probe spill_probe_blocks failed")) - } finally { - GetDebugPoint().disableDebugPointForAllBEs("fault_inject::partitioned_hash_join_probe::spill_probe_blocks") - } - - try { - GetDebugPoint().enableDebugPointForAllBEs("fault_inject::partitioned_hash_join_probe::spill_probe_blocks_cancel") - sql test_sql - } catch(Exception e) { - log.error(e.getMessage()) - assertTrue(e.getMessage().contains("fault_inject partitioned_hash_join_probe spill_probe_blocks canceled")) - } finally { - GetDebugPoint().disableDebugPointForAllBEs("fault_inject::partitioned_hash_join_probe::spill_probe_blocks_cancel") - } - - try { - GetDebugPoint().enableDebugPointForAllBEs("fault_inject::partitioned_hash_join_probe::spill_probe_blocks_submit_func") - sql test_sql - } catch(Exception e) { - log.error(e.getMessage()) - assertTrue(e.getMessage().contains("fault_inject partitioned_hash_join_probe spill_probe_blocks submit_func failed")) - } finally { - GetDebugPoint().disableDebugPointForAllBEs("fault_inject::partitioned_hash_join_probe::spill_probe_blocks_submit_func") - } - - try { - GetDebugPoint().enableDebugPointForAllBEs("fault_inject::partitioned_hash_join_probe::recover_build_blocks") - sql test_sql - } catch(Exception e) { - log.error(e.getMessage()) - assertTrue(e.getMessage().contains("fault_inject partitioned_hash_join_probe recover_build_blocks failed")) - } finally { - GetDebugPoint().disableDebugPointForAllBEs("fault_inject::partitioned_hash_join_probe::recover_build_blocks") - } - - try { - GetDebugPoint().enableDebugPointForAllBEs("fault_inject::partitioned_hash_join_probe::recover_build_blocks_cancel") - sql test_sql - } catch(Exception e) { - log.error(e.getMessage()) - assertTrue(e.getMessage().contains("fault_inject partitioned_hash_join_probe recover_build_blocks canceled")) - } finally { - GetDebugPoint().disableDebugPointForAllBEs("fault_inject::partitioned_hash_join_probe::recover_build_blocks_cancel") - } - - try { - GetDebugPoint().enableDebugPointForAllBEs("fault_inject::partitioned_hash_join_probe::recovery_build_blocks_submit_func") - sql test_sql - } catch(Exception e) { - log.error(e.getMessage()) - assertTrue(e.getMessage().contains("fault_inject partitioned_hash_join_probe recovery_build_blocks submit_func failed")) - } finally { - GetDebugPoint().disableDebugPointForAllBEs("fault_inject::partitioned_hash_join_probe::recovery_build_blocks_submit_func") - } - - try { - GetDebugPoint().enableDebugPointForAllBEs("fault_inject::partitioned_hash_join_probe::recover_probe_blocks") - sql test_sql - } catch(Exception e) { - log.error(e.getMessage()) - assertTrue(e.getMessage().contains("fault_inject partitioned_hash_join_probe recover_probe_blocks failed")) - } finally { - GetDebugPoint().disableDebugPointForAllBEs("fault_inject::partitioned_hash_join_probe::recover_probe_blocks") - } - - try { - GetDebugPoint().enableDebugPointForAllBEs("fault_inject::partitioned_hash_join_probe::recover_probe_blocks_cancel") - sql test_sql - } catch(Exception e) { - log.error(e.getMessage()) - assertTrue(e.getMessage().contains("fault_inject partitioned_hash_join_probe recover_probe_blocks canceled")) - } finally { - GetDebugPoint().disableDebugPointForAllBEs("fault_inject::partitioned_hash_join_probe::recover_probe_blocks_cancel") - } - - try { - GetDebugPoint().enableDebugPointForAllBEs("fault_inject::partitioned_hash_join_probe::recovery_probe_blocks_submit_func") - sql test_sql - } catch(Exception e) { - log.error(e.getMessage()) - assertTrue(e.getMessage().contains("fault_inject partitioned_hash_join_probe recovery_probe_blocks submit_func failed")) - } finally { - GetDebugPoint().disableDebugPointForAllBEs("fault_inject::partitioned_hash_join_probe::recovery_probe_blocks_submit_func") - } - - try { - GetDebugPoint().enableDebugPointForAllBEs("fault_inject::partitioned_hash_join_probe::sink") - sql test_sql - } catch(Exception e) { - log.error(e.getMessage()) - assertTrue(e.getMessage().contains("fault_inject partitioned_hash_join_probe sink failed")) - } finally { - GetDebugPoint().disableDebugPointForAllBEs("fault_inject::partitioned_hash_join_probe::sink") - } -} \ No newline at end of file diff --git a/regression-test/suites/tpch_sf1_p2/spill/spill_sort_fault_injection.groovy b/regression-test/suites/tpch_sf1_p2/spill/spill_sort_fault_injection.groovy deleted file mode 100644 index 3030b123e45170..00000000000000 --- a/regression-test/suites/tpch_sf1_p2/spill/spill_sort_fault_injection.groovy +++ /dev/null @@ -1,158 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -suite("spill_sort_fault_injection", "p2, nonConcurrent") { - multi_sql """ - use regression_test_tpch_sf1_p2; - set enable_force_spill=true; - set min_revocable_mem=1024; - """ - def test_sql = """ - select - l_orderkey, - l_linenumber, - l_partkey, - l_suppkey, - l_quantity, - l_extendedprice, - l_discount, - l_tax, - l_returnflag, - l_linestatus, - l_commitdate, - l_receiptdate, - l_shipinstruct, - l_shipmode, - l_shipdate -from - lineitem -order by - l_orderkey, - l_linenumber, - l_partkey, - l_suppkey, - l_quantity, - l_extendedprice, - l_discount, - l_tax, - l_returnflag, - l_linestatus, - l_commitdate, - l_receiptdate, - l_shipinstruct, - l_shipmode; - """ - try { - GetDebugPoint().enableDebugPointForAllBEs("fault_inject::spill_stream::spill_block") - sql test_sql - } catch(Exception e) { - log.error(e.getMessage()) - assertTrue(e.getMessage().contains("fault_inject spill_stream spill_block failed")) - } finally { - GetDebugPoint().disableDebugPointForAllBEs("fault_inject::spill_stream::spill_block") - } - - try { - GetDebugPoint().enableDebugPointForAllBEs("fault_inject::spill_stream::prepare_spill") - sql test_sql - } catch(Exception e) { - log.error(e.getMessage()) - assertTrue(e.getMessage().contains("fault_inject spill_stream prepare_spill failed")) - } finally { - GetDebugPoint().disableDebugPointForAllBEs("fault_inject::spill_stream::prepare_spill") - } - - try { - GetDebugPoint().enableDebugPointForAllBEs("fault_inject::spill_stream::spill_eof") - sql test_sql - } catch(Exception e) { - log.error(e.getMessage()) - assertTrue(e.getMessage().contains("fault_inject spill_stream spill_eof failed")) - } finally { - GetDebugPoint().disableDebugPointForAllBEs("fault_inject::spill_stream::spill_eof") - } - - try { - GetDebugPoint().enableDebugPointForAllBEs("fault_inject::spill_stream::read_next_block") - sql test_sql - } catch(Exception e) { - log.error(e.getMessage()) - assertTrue(e.getMessage().contains("fault_inject spill_stream read_next_block failed")) - } finally { - GetDebugPoint().disableDebugPointForAllBEs("fault_inject::spill_stream::read_next_block") - } - - try { - GetDebugPoint().enableDebugPointForAllBEs("fault_inject::spill_sort_sink::sink") - sql test_sql - } catch(Exception e) { - log.error(e.getMessage()) - assertTrue(e.getMessage().contains("fault_inject spill_sort_sink sink failed")) - } finally { - GetDebugPoint().disableDebugPointForAllBEs("fault_inject::spill_sort_sink::sink") - } - - try { - GetDebugPoint().enableDebugPointForAllBEs("fault_inject::spill_sort_sink::revoke_memory_cancel") - sql test_sql - } catch(Exception e) { - log.error(e.getMessage()) - assertTrue(e.getMessage().contains("fault_inject spill_sort_sink revoke_memory canceled")) - } finally { - GetDebugPoint().disableDebugPointForAllBEs("fault_inject::spill_sort_sink::revoke_memory_cancel") - } - - try { - GetDebugPoint().enableDebugPointForAllBEs("fault_inject::spill_sort_sink::revoke_memory_submit_func") - sql test_sql - } catch(Exception e) { - log.error(e.getMessage()) - assertTrue(e.getMessage().contains("fault_inject spill_sort_sink revoke_memory submit_func failed")) - } finally { - GetDebugPoint().disableDebugPointForAllBEs("fault_inject::spill_sort_sink::revoke_memory_submit_func") - } - - try { - GetDebugPoint().enableDebugPointForAllBEs("fault_inject::spill_sort_source::recover_spill_data") - sql test_sql - } catch(Exception e) { - log.error(e.getMessage()) - assertTrue(e.getMessage().contains("fault_inject spill_sort_source recover_spill_data failed")) - } finally { - GetDebugPoint().disableDebugPointForAllBEs("fault_inject::spill_sort_source::recover_spill_data") - } - - try { - GetDebugPoint().enableDebugPointForAllBEs("fault_inject::spill_sort_source::spill_merged_data") - sql test_sql - } catch(Exception e) { - log.error(e.getMessage()) - assertTrue(e.getMessage().contains("fault_inject spill_sort_source spill_merged_data failed")) - } finally { - GetDebugPoint().disableDebugPointForAllBEs("fault_inject::spill_sort_source::spill_merged_data") - } - - try { - GetDebugPoint().enableDebugPointForAllBEs("fault_inject::spill_sort_source::spill_merged_data") - sql test_sql - } catch(Exception e) { - log.error(e.getMessage()) - assertTrue(e.getMessage().contains("fault_inject spill_sort_source spill_merged_data failed")) - } finally { - GetDebugPoint().disableDebugPointForAllBEs("fault_inject::spill_sort_source::spill_merged_data") - } -} \ No newline at end of file