Enable TPC-H workload for Kudu tables

With this commit we enable loading of TPC-H data in Kudu tables and
running the 22 TPC-H queries against Kudu. Since Kudu doesn't support
the decimal data type, we had to modify the queries by using round()
function and update the test results.

Change-Id: I3a5de71fefa92a78970226d8f49ef445d28f9289
Reviewed-on: http://gerrit.cloudera.org:8080/3789
Reviewed-by: Dimitris Tsirogiannis <[email protected]>
Tested-by: Internal Jenkins


Project: http://git-wip-us.apache.org/repos/asf/incubator-impala/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-impala/commit/6fbd35fa
Tree: http://git-wip-us.apache.org/repos/asf/incubator-impala/tree/6fbd35fa
Diff: http://git-wip-us.apache.org/repos/asf/incubator-impala/diff/6fbd35fa

Branch: refs/heads/master
Commit: 6fbd35fa8798cea9e3ba97cc2f6db4de499c02b7
Parents: a7963e6
Author: Dimitris Tsirogiannis <[email protected]>
Authored: Wed Jul 13 10:48:25 2016 -0700
Committer: Internal Jenkins <[email protected]>
Committed: Thu Jul 28 04:35:11 2016 +0000

----------------------------------------------------------------------
 testdata/bin/compute-table-stats.sh             |     7 +-
 testdata/bin/create-load-data.sh                |     4 +-
 testdata/datasets/tpch/tpch_schema_template.sql |   164 +
 .../workloads/tpch/queries/tpch-kudu-q1.test    |    32 +
 .../workloads/tpch/queries/tpch-kudu-q10.test   |    60 +
 .../workloads/tpch/queries/tpch-kudu-q11.test   |  1088 +
 .../workloads/tpch/queries/tpch-kudu-q12.test   |    37 +
 .../workloads/tpch/queries/tpch-kudu-q13.test   |    69 +
 .../workloads/tpch/queries/tpch-kudu-q14.test   |    21 +
 .../workloads/tpch/queries/tpch-kudu-q15.test   |    38 +
 .../workloads/tpch/queries/tpch-kudu-q16.test   | 18351 +++++++++++++++++
 .../workloads/tpch/queries/tpch-kudu-q17.test   |    25 +
 .../workloads/tpch/queries/tpch-kudu-q18.test   |    98 +
 .../workloads/tpch/queries/tpch-kudu-q19.test   |    43 +
 .../workloads/tpch/queries/tpch-kudu-q2.test    |   151 +
 .../workloads/tpch/queries/tpch-kudu-q20.test   |   229 +
 .../workloads/tpch/queries/tpch-kudu-q21.test   |   147 +
 .../workloads/tpch/queries/tpch-kudu-q22.test   |    48 +
 .../workloads/tpch/queries/tpch-kudu-q3.test    |    40 +
 .../workloads/tpch/queries/tpch-kudu-q4.test    |    33 +
 .../workloads/tpch/queries/tpch-kudu-q5.test    |    36 +
 .../workloads/tpch/queries/tpch-kudu-q6.test    |    17 +
 .../workloads/tpch/queries/tpch-kudu-q7.test    |    49 +
 .../workloads/tpch/queries/tpch-kudu-q8.test    |    46 +
 .../workloads/tpch/queries/tpch-kudu-q9.test    |   213 +
 testdata/workloads/tpch/tpch_core.csv           |     1 +
 testdata/workloads/tpch/tpch_dimensions.csv     |     2 +-
 tests/query_test/test_tpch_queries.py           |    78 +-
 28 files changed, 21060 insertions(+), 67 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/6fbd35fa/testdata/bin/compute-table-stats.sh
----------------------------------------------------------------------
diff --git a/testdata/bin/compute-table-stats.sh 
b/testdata/bin/compute-table-stats.sh
index aaaf4d0..2ec955e 100755
--- a/testdata/bin/compute-table-stats.sh
+++ b/testdata/bin/compute-table-stats.sh
@@ -22,4 +22,9 @@ ${COMPUTE_STATS_SCRIPT} --db_names=tpch,tpch_parquet \
     --table_names=customer,lineitem,nation,orders,part,partsupp,region,supplier
 ${COMPUTE_STATS_SCRIPT} --db_names=tpch_nested_parquet
 ${COMPUTE_STATS_SCRIPT} --db_names=tpcds
-${COMPUTE_STATS_SCRIPT} --db_names=functional_kudu 
--table_names=zipcode_incomes
+
+if "$KUDU_IS_SUPPORTED"; then
+  ${COMPUTE_STATS_SCRIPT} --db_names=functional_kudu 
--table_names=zipcode_incomes
+  ${COMPUTE_STATS_SCRIPT} --db_names=tpch_kudu
+fi
+

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/6fbd35fa/testdata/bin/create-load-data.sh
----------------------------------------------------------------------
diff --git a/testdata/bin/create-load-data.sh b/testdata/bin/create-load-data.sh
index dd6f8ad..fd444a3 100755
--- a/testdata/bin/create-load-data.sh
+++ b/testdata/bin/create-load-data.sh
@@ -396,8 +396,10 @@ fi
 
 if $KUDU_IS_SUPPORTED; then
   # Tests depend on the kudu data being clean, so load the data from scratch.
-  run-step "Loading Kudu data" load-kudu.log \
+  run-step "Loading Kudu functional" load-kudu.log \
         load-data "functional-query" "core" "kudu/none/none" force
+  run-step "Loading Kudu TPCH" load-kudu-tpch.log \
+        load-data "tpch" "core" "kudu/none/none" force
 fi
 run-step "Loading Hive UDFs" build-and-copy-hive-udfs.log \
     build-and-copy-hive-udfs

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/6fbd35fa/testdata/datasets/tpch/tpch_schema_template.sql
----------------------------------------------------------------------
diff --git a/testdata/datasets/tpch/tpch_schema_template.sql 
b/testdata/datasets/tpch/tpch_schema_template.sql
index f46dc84..cdff1df 100644
--- a/testdata/datasets/tpch/tpch_schema_template.sql
+++ b/testdata/datasets/tpch/tpch_schema_template.sql
@@ -24,6 +24,32 @@ L_SHIPMODE STRING
 L_COMMENT STRING
 ---- ROW_FORMAT
 DELIMITED FIELDS TERMINATED BY '|'
+---- CREATE_KUDU
+create table {db_name}{db_suffix}.{table_name} (
+  L_ORDERKEY BIGINT,
+  L_PARTKEY BIGINT,
+  L_SUPPKEY BIGINT,
+  L_LINENUMBER INT,
+  L_QUANTITY DOUBLE,
+  L_EXTENDEDPRICE DOUBLE,
+  L_DISCOUNT DOUBLE,
+  L_TAX DOUBLE,
+  L_RETURNFLAG STRING,
+  L_LINESTATUS STRING,
+  L_SHIPDATE STRING,
+  L_COMMITDATE STRING,
+  L_RECEIPTDATE STRING,
+  L_SHIPINSTRUCT STRING,
+  L_SHIPMODE STRING,
+  L_COMMENT STRING
+)
+distribute by hash (l_orderkey) into 9 buckets
+tblproperties(
+  'storage_handler' = 'com.cloudera.kudu.hive.KuduStorageHandler',
+  'kudu.master_addresses' = '127.0.0.1:7051',
+  'kudu.table_name' = '{table_name}',
+  'kudu.key_columns' = 'l_orderkey, l_partkey, l_suppkey, l_linenumber'
+);
 ---- DEPENDENT_LOAD
 INSERT OVERWRITE TABLE {db_name}{db_suffix}.{table_name} SELECT * FROM 
{db_name}.{table_name};
 ---- LOAD
