impala-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mi...@apache.org
Subject [1/9] incubator-impala git commit: IMPALA-5376: Implement all TPCDS test cases or alternates for Impala.
Date Tue, 24 Oct 2017 18:51:36 GMT
Repository: incubator-impala
Updated Branches:
  refs/heads/master b4c24ad2a -> 308bd5d58


http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/f05bd241/testdata/workloads/tpcds/queries/tpcds-q99.test
----------------------------------------------------------------------
diff --git a/testdata/workloads/tpcds/queries/tpcds-q99.test b/testdata/workloads/tpcds/queries/tpcds-q99.test
new file mode 100644
index 0000000..1f63451
--- /dev/null
+++ b/testdata/workloads/tpcds/queries/tpcds-q99.test
@@ -0,0 +1,128 @@
+====
+---- QUERY: TPCDS-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)  as "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 )  as "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)  as "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)  as "91-120
days"
+  ,sum(case when (cs_ship_date_sk - cs_sold_date_sk  > 120) then 1 else 0 end)  as ">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)
+        ,sm_type
+        ,cc_name
+limit 100;
+---- RESULTS
+'Bad cards must make.','EXPRESS','Mid Atlantic',1270,1318,1281,0,0
+'Bad cards must make.','EXPRESS','NY Metro',1226,1287,1282,0,0
+'Bad cards must make.','EXPRESS','North Midwest',1208,1242,1294,0,0
+'Bad cards must make.','LIBRARY','Mid Atlantic',962,976,1009,0,0
+'Bad cards must make.','LIBRARY','NY Metro',978,984,999,0,0
+'Bad cards must make.','LIBRARY','North Midwest',898,959,958,0,0
+'Bad cards must make.','NEXT DAY','Mid Atlantic',1225,1328,1327,0,0
+'Bad cards must make.','NEXT DAY','NY Metro',1262,1325,1246,0,0
+'Bad cards must make.','NEXT DAY','North Midwest',1227,1300,1276,0,0
+'Bad cards must make.','OVERNIGHT','Mid Atlantic',956,935,990,0,0
+'Bad cards must make.','OVERNIGHT','NY Metro',982,930,993,0,0
+'Bad cards must make.','OVERNIGHT','North Midwest',907,990,955,0,0
+'Bad cards must make.','REGULAR','Mid Atlantic',928,974,1005,0,0
+'Bad cards must make.','REGULAR','NY Metro',942,1009,948,0,0
+'Bad cards must make.','REGULAR','North Midwest',921,968,925,0,0
+'Bad cards must make.','TWO DAY','Mid Atlantic',954,971,979,0,0
+'Bad cards must make.','TWO DAY','NY Metro',947,1013,952,0,0
+'Bad cards must make.','TWO DAY','North Midwest',904,930,947,0,0
+'Conventional childr','EXPRESS','Mid Atlantic',1214,1296,1243,0,0
+'Conventional childr','EXPRESS','NY Metro',1284,1331,1277,0,0
+'Conventional childr','EXPRESS','North Midwest',1180,1287,1226,0,0
+'Conventional childr','LIBRARY','Mid Atlantic',990,1008,962,0,0
+'Conventional childr','LIBRARY','NY Metro',983,976,981,0,0
+'Conventional childr','LIBRARY','North Midwest',925,892,953,0,0
+'Conventional childr','NEXT DAY','Mid Atlantic',1284,1315,1274,0,0
+'Conventional childr','NEXT DAY','NY Metro',1288,1280,1284,0,0
+'Conventional childr','NEXT DAY','North Midwest',1249,1278,1308,0,0
+'Conventional childr','OVERNIGHT','Mid Atlantic',897,973,926,0,0
+'Conventional childr','OVERNIGHT','NY Metro',958,963,897,0,0
+'Conventional childr','OVERNIGHT','North Midwest',942,934,937,0,0
+'Conventional childr','REGULAR','Mid Atlantic',941,1007,945,0,0
+'Conventional childr','REGULAR','NY Metro',949,928,987,0,0
+'Conventional childr','REGULAR','North Midwest',920,927,925,0,0
+'Conventional childr','TWO DAY','Mid Atlantic',926,979,1047,0,0
+'Conventional childr','TWO DAY','NY Metro',925,1007,962,0,0
+'Conventional childr','TWO DAY','North Midwest',879,980,971,0,0
+'Doors canno','EXPRESS','Mid Atlantic',1240,1245,1267,0,0
+'Doors canno','EXPRESS','NY Metro',1234,1270,1349,0,0
+'Doors canno','EXPRESS','North Midwest',1185,1238,1197,0,0
+'Doors canno','LIBRARY','Mid Atlantic',873,974,948,0,0
+'Doors canno','LIBRARY','NY Metro',987,1005,990,0,0
+'Doors canno','LIBRARY','North Midwest',947,952,1025,0,0
+'Doors canno','NEXT DAY','Mid Atlantic',1264,1276,1185,0,0
+'Doors canno','NEXT DAY','NY Metro',1263,1337,1310,0,0
+'Doors canno','NEXT DAY','North Midwest',1202,1247,1278,0,0
+'Doors canno','OVERNIGHT','Mid Atlantic',912,888,934,0,0
+'Doors canno','OVERNIGHT','NY Metro',942,1003,959,0,0
+'Doors canno','OVERNIGHT','North Midwest',896,903,911,0,0
+'Doors canno','REGULAR','Mid Atlantic',888,953,974,0,0
+'Doors canno','REGULAR','NY Metro',971,1028,946,0,0
+'Doors canno','REGULAR','North Midwest',937,974,914,0,0
+'Doors canno','TWO DAY','Mid Atlantic',974,898,985,0,0
+'Doors canno','TWO DAY','NY Metro',982,1017,997,0,0
+'Doors canno','TWO DAY','North Midwest',985,937,959,0,0
+'Important issues liv','EXPRESS','Mid Atlantic',1322,1329,1293,0,0
+'Important issues liv','EXPRESS','NY Metro',1301,1300,1239,0,0
+'Important issues liv','EXPRESS','North Midwest',1266,1228,1285,0,0
+'Important issues liv','LIBRARY','Mid Atlantic',988,997,925,0,0
+'Important issues liv','LIBRARY','NY Metro',947,963,988,0,0
+'Important issues liv','LIBRARY','North Midwest',937,972,964,0,0
+'Important issues liv','NEXT DAY','Mid Atlantic',1221,1268,1217,0,0
+'Important issues liv','NEXT DAY','NY Metro',1281,1311,1310,0,0
+'Important issues liv','NEXT DAY','North Midwest',1219,1214,1327,0,0
+'Important issues liv','OVERNIGHT','Mid Atlantic',929,1018,991,0,0
+'Important issues liv','OVERNIGHT','NY Metro',950,965,931,0,0
+'Important issues liv','OVERNIGHT','North Midwest',936,989,932,0,0
+'Important issues liv','REGULAR','Mid Atlantic',961,995,949,0,0
+'Important issues liv','REGULAR','NY Metro',972,934,1018,0,0
+'Important issues liv','REGULAR','North Midwest',905,947,941,0,0
+'Important issues liv','TWO DAY','Mid Atlantic',954,982,944,0,0
+'Important issues liv','TWO DAY','NY Metro',844,972,1006,0,0
+'Important issues liv','TWO DAY','North Midwest',914,969,960,0,0
+'NULL','EXPRESS','Mid Atlantic',1223,1314,1257,0,0
+'NULL','EXPRESS','NY Metro',1274,1296,1286,0,0
+'NULL','EXPRESS','North Midwest',1159,1329,1276,0,0
+'NULL','LIBRARY','Mid Atlantic',941,978,948,0,0
+'NULL','LIBRARY','NY Metro',886,1001,1009,0,0
+'NULL','LIBRARY','North Midwest',917,943,991,0,0
+'NULL','NEXT DAY','Mid Atlantic',1304,1264,1349,0,0
+'NULL','NEXT DAY','NY Metro',1271,1251,1291,0,0
+'NULL','NEXT DAY','North Midwest',1199,1233,1273,0,0
+'NULL','OVERNIGHT','Mid Atlantic',965,989,967,0,0
+'NULL','OVERNIGHT','NY Metro',979,993,1039,0,0
+'NULL','OVERNIGHT','North Midwest',946,1016,905,0,0
+'NULL','REGULAR','Mid Atlantic',933,994,997,0,0
+'NULL','REGULAR','NY Metro',961,1022,1034,0,0
+'NULL','REGULAR','North Midwest',893,921,949,0,0
+'NULL','TWO DAY','Mid Atlantic',972,968,972,0,0
+'NULL','TWO DAY','NY Metro',926,974,1004,0,0
+'NULL','TWO DAY','North Midwest',941,921,981,0,0
+---- TYPES
+STRING, STRING, STRING, BIGINT, BIGINT, BIGINT, BIGINT, BIGINT
+====

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/f05bd241/tests/query_test/test_tpcds_queries.py
----------------------------------------------------------------------
diff --git a/tests/query_test/test_tpcds_queries.py b/tests/query_test/test_tpcds_queries.py
index fad5da1..099d8a9 100644
--- a/tests/query_test/test_tpcds_queries.py
+++ b/tests/query_test/test_tpcds_queries.py
@@ -26,7 +26,7 @@ from tests.common.test_dimensions import (
 
 class TestTpcdsQuery(ImpalaTestSuite):
   @classmethod
-  def get_workload(self):
+  def get_workload(cls):
     return 'tpcds'
 
   @classmethod
@@ -52,101 +52,226 @@ class TestTpcdsQuery(ImpalaTestSuite):
     self.run_test_case('count', vector)
 
   def test_tpcds_q1(self, vector):
-    self.run_test_case('tpcds-q1', vector)
+    self.run_test_case(self.get_workload() + '-q1', vector)
 
   def test_tpcds_q2(self, vector):
-    self.run_test_case('tpcds-q2', vector)
+    self.run_test_case(self.get_workload() + '-q2', vector)
 
   def test_tpcds_q3(self, vector):
-    self.run_test_case('tpcds-q3', vector)
+    self.run_test_case(self.get_workload() + '-q3', vector)
 
   def test_tpcds_q4(self, vector):
-    self.run_test_case('tpcds-q4', vector)
+    self.run_test_case(self.get_workload() + '-q4', vector)
 
   def test_tpcds_q6(self, vector):
-    self.run_test_case('tpcds-q6', vector)
+    self.run_test_case(self.get_workload() + '-q6', vector)
 
   def test_tpcds_q7(self, vector):
-    self.run_test_case('tpcds-q7', vector)
+    self.run_test_case(self.get_workload() + '-q7', vector)
 
   def test_tpcds_q8(self, vector):
-    self.run_test_case('tpcds-q8', vector)
+    self.run_test_case(self.get_workload() + '-q8', vector)
+
+  def test_tpcds_q10a(self, vector):
+    self.run_test_case(self.get_workload() + '-q10a', vector)
+
+  def test_tpcds_q11(self, vector):
+    self.run_test_case(self.get_workload() + '-q11', vector)
+
+  def test_tpcds_q12(self, vector):
+    self.run_test_case(self.get_workload() + '-q12', vector)
+
+  def test_tpcds_q13(self, vector):
+    self.run_test_case(self.get_workload() + '-q13', vector)
+
+  def test_tpcds_q15(self, vector):
+    self.run_test_case(self.get_workload() + '-q15', vector)
+
+  def test_tpcds_q16(self, vector):
+    self.run_test_case(self.get_workload() + '-q16', vector)
+
+  def test_tpcds_q17(self, vector):
+    self.run_test_case(self.get_workload() + '-q17', vector)
+
+  def test_tpcds_q18a(self, vector):
+    self.run_test_case(self.get_workload() + '-q18a', vector)
 
   def test_tpcds_q19(self, vector):
-    self.run_test_case('tpcds-q19', vector)
+    self.run_test_case(self.get_workload() + '-q19', vector)
+
+  def test_tpcds_q20(self, vector):
+    self.run_test_case(self.get_workload() + '-q20', vector)
+
+  def test_tpcds_q21(self, vector):
+    self.run_test_case(self.get_workload() + '-q21', vector)
 
-  def test_tpcds_q23(self, vector):
-    self.run_test_case('tpcds-q23-1', vector)
-    self.run_test_case('tpcds-q23-2', vector)
+  def test_tpcds_q22a(self, vector):
+    self.run_test_case(self.get_workload() + '-q22a', vector)
 
-  def test_tpcds_q27(self, vector):
-    self.run_test_case('tpcds-q27', vector)
-    self.run_test_case('tpcds-q27a', vector)
+  def test_tpcds_q25(self, vector):
+    self.run_test_case(self.get_workload() + '-q25', vector)
 
-  def test_tpcds_q28(self, vector):
-    self.run_test_case('tpcds-q28', vector)
+  def test_tpcds_q29(self, vector):
+    self.run_test_case(self.get_workload() + '-q29', vector)
+
+  def test_tpcds_q32(self, vector):
+    self.run_test_case(self.get_workload() + '-q32', vector)
+
+  def test_tpcds_q33(self, vector):
+    self.run_test_case(self.get_workload() + '-q33', vector)
 
   def test_tpcds_q34(self, vector):
-    self.run_test_case('tpcds-q34', vector)
+    self.run_test_case(self.get_workload() + '-q34', vector)
+
+  def test_tpcds_q37(self, vector):
+    self.run_test_case(self.get_workload() + '-q37', vector)
+
+  def test_tpcds_q39_1(self, vector):
+    self.run_test_case(self.get_workload() + '-q39-1', vector)
+
+  def test_tpcds_q39_2(self, vector):
+    self.run_test_case(self.get_workload() + '-q39-2', vector)
+
+  def test_tpcds_q40(self, vector):
+    self.run_test_case(self.get_workload() + '-q40', vector)
+
+  def test_tpcds_q41(self, vector):
+    self.run_test_case(self.get_workload() + '-q41', vector)
 
   def test_tpcds_q42(self, vector):
-    self.run_test_case('tpcds-q42', vector)
+    self.run_test_case(self.get_workload() + '-q42', vector)
 
   def test_tpcds_q43(self, vector):
-    self.run_test_case('tpcds-q43', vector)
+    self.run_test_case(self.get_workload() + '-q43', vector)
 
   def test_tpcds_q46(self, vector):
-    self.run_test_case('tpcds-q46', vector)
+    self.run_test_case(self.get_workload() + '-q46', vector)
+
+  def test_tpcds_q50(self, vector):
+    self.run_test_case(self.get_workload() + '-q50', vector)
+
+  def test_tpcds_q51(self, vector):
+    self.run_test_case(self.get_workload() + '-q51', vector)
 
-  def test_tpcds_q47(self, vector):
-    self.run_test_case('tpcds-q47', vector)
+  def test_tpcds_q51a(self, vector):
+    self.run_test_case(self.get_workload() + '-q51a', vector)
 
   def test_tpcds_q52(self, vector):
-    self.run_test_case('tpcds-q52', vector)
+    self.run_test_case(self.get_workload() + '-q52', vector)
 
   def test_tpcds_q53(self, vector):
-    self.run_test_case('tpcds-q53', vector)
+    self.run_test_case(self.get_workload() + '-q53', vector)
+
+  def test_tpcds_q54(self, vector):
+    self.run_test_case(self.get_workload() + '-q54', vector)
 
   def test_tpcds_q55(self, vector):
-    self.run_test_case('tpcds-q55', vector)
+    self.run_test_case(self.get_workload() + '-q55', vector)
+
+  def test_tpcds_q56(self, vector):
+    self.run_test_case(self.get_workload() + '-q56', vector)
 
-  def test_tpcds_q59(self, vector):
-    self.run_test_case('tpcds-q59', vector)
+  def test_tpcds_q60(self, vector):
+    self.run_test_case(self.get_workload() + '-q60', vector)
 
   def test_tpcds_q61(self, vector):
-    self.run_test_case('tpcds-q61', vector)
+    self.run_test_case(self.get_workload() + '-q61', vector)
 
-  def test_tpcds_q63(self, vector):
-    self.run_test_case('tpcds-q63', vector)
+  def test_tpcds_q62(self, vector):
+    self.run_test_case(self.get_workload() + '-q62', vector)
+
+  def test_tpcds_q64(self, vector):
+    self.run_test_case(self.get_workload() + '-q64', vector)
 
   def test_tpcds_q65(self, vector):
-    self.run_test_case('tpcds-q65', vector)
+    self.run_test_case(self.get_workload() + '-q65', vector)
+
+  def test_tpcds_q67a(self, vector):
+    self.run_test_case(self.get_workload() + '-q67a', vector)
 
   def test_tpcds_q68(self, vector):
-    self.run_test_case('tpcds-q68', vector)
+    self.run_test_case(self.get_workload() + '-q68', vector)
+
+  def test_tpcds_q69(self, vector):
+    self.run_test_case(self.get_workload() + '-q69', vector)
+
+  def test_tpcds_q70a(self, vector):
+    self.run_test_case(self.get_workload() + '-q70a', vector)
+
+  def test_tpcds_q71(self, vector):
+    self.run_test_case(self.get_workload() + '-q71', vector)
+
+  def test_tpcds_q72(self, vector):
+    self.run_test_case(self.get_workload() + '-q72', vector)
 
   def test_tpcds_q73(self, vector):
-    self.run_test_case('tpcds-q73', vector)
+    self.run_test_case(self.get_workload() + '-q73', vector)
+
+  def test_tpcds_q74(self, vector):
+    self.run_test_case(self.get_workload() + '-q74', vector)
+
+  def test_tpcds_q75(self, vector):
+    self.run_test_case(self.get_workload() + '-q75', vector)
+
+  def test_tpcds_q76(self, vector):
+    self.run_test_case(self.get_workload() + '-q76', vector)
+
+  def test_tpcds_q77a(self, vector):
+    self.run_test_case(self.get_workload() + '-q77a', vector)
+
+  def test_tpcds_q78(self, vector):
+    self.run_test_case(self.get_workload() + '-q78', vector)
 
   def test_tpcds_q79(self, vector):
-    self.run_test_case('tpcds-q79', vector)
+    self.run_test_case(self.get_workload() + '-q79', vector)
+
+  def test_tpcds_q80a(self, vector):
+    self.run_test_case(self.get_workload() + '-q80a', vector)
+
+  def test_tpcds_q81(self, vector):
+    self.run_test_case(self.get_workload() + '-q81', vector)
+
+  def test_tpcds_q82(self, vector):
+    self.run_test_case(self.get_workload() + '-q82', vector)
+
+  def test_tpcds_q84(self, vector):
+    self.run_test_case(self.get_workload() + '-q84', vector)
+
+  def test_tpcds_q86a(self, vector):
+    self.run_test_case(self.get_workload() + '-q86a', vector)
 
   def test_tpcds_q88(self, vector):
-    self.run_test_case('tpcds-q88', vector)
+    self.run_test_case(self.get_workload() + '-q88', vector)
+
+  def test_tpcds_q91(self, vector):
+    self.run_test_case(self.get_workload() + '-q91', vector)
 
-  def test_tpcds_q89(self, vector):
-    self.run_test_case('tpcds-q89', vector)
+  def test_tpcds_q92(self, vector):
+    self.run_test_case(self.get_workload() + '-q92', vector)
+
+  def test_tpcds_q94(self, vector):
+    self.run_test_case(self.get_workload() + '-q94', vector)
+
+  def test_tpcds_q95(self, vector):
+    self.run_test_case(self.get_workload() + '-q95', vector)
 
   def test_tpcds_q96(self, vector):
-    self.run_test_case('tpcds-q96', vector)
+    self.run_test_case(self.get_workload() + '-q96', vector)
+
+  def test_tpcds_q97(self, vector):
+    self.run_test_case(self.get_workload() + '-q97', vector)
 
   def test_tpcds_q98(self, vector):
-    self.run_test_case('tpcds-q98', vector)
+    self.run_test_case(self.get_workload() + '-q98', vector)
+
+  def test_tpcds_q99(self, vector):
+    self.run_test_case(self.get_workload() + '-q99', vector)
+
 
 class TestTpcdsInsert(ImpalaTestSuite):
   @classmethod
   def get_workload(self):
-    return 'tpcds-insert'
+    return TestTpcdsQuery.get_workload() + '-insert'
 
   @classmethod
   def add_test_dimensions(cls):


Mime
View raw message