@@ -46,6 +72,25 @@ P_RETAILPRICE DECIMAL(12,2)
 P_COMMENT STRING
 ---- ROW_FORMAT
 DELIMITED FIELDS TERMINATED BY '|'
+---- CREATE_KUDU
+create table {db_name}{db_suffix}.{table_name} (
+  P_PARTKEY BIGINT,
+  P_NAME STRING,
+  P_MFGR STRING,
+  P_BRAND STRING,
+  P_TYPE STRING,
+  P_SIZE INT,
+  P_CONTAINER STRING,
+  P_RETAILPRICE DOUBLE,
+  P_COMMENT STRING
+)
+distribute by hash (p_partkey) into 9 buckets
+tblproperties(
+  'storage_handler' = 'com.cloudera.kudu.hive.KuduStorageHandler',
+  'kudu.master_addresses' = '127.0.0.1:7051',
+  'kudu.table_name' = '{table_name}',
+  'kudu.key_columns' = 'p_partkey'
+);
 ---- DEPENDENT_LOAD
 INSERT OVERWRITE TABLE {db_name}{db_suffix}.{table_name} SELECT * FROM 
{db_name}.{table_name};
 ---- LOAD
@@ -64,6 +109,21 @@ PS_SUPPLYCOST DECIMAL(12,2)
 PS_COMMENT STRING
 ---- ROW_FORMAT
 DELIMITED FIELDS TERMINATED BY '|'
+---- CREATE_KUDU
+create table {db_name}{db_suffix}.{table_name} (
+  PS_PARTKEY BIGINT,
+  PS_SUPPKEY BIGINT,
+  PS_AVAILQTY BIGINT,
+  PS_SUPPLYCOST DOUBLE,
+  PS_COMMENT STRING
+)
+distribute by hash (ps_partkey, ps_suppkey) into 9 buckets
+tblproperties(
+  'storage_handler' = 'com.cloudera.kudu.hive.KuduStorageHandler',
+  'kudu.master_addresses' = '127.0.0.1:7051',
+  'kudu.table_name' = '{table_name}',
+  'kudu.key_columns' = 'ps_partkey, ps_suppkey'
+);
 ---- DEPENDENT_LOAD
 INSERT OVERWRITE TABLE {db_name}{db_suffix}.{table_name} SELECT * FROM 
{db_name}.{table_name};
 ---- LOAD
@@ -84,6 +144,23 @@ S_ACCTBAL DECIMAL(12,2)
 S_COMMENT STRING
 ---- ROW_FORMAT
 DELIMITED FIELDS TERMINATED BY '|'
+---- CREATE_KUDU
+create table {db_name}{db_suffix}.{table_name} (
+  S_SUPPKEY BIGINT,
+  S_NAME STRING,
+  S_ADDRESS STRING,
+  S_NATIONKEY SMALLINT,
+  S_PHONE STRING,
+  S_ACCTBAL DOUBLE,
+  S_COMMENT STRING
+)
+distribute by hash (s_suppkey) into 9 buckets
+tblproperties(
+  'storage_handler' = 'com.cloudera.kudu.hive.KuduStorageHandler',
+  'kudu.master_addresses' = '127.0.0.1:7051',
+  'kudu.table_name' = '{table_name}',
+  'kudu.key_columns' = 's_suppkey'
+);
 ---- DEPENDENT_LOAD
 INSERT OVERWRITE TABLE {db_name}{db_suffix}.{table_name} SELECT * FROM 
{db_name}.{table_name};
 ---- LOAD
@@ -101,6 +178,20 @@ N_REGIONKEY SMALLINT
 N_COMMENT STRING
 ---- ROW_FORMAT
 DELIMITED FIELDS TERMINATED BY '|'
+---- CREATE_KUDU
+create table {db_name}{db_suffix}.{table_name} (
+  N_NATIONKEY SMALLINT,
+  N_NAME STRING,
+  N_REGIONKEY SMALLINT,
+  N_COMMENT STRING
+)
+distribute by hash (n_nationkey) into 9 buckets
+tblproperties(
+  'storage_handler' = 'com.cloudera.kudu.hive.KuduStorageHandler',
+  'kudu.master_addresses' = '127.0.0.1:7051',
+  'kudu.table_name' = '{table_name}',
+  'kudu.key_columns' = 'n_nationkey'
+);
 ---- DEPENDENT_LOAD
 INSERT OVERWRITE TABLE {db_name}{db_suffix}.{table_name} SELECT * FROM 
{db_name}.{table_name};
 ---- LOAD
@@ -117,6 +208,19 @@ R_NAME STRING
 R_COMMENT STRING
 ---- ROW_FORMAT
 DELIMITED FIELDS TERMINATED BY '|'
+---- CREATE_KUDU
+create table {db_name}{db_suffix}.{table_name} (
+  R_REGIONKEY SMALLINT,
+  R_NAME STRING,
+  R_COMMENT STRING
+)
+distribute by hash (r_regionkey) into 9 buckets
+tblproperties(
+  'storage_handler' = 'com.cloudera.kudu.hive.KuduStorageHandler',
+  'kudu.master_addresses' = '127.0.0.1:7051',
+  'kudu.table_name' = '{table_name}',
+  'kudu.key_columns' = 'r_regionkey'
+);
 ---- DEPENDENT_LOAD
 INSERT OVERWRITE TABLE {db_name}{db_suffix}.{table_name} SELECT * FROM 
{db_name}.{table_name};
 ---- LOAD
@@ -139,6 +243,25 @@ O_SHIPPRIORITY INT
 O_COMMENT STRING
 ---- ROW_FORMAT
 DELIMITED FIELDS TERMINATED BY '|'
+---- CREATE_KUDU
+create table {db_name}{db_suffix}.{table_name} (
+  O_ORDERKEY BIGINT,
+  O_CUSTKEY BIGINT,
+  O_ORDERSTATUS STRING,
+  O_TOTALPRICE DOUBLE,
+  O_ORDERDATE STRING,
+  O_ORDERPRIORITY STRING,
+  O_CLERK STRING,
+  O_SHIPPRIORITY INT,
+  O_COMMENT STRING
+)
+distribute by hash (o_orderkey) into 9 buckets
+tblproperties(
+  'storage_handler' = 'com.cloudera.kudu.hive.KuduStorageHandler',
+  'kudu.master_addresses' = '127.0.0.1:7051',
+  'kudu.table_name' = '{table_name}',
+  'kudu.key_columns' = 'o_orderkey'
+);
 ---- DEPENDENT_LOAD
 INSERT OVERWRITE TABLE {db_name}{db_suffix}.{table_name} SELECT * FROM 
{db_name}.{table_name};
 ---- LOAD
@@ -160,6 +283,24 @@ C_MKTSEGMENT STRING
 C_COMMENT STRING
 ---- ROW_FORMAT
 DELIMITED FIELDS TERMINATED BY '|'
+---- CREATE_KUDU
+create table {db_name}{db_suffix}.{table_name} (
+  C_CUSTKEY BIGINT,
+  C_NAME STRING,
+  C_ADDRESS STRING,
+  C_NATIONKEY SMALLINT,
+  C_PHONE STRING,
+  C_ACCTBAL DOUBLE,
+  C_MKTSEGMENT STRING,
+  C_COMMENT STRING
+)
+distribute by hash (c_custkey) into 9 buckets
+tblproperties(
+  'storage_handler' = 'com.cloudera.kudu.hive.KuduStorageHandler',
+  'kudu.master_addresses' = '127.0.0.1:7051',
+  'kudu.table_name' = '{table_name}',
+  'kudu.key_columns' = 'c_custkey'
+);
 ---- DEPENDENT_LOAD
 INSERT OVERWRITE TABLE {db_name}{db_suffix}.{table_name} SELECT * FROM 
{db_name}.{table_name};
 ---- LOAD
@@ -173,6 +314,18 @@ revenue
 ---- COLUMNS
 supplier_no bigint
 total_revenue Decimal(38,4)
+---- CREATE_KUDU
+create table {db_name}{db_suffix}.{table_name} (
+  supplier_no bigint,
+  total_revevue double
+)
+distribute by hash (supplier_no) into 9 buckets
+tblproperties(
+  'storage_handler' = 'com.cloudera.kudu.hive.KuduStorageHandler',
+  'kudu.master_addresses' = '127.0.0.1:7051',
+  'kudu.table_name' = '{table_name}',
+  'kudu.key_columns' = 'supplier_no'
+);
 ====
 ---- DATASET
 tpch
@@ -180,4 +333,15 @@ tpch
 max_revenue
 ---- COLUMNS
 max_revenue Decimal(38, 4)
+---- CREATE_KUDU
+create table {db_name}{db_suffix}.{table_name} (
+  max_revenue bigint
+)
+distribute by hash (max_revenue) into 9 buckets
+tblproperties(
+  'storage_handler' = 'com.cloudera.kudu.hive.KuduStorageHandler',
+  'kudu.master_addresses' = '127.0.0.1:7051',
+  'kudu.table_name' = '{table_name}',
+  'kudu.key_columns' = 'max_revenue'
+);
 ====

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/6fbd35fa/testdata/workloads/tpch/queries/tpch-kudu-q1.test
----------------------------------------------------------------------
diff --git a/testdata/workloads/tpch/queries/tpch-kudu-q1.test 
b/testdata/workloads/tpch/queries/tpch-kudu-q1.test
new file mode 100644
index 0000000..ffbeccc
--- /dev/null
+++ b/testdata/workloads/tpch/queries/tpch-kudu-q1.test
@@ -0,0 +1,32 @@
+====
+---- QUERY: TPCH-Q1
+# Q1 - Pricing Summary Report Query
+select
+  l_returnflag,
+  l_linestatus,
+  round(sum(l_quantity), 1) as sum_qty,
+  round(sum(l_extendedprice), 1) as sum_base_price,
+  round(sum(l_extendedprice * (1 - l_discount)), 1) as sum_disc_price,
+  round(sum(l_extendedprice * (1 - l_discount) * (1 + l_tax)), 1) as 
sum_charge,
+  round(avg(l_quantity), 1) as avg_qty,
+  round(avg(l_extendedprice), 1) as avg_price,
+  round(avg(l_discount), 1) as avg_disc,
+  count(*) as count_order
+from
+  lineitem
+where
+  l_shipdate <= '1998-09-02'
+group by
+  l_returnflag,
+  l_linestatus
+order by
+  l_returnflag,
+  l_linestatus
+---- RESULTS
+'A','F',37734107.0,56586554400.7,53758257134.9,55909065222.8,25.5,38273.1,0.0,1478493
+'N','F',991417.0,1487504710.4,1413082168.1,1469649223.2,25.5,38284.5,0.1,38854
+'N','O',74476040.0,111701729697.7,106118230307.6,110367043872.5,25.5,38249.1,0.0,2920374
+'R','F',37719753.0,56568041380.9,53741292684.6,55889619119.8,25.5,38250.9,0.1,1478870
+---- TYPES
+string, string, double, double, double, double, double, double, double, bigint
+====
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/6fbd35fa/testdata/workloads/tpch/queries/tpch-kudu-q10.test
----------------------------------------------------------------------
diff --git a/testdata/workloads/tpch/queries/tpch-kudu-q10.test 
b/testdata/workloads/tpch/queries/tpch-kudu-q10.test
new file mode 100644
index 0000000..be52a31
--- /dev/null
+++ b/testdata/workloads/tpch/queries/tpch-kudu-q10.test
@@ -0,0 +1,60 @@
+====
+---- QUERY: TPCH-Q10
+# Q10 - Returned Item Reporting Query
+# Converted select from multiple tables to joins
+select
+  c_custkey,
+  c_name,
+  round(sum(l_extendedprice * (1 - l_discount)), 1) as revenue,
+  cast (c_acctbal as bigint),
+  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 >= '1993-10-01'
+  and o_orderdate < '1994-01-01'
+  and l_returnflag = 'R'
+  and c_nationkey = n_nationkey
+group by
+  c_custkey,
+  c_name,
+  cast(c_acctbal as bigint),
+  c_phone,
+  n_name,
+  c_address,
+  c_comment
+order by
+  revenue desc
+limit 20
+---- RESULTS
+57040,'Customer#000057040',734235.2,632,'JAPAN','Eioyzjf4pp','22-895-641-3466','sits.
 slyly regular requests sleep alongside of the regular inst'
+143347,'Customer#000143347',721002.7,2557,'EGYPT','1aReFYv,Kw4','14-742-935-3718','ggle
 carefully enticing requests. final deposits use bold, bold pinto beans. 
ironic, idle re'
+60838,'Customer#000060838',679127.3,2454,'BRAZIL','64EaJ5vMAHWJlBOxJklpNc2RJiWE','12-913-494-9813','
 need to boost against the slyly regular account'
+101998,'Customer#000101998',637029.6,3790,'UNITED 
KINGDOM','01c9CILnNtfOQYmZj','33-593-865-6378','ress foxes wake slyly after the 
bold excuses. ironic platelets are furiously carefully bold theodolites'
+125341,'Customer#000125341',633508.1,4983,'GERMANY','S29ODD6bceU8QSuuEJznkNaK','17-582-695-5962','arefully
 even depths. blithely even excuses sleep furiously. foxes use except the 
dependencies. ca'
+25501,'Customer#000025501',620269.8,7725,'ETHIOPIA','  
W556MXuoiaYCCZamJI,Rn0B4ACUGdkQ8DZ','15-874-808-6793','he pending instructions 
wake carefully at the pinto beans. regular, final instructions along the slyly 
fina'
+115831,'Customer#000115831',596423.9,5098,'FRANCE','rFeBbEEyk dl 
ne7zV5fDrmiq1oK09wV7pxqCgIc','16-715-386-3788','l somas sleep. furiously final 
deposits wake blithely regular pinto b'
+84223,'Customer#000084223',594998.0,528,'UNITED KINGDOM','nAVZCs6BaWap rrM27N 
2qBnzc5WBauxbA','33-442-824-8191',' slyly final deposits haggle regular, 
pending dependencies. pending escapades wake '
+54289,'Customer#000054289',585603.4,5583,'IRAN','vXCxoCsU0Bad5JQI 
,oobkZ','20-834-292-4707','ely special foxes are quickly finally ironic p'
+39922,'Customer#000039922',584878.1,7321,'GERMANY','Zgy4s50l2GKN4pLDPBU8m342gIw6R','17-147-757-8036','y
 final requests. furiously final foxes cajole blithely special platelets. f'
+6226,'Customer#000006226',576783.8,2230,'UNITED 
KINGDOM','8gPu8,NPGkfyQQ0hcIYUGPIBWc,ybP5g,','33-657-701-3391','ending 
platelets along the express deposits cajole carefully final '
+922,'Customer#000000922',576767.5,3869,'GERMANY','Az9RFaut7NkPnc5zSD2PwHgVwr4jRzq','17-945-916-9648','luffily
 fluffy deposits. packages c'
+147946,'Customer#000147946',576455.1,2030,'ALGERIA','iANyZHjqhyy7Ajah0pTrYyhJ','10-886-956-3143','ithely
 ironic deposits haggle blithely ironic requests. quickly regu'
+115640,'Customer#000115640',569341.2,6436,'ARGENTINA','Vtgfia9qI 
7EpHgecU1X','11-411-543-4901','ost slyly along the patterns; pinto be'
+73606,'Customer#000073606',568656.9,1785,'JAPAN','xuR0Tro5yChDfOCrjkd2ol','22-437-653-6966','he
 furiously regular ideas. slowly'
+110246,'Customer#000110246',566843.0,7763,'VIETNAM','7KzflgX 
MDOq7sOkI','31-943-426-9837','egular deposits serve blithely above the fl'
+142549,'Customer#000142549',563537.2,5085,'INDONESIA','ChqEoK43OysjdHbtKCp6dKqjNyvvi9','19-955-562-2398','sleep
 pending courts. ironic deposits against the carefully unusual platelets cajole 
carefully express accounts.'
+146149,'Customer#000146149',557255.0,1791,'ROMANIA','s87fvzFQpU','29-744-164-6487','
 of the slyly silent accounts. quickly final accounts across the '
+52528,'Customer#000052528',556397.4,551,'ARGENTINA','NFztyTOR10UOJ','11-208-192-3205','
 deposits hinder. blithely pending asymptotes breach slyly regular re'
+23431,'Customer#000023431',554269.5,3381,'ROMANIA','HgiV0phqhaIa9aydNoIlb','29-915-458-2654','nusual,
 even instructions: furiously stealthy n'
+---- TYPES
+BIGINT, STRING, DOUBLE, BIGINT, STRING, STRING, STRING, STRING
+====
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/6fbd35fa/testdata/workloads/tpch/queries/tpch-kudu-q11.test
----------------------------------------------------------------------
diff --git a/testdata/workloads/tpch/queries/tpch-kudu-q11.test 
b/testdata/workloads/tpch/queries/tpch-kudu-q11.test
new file mode 100644
index 0000000..76b1108
--- /dev/null
+++ b/testdata/workloads/tpch/queries/tpch-kudu-q11.test
@@ -0,0 +1,1088 @@
+====
+---- QUERY: TPCH-Q11
+# Q11 - Important Stock Identification
+# Modifications: query was rewritten to not have a subquery in the having 
clause
+select
+  *
+from (
+  select
+    ps_partkey,
+    round(sum(ps_supplycost * ps_availqty), 2) as value
+  from
+    partsupp,
+    supplier,
+    nation
+  where
+    ps_suppkey = s_suppkey
+    and s_nationkey = n_nationkey
+    and n_name = 'GERMANY'
+  group by
+    ps_partkey
+) as inner_query
+where
+  value > (
+    select
+      round(sum(ps_supplycost * ps_availqty) * 0.0001, 2)
+    from
+      partsupp,
+      supplier,
+      nation
+    where
+      ps_suppkey = s_suppkey
+      and s_nationkey = n_nationkey
+      and n_name = 'GERMANY'
+  )
+order by
+  value desc
+---- RESULTS
+129760,17538456.86
+166726,16503353.92
+191287,16474801.97
+161758,16101755.54
+34452,15983844.72
+139035,15907078.34
+9403,15451755.62
+154358,15212937.88
+38823,15064802.86
+85606,15053957.15
+33354,14408297.4
+154747,14407580.68
+82865,14235489.78
+76094,14094247.04
+222,13937777.74
+121271,13908336
+55221,13716120.47
+22819,13666434.28
+76281,13646853.68
+85298,13581154.93
+85158,13554904
+139684,13535538.72
+31034,13498025.25
+87305,13482847.04
+10181,13445148.75
+62323,13411824.3
+26489,13377256.38
+96493,13339057.83
+56548,13329014.97
+55576,13306843.35
+159751,13306614.48
+92406,13287414.5
+182636,13223726.74
+199969,13135288.21
+62865,13001926.94
+7284,12945298.19
+197867,12944510.52
+11562,12931575.51
+75165,12916918.12
+97175,12911283.5
+140840,12896562.23
+65241,12890600.46
+166120,12876927.22
+9035,12863828.7
+144616,12853549.3
+176723,12832309.74
+170884,12792136.58
+29790,12723300.33
+95213,12555483.73
+183873,12550533.05
+171235,12476538.3
+21533,12437821.32
+17290,12432159.5
+156397,12260623.5
+122611,12222812.98
+139155,12220319.25
+146316,12215800.61
+171381,12199734.52
+198633,12078226.95
+167417,12046637.62
+59512,12043468.76
+31688,12034893.64
+159586,12001505.84
+8993,11963814.3
+120302,11857707.55
+43536,11779340.52
+9552,11776909.16
+86223,11772205.08
+53776,11758669.65
+131285,11616953.74
+91628,11611114.83
+169644,11567959.72
+182299,11567462.05
+33107,11453818.76
+104184,11436657.44
+67027,11419127.14
+176869,11371451.71
+30885,11369674.79
+54420,11345076.88
+72240,11313951.05
+178708,11294635.17
+81298,11273686.13
+158324,11243442.72
+117095,11242535.24
+176793,11237733.38
+86091,11177793.79
+116033,11145434.36
+129058,11119112.2
+193714,11104706.39
+117195,11077217.96
+49851,11043701.78
+19791,11030662.62
+75800,11012401.62
+161562,10996371.69
+10119,10980015.75
+39185,10970042.56
+47223,10950022.13
+175594,10942923.05
+111295,10893675.61
+155446,10852764.57
+156391,10839810.38
+40884,10837234.19
+141288,10837130.21
+152388,10830977.82
+33449,10830858.72
+149035,10826130.02
+162620,10814275.68
+118324,10791788.1
+38932,10777541.75
+121294,10764225.22
+48721,10762582.49
+63342,10740132.6
+5614,10724668.8
+62266,10711143.1
+100202,10696675.55
+197741,10688560.72
+169178,10648522.8
+5271,10639392.65
+34499,10584177.1
+71108,10569117.56
+137132,10539880.47
+78451,10524873.24
+150827,10503810.48
+107237,10488030.84
+101727,10473558.1
+58708,10466280.44
+89768,10465477.22
+146493,10444291.58
+55424,10444006.48
+16560,10425574.74
+133114,10415097.9
+195810,10413625.2
+76673,10391977.18
+97305,10390890.57
+134210,10387210.02
+188536,10386529.92
+122255,10335760.32
+2682,10312966.1
+43814,10303086.61
+34767,10290405.18
+165584,10273705.89
+2231,10270415.55
+111259,10263256.56
+195578,10239795.82
+21093,10217531.3
+29856,10216932.54
+133686,10213345.76
+87745,10185509.4
+135153,10179379.7
+11773,10167410.84
+76316,10165151.7
+123076,10161225.78
+91894,10130462.19
+39741,10128387.52
+111753,10119780.98
+142729,10104748.89
+116775,10097750.42
+102589,10034784.36
+186268,10012181.57
+44545,10000286.48
+23307,9966577.5
+124281,9930018.9
+69604,9925730.640000001
+21971,9908982.029999999
+58148,9895894.4
+16532,9886529.9
+159180,9883744.43
+74733,9877582.880000001
+35173,9858275.92
+7116,9856881.02
+124620,9838589.140000001
+122108,9829949.35
+67200,9828690.689999999
+164775,9821424.439999999
+9039,9816447.720000001
+14912,9803102.199999999
+190906,9791315.699999999
+130398,9781674.27
+119310,9776927.210000001
+10132,9770930.779999999
+107211,9757586.25
+113958,9757065.5
+37009,9748362.689999999
+66746,9743528.76
+134486,9731922
+15945,9731096.449999999
+55307,9717745.800000001
+56362,9714922.83
+57726,9711792.1
+57256,9708621
+112292,9701653.08
+87514,9699492.529999999
+174206,9680562.02
+72865,9679043.34
+114357,9671017.439999999
+112807,9665019.210000001
+115203,9661018.73
+177454,9658906.35
+161275,9634313.710000001
+61893,9617095.439999999
+122219,9604888.199999999
+183427,9601362.58
+59158,9599705.960000001
+61931,9584918.98
+5532,9579964.140000001
+20158,9576714.380000001
+167199,9557413.08
+38869,9550279.529999999
+86949,9541943.699999999
+198544,9538613.92
+193762,9538238.939999999
+108807,9536247.16
+168324,9535647.99
+115588,9532195.039999999
+141372,9529702.140000001
+175120,9526068.66
+163851,9522808.83
+160954,9520359.449999999
+117757,9517882.800000001
+52594,9508325.76
+60960,9498843.060000001
+70272,9495775.619999999
+44050,9495515.359999999
+152213,9494756.960000001
+121203,9492601.300000001
+70114,9491012.300000001
+167588,9484741.109999999
+136455,9476241.779999999
+4357,9464355.640000001
+6786,9463632.57
+61345,9455336.699999999
+160826,9446754.84
+71275,9440138.4
+77746,9439118.35
+91289,9437472
+56723,9435102.16
+86647,9434604.18
+131234,9432120
+198129,9427651.359999999
+165530,9426193.68
+69233,9425053.92
+6243,9423304.66
+90110,9420422.699999999
+191980,9419368.359999999
+38461,9419316.07
+167873,9419024.49
+159373,9416950.15
+128707,9413428.5
+45267,9410863.779999999
+48460,9409793.93
+197672,9406887.68
+60884,9403442.4
+15209,9403245.310000001
+138049,9401262.1
+199286,9391770.699999999
+19629,9391236.4
+134019,9390615.15
+169475,9387639.58
+165918,9379510.439999999
+135602,9374251.539999999
+162323,9367566.51
+96277,9360850.68
+98336,9359671.289999999
+119781,9356395.73
+34440,9355365
+57362,9355180.1
+167236,9352973.84
+38463,9347530.939999999
+86749,9346826.439999999
+170007,9345699.9
+193087,9343744
+150383,9332576.75
+60932,9329582.02
+128420,9328206.35
+162145,9327722.880000001
+55686,9320304.4
+163080,9304916.960000001
+160583,9303515.92
+118153,9298606.560000001
+152634,9282184.57
+84731,9276586.92
+119989,9273814.199999999
+114584,9269698.65
+131817,9268570.08
+29068,9256583.880000001
+44116,9255922
+115818,9253311.91
+103388,9239218.08
+186118,9236209.119999999
+155809,9235410.84
+147003,9234847.99
+27769,9232511.640000001
+112779,9231927.359999999
+124851,9228982.68
+158488,9227216.4
+83328,9224792.199999999
+136797,9222927.09
+141730,9216370.68
+87304,9215695.5
+156004,9215557.9
+140740,9215329.199999999
+100648,9212185.08
+174774,9211718
+37644,9211578.6
+48807,9209496.24
+95940,9207948.4
+141586,9206699.220000001
+147248,9205654.949999999
+61372,9205228.76
+52970,9204415.949999999
+26430,9203710.51
+28504,9201669.199999999
+25810,9198878.5
+125329,9198688.5
+167867,9194022.720000001
+134767,9191444.720000001
+127745,9191271.56
+69208,9187110
+155222,9186469.16
+196916,9182995.82
+195590,9176353.119999999
+169155,9175176.09
+81558,9171946.5
+185136,9171293.039999999
+114790,9168509.1
+194142,9165836.609999999
+167639,9161165
+11241,9160789.460000001
+82628,9160155.539999999
+41399,9148338
+30755,9146196.84
+6944,9143574.58
+6326,9138803.16
+101296,9135657.619999999
+181479,9121093.300000001
+76898,9120983.1
+64274,9118745.25
+175826,9117387.99
+142215,9116876.880000001
+103415,9113128.619999999
+119765,9110768.789999999
+107624,9108837.449999999
+84215,9105257.359999999
+73774,9102651.92
+173972,9102069
+69817,9095513.880000001
+86943,9092253
+138859,9087719.300000001
+162273,9085296.48
+175945,9080401.210000001
+16836,9075715.439999999
+70224,9075265.949999999
+139765,9074755.890000001
+30319,9073233.1
+3851,9072657.24
+181271,9070631.52
+162184,9068835.779999999
+81683,9067258.470000001
+153028,9067010.51
+123324,9061870.949999999
+186481,9058608.300000001
+167680,9052908.76
+165293,9050545.699999999
+122148,9046298.17
+138604,9045840.800000001
+78851,9044822.6
+137280,9042355.34
+8823,9040855.1
+163900,9040848.48
+75600,9035392.449999999
+81676,9031999.4
+46033,9031460.58
+194917,9028500
+133936,9026949.02
+33182,9024971.1
+34220,9021485.390000001
+20118,9019942.6
+178258,9019881.66
+15560,9017687.279999999
+111425,9016198.560000001
+95942,9015585.119999999
+132709,9015240.15
+39731,9014746.949999999
+154307,9012571.199999999
+23769,9008157.6
+93328,9007211.199999999
+142826,8998297.439999999
+188792,8996014
+68703,8994982.220000001
+145280,8990941.050000001
+150725,8985686.16
+172046,8982469.52
+70476,8967629.5
+124988,8966805.220000001
+17937,8963319.76
+177372,8954873.640000001
+137994,8950916.789999999
+84019,8950039.98
+40389,8946158.199999999
+69187,8941054.140000001
+4863,8939044.92
+50465,8930503.140000001
+43686,8915543.84
+131352,8909053.59
+198916,8906940.029999999
+135932,8905282.949999999
+104673,8903682
+152308,8903244.08
+135298,8900323.199999999
+156873,8899429.1
+157454,8897339.199999999
+75415,8897068.09
+46325,8895569.09
+1966,8895117.060000001
+24576,8895034.75
+19425,8890156.6
+169735,8890085.560000001
+32225,8889829.279999999
+124537,8889770.710000001
+146327,8887836.23
+121562,8887740.4
+44731,8882444.949999999
+93141,8881850.880000001
+187871,8873506.18
+71709,8873057.279999999
+151913,8869321.17
+33786,8868955.390000001
+35902,8868126.060000001
+23588,8867769.9
+24508,8867616
+161282,8866661.43
+188061,8862304
+132847,8862082
+166843,8861200.800000001
+30609,8860214.73
+56191,8856546.960000001
+160740,8852685.43
+71229,8846106.99
+91208,8845541.279999999
+10995,8845306.560000001
+78094,8839938.289999999
+36489,8838538.1
+198437,8836494.84
+151693,8833807.640000001
+185367,8829791.369999999
+65682,8820622.890000001
+65421,8819329.24
+122225,8816821.859999999
+85330,8811013.16
+64555,8810643.119999999
+104188,8808211.02
+54411,8805703.4
+39438,8805282.560000001
+70795,8800060.92
+20383,8799073.279999999
+21952,8798624.189999999
+63584,8796590
+158768,8796422.949999999
+166588,8796214.380000001
+120600,8793558.060000001
+157202,8788287.880000001
+55358,8786820.75
+168322,8786670.73
+25143,8786324.800000001
+5368,8786274.140000001
+114025,8786201.119999999
+97744,8785315.939999999
+164327,8784503.859999999
+76542,8782613.279999999
+4731,8772846.699999999
+157590,8772006.449999999
+154276,8771733.91
+28705,8771576.640000001
+100226,8769455
+179195,8769185.16
+184355,8768118.050000001
+120408,8768011.119999999
+63145,8761991.960000001
+53135,8753491.800000001
+173071,8750508.800000001
+41087,8749436.789999999
+194830,8747438.4
+43496,8743359.300000001
+30235,8741611
+26391,8741399.640000001
+191816,8740258.720000001
+47616,8737229.68
+152101,8734432.76
+163784,8730514.34
+5134,8728424.640000001
+155241,8725429.859999999
+188814,8724182.4
+140782,8720378.75
+153141,8719407.51
+169373,8718609.060000001
+41335,8714773.800000001
+197450,8714617.32
+87004,8714017.789999999
+181804,8712257.76
+122814,8711119.140000001
+109939,8709193.16
+98094,8708780.039999999
+74630,8708040.75
+197291,8706519.09
+184173,8705467.449999999
+192175,8705411.119999999
+19471,8702536.119999999
+18052,8702155.699999999
+135560,8698137.720000001
+152791,8697325.800000001
+170953,8696909.189999999
+116137,8696687.17
+7722,8696589.4
+49788,8694846.710000001
+13252,8694822.42
+12633,8694559.359999999
+193438,8690426.720000001
+17326,8689329.16
+96124,8679794.58
+143802,8676626.48
+30389,8675826.6
+75250,8675257.140000001
+72613,8673524.939999999
+123520,8672456.25
+325,8667741.279999999
+167291,8667556.18
+150119,8663403.539999999
+88420,8663355.4
+179784,8653021.34
+130884,8651970
+172611,8648217
+85373,8647796.22
+122717,8646758.539999999
+113431,8646348.34
+66015,8643349.4
+33141,8643243.18
+69786,8637396.92
+181857,8637393.279999999
+122939,8636378
+196223,8635391.02
+50532,8632648.24
+58102,8632614.539999999
+93581,8632372.359999999
+52804,8632109.25
+755,8627091.68
+16597,8623357.050000001
+119041,8622397
+89050,8621185.98
+98696,8620784.82
+94399,8620524
+151295,8616671.02
+56417,8613450.35
+121322,8612948.23
+126883,8611373.42
+29155,8610163.640000001
+114530,8608471.74
+131007,8607394.82
+128715,8606833.619999999
+72522,8601479.98
+144061,8595718.74
+83503,8595034.199999999
+112199,8590717.439999999
+9227,8587350.42
+116318,8585910.66
+41248,8585559.640000001
+159398,8584821
+105966,8582308.789999999
+137876,8580641.300000001
+122272,8580400.77
+195717,8577278.1
+165295,8571121.92
+5840,8570728.74
+120860,8570610.439999999
+66692,8567540.52
+135596,8563276.310000001
+150576,8562794.1
+7500,8562393.84
+107716,8561541.560000001
+100611,8559995.85
+171192,8557390.08
+107660,8556696.6
+13461,8556545.119999999
+90310,8555131.51
+141493,8553782.93
+71286,8552682
+136423,8551300.76
+54241,8550785.25
+120325,8549976.6
+424,8547527.1
+196543,8545907.09
+13042,8542717.18
+58332,8536074.689999999
+9191,8535663.92
+134357,8535429.9
+96207,8534900.6
+92292,8530618.779999999
+181093,8528303.52
+105064,8527491.6
+59635,8526854.08
+136974,8524351.560000001
+126694,8522783.369999999
+6247,8522606.9
+139447,8522521.92
+96313,8520949.92
+108454,8520916.25
+181254,8519496.1
+71117,8519223
+131703,8517215.279999999
+59312,8510568.359999999
+2903,8509960.35
+102838,8509527.689999999
+162806,8508906.050000001
+41527,8508222.359999999
+118416,8505858.359999999
+180203,8505024.16
+14773,8500598.279999999
+140446,8499514.24
+199641,8497362.59
+109240,8494617.119999999
+150268,8494188.380000001
+45310,8492380.65
+36552,8490733.6
+199690,8490145.800000001
+185353,8488726.68
+163615,8484985.01
+196520,8483545.039999999
+133438,8483482.35
+77285,8481442.32
+55824,8476893.9
+76753,8475522.119999999
+46129,8472717.960000001
+28358,8472515.5
+9317,8472145.32
+33823,8469721.439999999
+39055,8469145.07
+91471,8468874.560000001
+142299,8466039.550000001
+97672,8464119.800000001
+134712,8461781.789999999
+157988,8460123.199999999
+102284,8458652.439999999
+73533,8458453.32
+90599,8457874.859999999
+112160,8457863.359999999
+124792,8457633.699999999
+66097,8457573.15
+165271,8456969.01
+146925,8454887.91
+164277,8454838.5
+131290,8454811.199999999
+179386,8450909.9
+90486,8447873.859999999
+175924,8444421.66
+185922,8442394.880000001
+38492,8436438.32
+172511,8436287.34
+139539,8434180.289999999
+11926,8433199.52
+55889,8431449.880000001
+163068,8431116.4
+138772,8428406.359999999
+126821,8425180.68
+22091,8420687.880000001
+55981,8419434.380000001
+100960,8419403.460000001
+172568,8417955.210000001
+63135,8415945.529999999
+137651,8413170.35
+191353,8413039.84
+62988,8411571.48
+103417,8411541.119999999
+12052,8411519.279999999
+104260,8408516.550000001
+157129,8405730.08
+77254,8405537.220000001
+112966,8403512.890000001
+168114,8402764.560000001
+49940,8402328.199999999
+52017,8398753.6
+176179,8398087
+100215,8395906.609999999
+61256,8392811.199999999
+15366,8388907.800000001
+109479,8388027.2
+66202,8386522.83
+81707,8385761.19
+51727,8385426.4
+9980,8382754.62
+174403,8378575.73
+54558,8378041.92
+3141,8377378.22
+134829,8377105.52
+145056,8376920.76
+194020,8375157.64
+7117,8373982.27
+120146,8373796.2
+126843,8370761.28
+62117,8369493.44
+111221,8367525.81
+159337,8366092.26
+173903,8365428.48
+136438,8364065.45
+56684,8363198
+137597,8363185.94
+20039,8361138.24
+121326,8359635.52
+48435,8352863.1
+1712,8349107
+167190,8347238.7
+32113,8346452.04
+40580,8342983.32
+74785,8342519.13
+14799,8342236.75
+177291,8341736.83
+198956,8340370.65
+69179,8338465.99
+118764,8337616.56
+128814,8336435.56
+82729,8331766.88
+152048,8330638.99
+171085,8326259.5
+126730,8325974.4
+77525,8323282.5
+170653,8322840.5
+5257,8320350.78
+67350,8318987.56
+109008,8317836.54
+199043,8316603.54
+139969,8316551.54
+22634,8316531.24
+173309,8315750.25
+10887,8315019.36
+42392,8312895.96
+126040,8312623.2
+101590,8304555.42
+46891,8302192.12
+138721,8301745.62
+113715,8301533.2
+78778,8299685.64
+142908,8299447.77
+64419,8297631.8
+21396,8296272.27
+4180,8295646.92
+63534,8295383.67
+135957,8294389.86
+30126,8291920.32
+158427,8288938
+14545,8288395.92
+75548,8288287.2
+64473,8286137.44
+149553,8285714.88
+151284,8283526.65
+171091,8282934.36
+194256,8278985.34
+952,8276136
+121541,8275390.26
+177664,8275315.2
+51117,8274504.3
+66770,8273407.8
+37238,8272728.06
+46679,8270486.55
+165852,8268312.6
+99458,8266564.47
+114519,8265493.54
+7231,8264881.5
+19033,8264826.56
+125123,8262732.65
+18642,8261578.99
+50386,8261380.05
+193770,8259578.82
+7276,8258101.6
+178045,8253904.15
+49033,8253696.23
+187195,8251334.58
+10590,8249227.4
+143779,8247057.7
+35205,8245675.17
+19729,8245081.6
+144946,8240479.8
+123786,8239581.24
+70843,8237973.2
+112437,8236907.52
+5436,8236039.57
+163754,8235471.16
+115945,8234811.36
+27918,8233957.88
+105712,8233571.86
+41007,8229431.79
+40476,8226640.41
+145620,8221371.6
+7771,8220413.33
+86424,8215572.61
+129137,8215478.4
+76020,8210495.36
+140213,8209831.8
+32379,8208338.88
+130616,8207715.75
+195469,8206609.8
+191805,8205147.75
+90906,8200951.2
+170910,8195558.01
+105399,8193122.63
+123798,8192385.97
+90218,8191689.16
+114766,8189339.54
+11289,8187354.72
+178308,8185750.5
+71271,8185519.24
+1115,8184903.38
+152636,8184530.72
+151619,8182909.05
+116943,8181072.69
+28891,8181051.54
+47049,8180955
+158827,8180470.9
+92620,8179671.55
+20814,8176953.54
+179323,8176795.55
+193453,8174343.94
+56888,8173342
+28087,8169876.3
+164254,8169632.35
+57661,8168848.16
+7363,8167538.05
+164499,8167512.08
+197557,8165940.45
+5495,8164805.22
+966,8163824.79
+98435,8161771.45
+127227,8161344.92
+194100,8160978.78
+40134,8160358.08
+107341,8159952.05
+6790,8158792.66
+43851,8157101.4
+51295,8156419.2
+69512,8151537
+164274,8149869.93
+130854,8145338.85
+186865,8143586.82
+176629,8141411.2
+193739,8141377.77
+6810,8139822.6
+27732,8136724.96
+50616,8134089.82
+123908,8128920.54
+140994,8128470.82
+99039,8128290.78
+62735,8124940.5
+47829,8122796.5
+192635,8122687.57
+192429,8119268
+145812,8119165.63
+42896,8118529.8
+146877,8118266.16
+60882,8116095.04
+18254,8114783.04
+165464,8114571.8
+57936,8111927.25
+52226,8110723.32
+128571,8106788.8
+100308,8105837.04
+8872,8102395.62
+58867,8102033.19
+145153,8100222.84
+172088,8098138.2
+59398,8095845.45
+89395,8093576.1
+171961,8093538
+88736,8090762.16
+174053,8090350.11
+102237,8089103.22
+43041,8086537.9
+110219,8085296.9
+126738,8084199.2
+44787,8083628.4
+31277,8083580.76
+93595,8082188.8
+189040,8080257.21
+59851,8079024.24
+175100,8077904.01
+43429,8076729.96
+154199,8074940.76
+60963,8073894.4
+8768,8072760.96
+66095,8071421.7
+111552,8068184.48
+24563,8067500.4
+16167,8067495.24
+12662,8067248.85
+94540,8063727.16
+23308,8063463.18
+27390,8062823.25
+130660,8062787.48
+8608,8062411.16
+181552,8062008.3
+199319,8060248.56
+55475,8058850.92
+142711,8057926.58
+103499,8056978
+105943,8056698.75
+8432,8053052.16
+149392,8049675.69
+101248,8048855.49
+140962,8047260.7
+87101,8046651.83
+133107,8046476.73
+45126,8045924.4
+87508,8042966.39
+124711,8042722.72
+173169,8042224.41
+175161,8041331.98
+167787,8040075.78
+3242,8038855.53
+114789,8038628.35
+43833,8038545.83
+141198,8035110.72
+137248,8034109.35
+96673,8033491.2
+32180,8032380.72
+166493,8031902.4
+66959,8031839.4
+85628,8029693.44
+110971,8029469.7
+130395,8027463.92
+7757,8026840.37
+178446,8025379.09
+41295,8024785.53
+100956,8024179.3
+131917,8021604.78
+24224,8020463.52
+2073,8020009.64
+121622,8018462.17
+14357,8016906.3
+135601,8016209.44
+58458,8016192.52
+73036,8015799
+184722,8015680.31
+151664,8014821.96
+195090,8012680.2
+162609,8011241
+83532,8009753.85
+50166,8007137.89
+181562,8006805.96
+175165,8005319.76
+62500,8005316.28
+36342,8004333.4
+128435,8004242.88
+92516,8003836.8
+30802,8003710.88
+107418,8000430.3
+46620,7999778.35
+191803,7994734.15
+106343,7993087.76
+59362,7990397.46
+8329,7990052.9
+75133,7988244
+179023,7986829.62
+135899,7985726.64
+5824,7985340.02
+148579,7984889.56
+95888,7984735.72
+9791,7982699.79
+170437,7982370.72
+39782,7977858.24
+20605,7977556
+28682,7976960
+42172,7973399
+56137,7971405.4
+64729,7970769.72
+98643,7968603.73
+153787,7967535.58
+8932,7967222.19
+20134,7965713.28
+197635,7963507.58
+80408,7963312.17
+37728,7961875.68
+26624,7961772.31
+44736,7961144.1
+29763,7960605.03
+36147,7959463.68
+146040,7957587.66
+115469,7957485.14
+142276,7956790.63
+181280,7954037.35
+115096,7953047.55
+109650,7952258.73
+93862,7951992.24
+158325,7950728.3
+55952,7950387.06
+122397,7947106.27
+28114,7946945.72
+11966,7945197.48
+47814,7944083
+85096,7943691.06
+51657,7943593.77
+196680,7943578.89
+13141,7942730.34
+193327,7941036.25
+152612,7940663.71
+139680,7939242.36
+31134,7938318.3
+45636,7937240.85
+56694,7936015.95
+8114,7933921.88
+71518,7932261.69
+72922,7930400.64
+146699,7929167.4
+92387,7928972.67
+186289,7928786.19
+95952,7927972.78
+196514,7927180.7
+4403,7925729.04
+2267,7925649.37
+45924,7925047.68
+11493,7916722.23
+104478,7916253.6
+166794,7913842
+161995,7910874.27
+23538,7909752.06
+41093,7909579.92
+112073,7908617.57
+92814,7908262.5
+88919,7907992.5
+79753,7907933.88
+108765,7905338.98
+146530,7905336.6
+71475,7903367.58
+36289,7901946.5
+61739,7900794
+52338,7898638.08
+194299,7898421.24
+105235,7897829.94
+77207,7897752.72
+96712,7897575.27
+10157,7897046.25
+171154,7896814.5
+79373,7896186
+113808,7893353.88
+27901,7892952
+128820,7892882.72
+25891,7890511.2
+122819,7888881.02
+154731,7888301.33
+101674,7879324.6
+51968,7879102.21
+72073,7877736.11
+5182,7874521.73
+---- TYPES
+BIGINT, double
+====

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/6fbd35fa/testdata/workloads/tpch/queries/tpch-kudu-q12.test
----------------------------------------------------------------------
diff --git a/testdata/workloads/tpch/queries/tpch-kudu-q12.test 
b/testdata/workloads/tpch/queries/tpch-kudu-q12.test
new file mode 100644
index 0000000..ce40803
--- /dev/null
+++ b/testdata/workloads/tpch/queries/tpch-kudu-q12.test
@@ -0,0 +1,37 @@
+====
+---- QUERY: TPCH-Q12
+# Q12 - Shipping Mode and Order Priority Query
+select
+  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 >= '1994-01-01'
+  and l_receiptdate < '1995-01-01'
+group by
+  l_shipmode
+order by
+  l_shipmode
+---- RESULTS
+'MAIL',6202,9324
+'SHIP',6200,9262
+---- TYPES
+string, bigint, bigint
+====
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/6fbd35fa/testdata/workloads/tpch/queries/tpch-kudu-q13.test
----------------------------------------------------------------------
diff --git a/testdata/workloads/tpch/queries/tpch-kudu-q13.test 
b/testdata/workloads/tpch/queries/tpch-kudu-q13.test
new file mode 100644
index 0000000..d09613b
--- /dev/null
+++ b/testdata/workloads/tpch/queries/tpch-kudu-q13.test
@@ -0,0 +1,69 @@
+====
+---- QUERY: TPCH-Q13
+# Q13 - Customer Distribution Query
+select
+  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
+---- RESULTS
+0,50005
+9,6641
+10,6532
+11,6014
+8,5937
+12,5639
+13,5024
+19,4793
+7,4687
+17,4587
+18,4529
+20,4516
+15,4505
+14,4446
+16,4273
+21,4190
+22,3623
+6,3265
+23,3225
+24,2742
+25,2086
+5,1948
+26,1612
+27,1179
+4,1007
+28,893
+29,593
+3,415
+30,376
+31,226
+32,148
+2,134
+33,75
+34,50
+35,37
+1,17
+36,14
+38,5
+37,5
+40,4
+41,2
+39,1
+---- TYPES
+BIGINT, BIGINT
+====
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/6fbd35fa/testdata/workloads/tpch/queries/tpch-kudu-q14.test
----------------------------------------------------------------------
diff --git a/testdata/workloads/tpch/queries/tpch-kudu-q14.test 
b/testdata/workloads/tpch/queries/tpch-kudu-q14.test
new file mode 100644
index 0000000..9af3c03
--- /dev/null
+++ b/testdata/workloads/tpch/queries/tpch-kudu-q14.test
@@ -0,0 +1,21 @@
+====
+---- QUERY: TPCH-Q14
+# Q14 - Promotion Effect
+select
+  round(100.00 * sum(case
+    when p_type like 'PROMO%'
+    then l_extendedprice * (1 - l_discount)
+    else 0.0
+    end) / sum(l_extendedprice * (1 - l_discount)), 4) as promo_revenue
+from
+  lineitem,
+  part
+where
+  l_partkey = p_partkey
+  and l_shipdate >= '1995-09-01'
+  and l_shipdate < '1995-10-01'
+---- RESULTS
+16.3808
+---- TYPES
+double
+====
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/6fbd35fa/testdata/workloads/tpch/queries/tpch-kudu-q15.test
----------------------------------------------------------------------
diff --git a/testdata/workloads/tpch/queries/tpch-kudu-q15.test 
b/testdata/workloads/tpch/queries/tpch-kudu-q15.test
new file mode 100644
index 0000000..203a15a
--- /dev/null
+++ b/testdata/workloads/tpch/queries/tpch-kudu-q15.test
@@ -0,0 +1,38 @@
+====
+---- QUERY: TPCH-Q15
+# Q15 - Top Supplier Query
+with revenue_view as (
+  select
+    l_suppkey as supplier_no,
+    round(sum(l_extendedprice * (1 - l_discount)), 1) as total_revenue
+  from
+    lineitem
+  where
+    l_shipdate >= '1996-01-01'
+    and l_shipdate < '1996-04-01'
+  group by
+    l_suppkey)
+select
+  s_suppkey,
+  s_name,
+  s_address,
+  s_phone,
+  total_revenue
+from
+  supplier,
+  revenue_view
+where
+  s_suppkey = supplier_no
+  and total_revenue = (
+    select
+      max(total_revenue)
+    from
+      revenue_view
+    )
+order by
+  s_suppkey
+---- RESULTS
+8449,'Supplier#000008449','Wp34zim9qYFbVctdW','20-469-856-8873',1772627.2
+---- TYPES
+BIGINT, STRING, STRING, STRING, DOUBLE
+====
\ No newline at end of file


Reply via email to