You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by ta...@apache.org on 2018/01/18 04:27:52 UTC

[12/12] impala git commit: IMPALA-5478: Run TPCDS queries with decimal_v2 enabled

IMPALA-5478: Run TPCDS queries with decimal_v2 enabled

We add new TPCDS .test files that are expected to be run with decimal_v2
enabled. The new expected results were generated using Impala and I
inspected them manually.

Change-Id: Ib867c51a521ec4a087bc127d99aee4b95ba97733
Reviewed-on: http://gerrit.cloudera.org:8080/8985
Reviewed-by: Michael Brown <mi...@cloudera.com>
Tested-by: Impala Public Jenkins


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

Branch: refs/heads/master
Commit: 35a3e186d61b8f365b0f7d1127be311758437e16
Parents: d9b6fd0
Author: Taras Bobrovytsky <tb...@cloudera.com>
Authored: Mon Jan 8 19:17:44 2018 -0800
Committer: Impala Public Jenkins <im...@gerrit.cloudera.org>
Committed: Thu Jan 18 03:28:51 2018 +0000

----------------------------------------------------------------------
 .../tpcds/queries/tpcds-decimal_v2-q1.test      |  129 +
 .../tpcds/queries/tpcds-decimal_v2-q10a.test    |   70 +
 .../tpcds/queries/tpcds-decimal_v2-q11.test     |  172 ++
 .../tpcds/queries/tpcds-decimal_v2-q12.test     |  137 +
 .../tpcds/queries/tpcds-decimal_v2-q13.test     |   56 +
 .../tpcds/queries/tpcds-decimal_v2-q15.test     |  123 +
 .../tpcds/queries/tpcds-decimal_v2-q16.test     |   35 +
 .../tpcds/queries/tpcds-decimal_v2-q17.test     |   49 +
 .../tpcds/queries/tpcds-decimal_v2-q18a.test    |  159 ++
 .../tpcds/queries/tpcds-decimal_v2-q19.test     |  141 +
 .../tpcds/queries/tpcds-decimal_v2-q2.test      | 2576 ++++++++++++++++++
 .../tpcds/queries/tpcds-decimal_v2-q20.test     |  133 +
 .../tpcds/queries/tpcds-decimal_v2-q21.test     |  133 +
 .../tpcds/queries/tpcds-decimal_v2-q22a.test    |  147 +
 .../tpcds/queries/tpcds-decimal_v2-q25.test     |   52 +
 .../tpcds/queries/tpcds-decimal_v2-q29.test     |   51 +
 .../tpcds/queries/tpcds-decimal_v2-q3.test      |  118 +
 .../tpcds/queries/tpcds-decimal_v2-q32.test     |   32 +
 .../tpcds/queries/tpcds-decimal_v2-q33.test     |  178 ++
 .../tpcds/queries/tpcds-decimal_v2-q34.test     |  504 ++++
 .../tpcds/queries/tpcds-decimal_v2-q37.test     |   22 +
 .../tpcds/queries/tpcds-decimal_v2-q39-1.test   |  278 ++
 .../tpcds/queries/tpcds-decimal_v2-q39-2.test   |   50 +
 .../tpcds/queries/tpcds-decimal_v2-q4.test      |  126 +
 .../tpcds/queries/tpcds-decimal_v2-q40.test     |  131 +
 .../tpcds/queries/tpcds-decimal_v2-q41.test     |   59 +
 .../tpcds/queries/tpcds-decimal_v2-q42.test     |   41 +
 .../tpcds/queries/tpcds-decimal_v2-q43.test     |   45 +
 .../tpcds/queries/tpcds-decimal_v2-q46.test     |  156 ++
 .../tpcds/queries/tpcds-decimal_v2-q50.test     |   68 +
 .../tpcds/queries/tpcds-decimal_v2-q51.test     |  148 +
 .../tpcds/queries/tpcds-decimal_v2-q51a.test    |  166 ++
 .../tpcds/queries/tpcds-decimal_v2-q52.test     |  130 +
 .../tpcds/queries/tpcds-decimal_v2-q53.test     |  140 +
 .../tpcds/queries/tpcds-decimal_v2-q54.test     |   60 +
 .../tpcds/queries/tpcds-decimal_v2-q55.test     |  127 +
 .../tpcds/queries/tpcds-decimal_v2-q56.test     |  171 ++
 .../tpcds/queries/tpcds-decimal_v2-q6.test      |   75 +
 .../tpcds/queries/tpcds-decimal_v2-q60.test     |  181 ++
 .../tpcds/queries/tpcds-decimal_v2-q61.test     |   49 +
 .../tpcds/queries/tpcds-decimal_v2-q62.test     |  138 +
 .../tpcds/queries/tpcds-decimal_v2-q64.test     |  144 +
 .../tpcds/queries/tpcds-decimal_v2-q65.test     |  160 ++
 .../tpcds/queries/tpcds-decimal_v2-q67a.test    |  174 ++
 .../tpcds/queries/tpcds-decimal_v2-q68.test     |  155 ++
 .../tpcds/queries/tpcds-decimal_v2-q69.test     |  150 +
 .../tpcds/queries/tpcds-decimal_v2-q7.test      |  134 +
 .../tpcds/queries/tpcds-decimal_v2-q70a.test    |   49 +
 .../tpcds/queries/tpcds-decimal_v2-q71.test     | 1061 ++++++++
 .../tpcds/queries/tpcds-decimal_v2-q72.test     |  132 +
 .../tpcds/queries/tpcds-decimal_v2-q73.test     |   43 +
 .../tpcds/queries/tpcds-decimal_v2-q74.test     |  156 ++
 .../tpcds/queries/tpcds-decimal_v2-q75.test     |  173 ++
 .../tpcds/queries/tpcds-decimal_v2-q76.test     |  127 +
 .../tpcds/queries/tpcds-decimal_v2-q77a.test    |  166 ++
 .../tpcds/queries/tpcds-decimal_v2-q78.test     |  163 ++
 .../tpcds/queries/tpcds-decimal_v2-q79.test     |  149 +
 .../tpcds/queries/tpcds-decimal_v2-q8.test      |   74 +
 .../tpcds/queries/tpcds-decimal_v2-q80a.test    |  212 ++
 .../tpcds/queries/tpcds-decimal_v2-q81.test     |  134 +
 .../tpcds/queries/tpcds-decimal_v2-q82.test     |   22 +
 .../tpcds/queries/tpcds-decimal_v2-q84.test     |   49 +
 .../tpcds/queries/tpcds-decimal_v2-q86a.test    |  139 +
 .../tpcds/queries/tpcds-decimal_v2-q88.test     |   97 +
 .../tpcds/queries/tpcds-decimal_v2-q91.test     |   35 +
 .../tpcds/queries/tpcds-decimal_v2-q92.test     |   34 +
 .../tpcds/queries/tpcds-decimal_v2-q94.test     |   33 +
 .../tpcds/queries/tpcds-decimal_v2-q95.test     |   36 +
 .../tpcds/queries/tpcds-decimal_v2-q96.test     |   21 +
 .../tpcds/queries/tpcds-decimal_v2-q97.test     |   29 +
 .../tpcds/queries/tpcds-decimal_v2-q98.test     | 2550 +++++++++++++++++
 .../tpcds/queries/tpcds-decimal_v2-q99.test     |  128 +
 .../workloads/tpcds/queries/tpcds-q22a.test     |  148 -
 tests/common/test_vector.py                     |    4 +
 tests/query_test/test_tpcds_queries.py          |  243 +-
 75 files changed, 14329 insertions(+), 151 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/impala/blob/35a3e186/testdata/workloads/tpcds/queries/tpcds-decimal_v2-q1.test
----------------------------------------------------------------------
diff --git a/testdata/workloads/tpcds/queries/tpcds-decimal_v2-q1.test b/testdata/workloads/tpcds/queries/tpcds-decimal_v2-q1.test
new file mode 100644
index 0000000..530f010
--- /dev/null
+++ b/testdata/workloads/tpcds/queries/tpcds-decimal_v2-q1.test
@@ -0,0 +1,129 @@
+====
+---- QUERY: TPCDS-Q1
+with customer_total_return as
+(select sr_customer_sk as ctr_customer_sk,
+        sr_store_sk as ctr_store_sk,
+        sum(SR_RETURN_AMT) as 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)*1.2
+       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
+limit 100;
+---- RESULTS
+'AAAAAAAAAAABBAAA'
+'AAAAAAAAAAADBAAA'
+'AAAAAAAAAAADBAAA'
+'AAAAAAAAAAAKAAAA'
+'AAAAAAAAAABDAAAA'
+'AAAAAAAAAABHBAAA'
+'AAAAAAAAAABLAAAA'
+'AAAAAAAAAABMAAAA'
+'AAAAAAAAAACHAAAA'
+'AAAAAAAAAACMAAAA'
+'AAAAAAAAAADDAAAA'
+'AAAAAAAAAADGAAAA'
+'AAAAAAAAAADGBAAA'
+'AAAAAAAAAADGBAAA'
+'AAAAAAAAAADPAAAA'
+'AAAAAAAAAAEBAAAA'
+'AAAAAAAAAAEFBAAA'
+'AAAAAAAAAAEGBAAA'
+'AAAAAAAAAAEIAAAA'
+'AAAAAAAAAAEMAAAA'
+'AAAAAAAAAAFAAAAA'
+'AAAAAAAAAAFPAAAA'
+'AAAAAAAAAAGGBAAA'
+'AAAAAAAAAAGHBAAA'
+'AAAAAAAAAAGJAAAA'
+'AAAAAAAAAAGMAAAA'
+'AAAAAAAAAAHEBAAA'
+'AAAAAAAAAAHFBAAA'
+'AAAAAAAAAAIEBAAA'
+'AAAAAAAAAAJGBAAA'
+'AAAAAAAAAAJHBAAA'
+'AAAAAAAAAAKCAAAA'
+'AAAAAAAAAAKCAAAA'
+'AAAAAAAAAAKJAAAA'
+'AAAAAAAAAAKMAAAA'
+'AAAAAAAAAAKMAAAA'
+'AAAAAAAAAALAAAAA'
+'AAAAAAAAAALABAAA'
+'AAAAAAAAAALGAAAA'
+'AAAAAAAAAALHBAAA'
+'AAAAAAAAAALJAAAA'
+'AAAAAAAAAANHAAAA'
+'AAAAAAAAAANHBAAA'
+'AAAAAAAAAANJAAAA'
+'AAAAAAAAAANMAAAA'
+'AAAAAAAAAANMAAAA'
+'AAAAAAAAAANNAAAA'
+'AAAAAAAAAAOBBAAA'
+'AAAAAAAAAAODBAAA'
+'AAAAAAAAAAOLAAAA'
+'AAAAAAAAAAPGBAAA'
+'AAAAAAAAABAAAAAA'
+'AAAAAAAAABAEAAAA'
+'AAAAAAAAABAEBAAA'
+'AAAAAAAAABAFBAAA'
+'AAAAAAAAABAIAAAA'
+'AAAAAAAAABAOAAAA'
+'AAAAAAAAABBDBAAA'
+'AAAAAAAAABCFAAAA'
+'AAAAAAAAABCHBAAA'
+'AAAAAAAAABDHAAAA'
+'AAAAAAAAABENAAAA'
+'AAAAAAAAABFEBAAA'
+'AAAAAAAAABFGAAAA'
+'AAAAAAAAABFMAAAA'
+'AAAAAAAAABFPAAAA'
+'AAAAAAAAABGFAAAA'
+'AAAAAAAAABGFBAAA'
+'AAAAAAAAABGJAAAA'
+'AAAAAAAAABIBBAAA'
+'AAAAAAAAABICBAAA'
+'AAAAAAAAABIIAAAA'
+'AAAAAAAAABJNAAAA'
+'AAAAAAAAABKGBAAA'
+'AAAAAAAAABLOAAAA'
+'AAAAAAAAABLPAAAA'
+'AAAAAAAAABMABAAA'
+'AAAAAAAAABMPAAAA'
+'AAAAAAAAABNAAAAA'
+'AAAAAAAAABNCBAAA'
+'AAAAAAAAABNEBAAA'
+'AAAAAAAAABNLAAAA'
+'AAAAAAAAABNOAAAA'
+'AAAAAAAAABNPAAAA'
+'AAAAAAAAABOAAAAA'
+'AAAAAAAAABOFBAAA'
+'AAAAAAAAABOOAAAA'
+'AAAAAAAAABOPAAAA'
+'AAAAAAAAABPEAAAA'
+'AAAAAAAAACADAAAA'
+'AAAAAAAAACAFAAAA'
+'AAAAAAAAACAFAAAA'
+'AAAAAAAAACAHBAAA'
+'AAAAAAAAACAJAAAA'
+'AAAAAAAAACBDAAAA'
+'AAAAAAAAACBDAAAA'
+'AAAAAAAAACBEBAAA'
+'AAAAAAAAACBNAAAA'
+'AAAAAAAAACBPAAAA'
+'AAAAAAAAACCHAAAA'
+---- TYPES
+STRING
+====
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/impala/blob/35a3e186/testdata/workloads/tpcds/queries/tpcds-decimal_v2-q10a.test
----------------------------------------------------------------------
diff --git a/testdata/workloads/tpcds/queries/tpcds-decimal_v2-q10a.test b/testdata/workloads/tpcds/queries/tpcds-decimal_v2-q10a.test
new file mode 100644
index 0000000..1148f0d
--- /dev/null
+++ b/testdata/workloads/tpcds/queries/tpcds-decimal_v2-q10a.test
@@ -0,0 +1,70 @@
+====
+---- QUERY: TPCDS-Q10A
+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 (
+             select ws_bill_customer_sk as customer_sk, d_year,d_moy
+             from web_sales, date_dim
+             where ws_sold_date_sk = d_date_sk and
+             d_year = 2002 and
+             d_moy between 1 and 1+3
+             union all
+             select cs_ship_customer_sk as customer_sk, d_year, d_moy
+             from catalog_sales, date_dim
+             where cs_sold_date_sk = d_date_sk and
+             d_year = 2002 and
+             d_moy between 1 and 1+3
+       ) x
+            where c.c_customer_sk = customer_sk)
+ 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,
+          cd_marital_status,
+          cd_education_status,
+          cd_purchase_estimate,
+          cd_credit_rating,
+          cd_dep_count,
+          cd_dep_employed_count,
+          cd_dep_college_count
+limit 100;
+---- RESULTS
+'F','D','Advanced Degree',1,3000,1,'High Risk',1,2,1,4,1,5,1
+'F','D','Unknown',1,1500,1,'Good',1,6,1,5,1,4,1
+'M','D','College',1,8500,1,'Low Risk',1,3,1,0,1,1,1
+'M','D','Primary',1,7000,1,'Unknown',1,2,1,1,1,1,1
+'M','W','Unknown',1,4500,1,'Good',1,5,1,0,1,1,1
+---- TYPES
+STRING, STRING, STRING, BIGINT, INT, BIGINT, STRING, BIGINT, INT, BIGINT, INT, BIGINT, INT, BIGINT
+====
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/impala/blob/35a3e186/testdata/workloads/tpcds/queries/tpcds-decimal_v2-q11.test
----------------------------------------------------------------------
diff --git a/testdata/workloads/tpcds/queries/tpcds-decimal_v2-q11.test b/testdata/workloads/tpcds/queries/tpcds-decimal_v2-q11.test
new file mode 100644
index 0000000..6349a88
--- /dev/null
+++ b/testdata/workloads/tpcds/queries/tpcds-decimal_v2-q11.test
@@ -0,0 +1,172 @@
+====
+---- QUERY: TPCDS-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
+ 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 0.0 end
+             > case when t_s_firstyear.year_total > 0 then t_s_secyear.year_total / t_s_firstyear.year_total else 0.0 end
+ order by t_s_secyear.customer_id
+         ,t_s_secyear.customer_first_name
+         ,t_s_secyear.customer_last_name
+         ,t_s_secyear.customer_preferred_cust_flag
+limit 100;
+---- RESULTS
+'AAAAAAAAAFGBBAAA','Howard','Major','Y'
+'AAAAAAAAAMGDAAAA','Kenneth','Harlan','Y'
+'AAAAAAAAAOPFBAAA','Jerry','Fields','Y'
+'AAAAAAAABLEIBAAA','Paula','Wakefield','Y'
+'AAAAAAAABNBBAAAA','Irma','Smith','Y'
+'AAAAAAAACADPAAAA','Cristobal','Thomas','Y'
+'AAAAAAAACFENAAAA','Christopher','Dawson','NULL'
+'AAAAAAAACIJMAAAA','Elizabeth','Thomas','Y'
+'AAAAAAAACJDIAAAA','James','Kerr','N'
+'AAAAAAAACNAGBAAA','Virginia','May','N'
+'AAAAAAAADBEFBAAA','Bennie','Bowers','N'
+'AAAAAAAADCKOAAAA','Robert','Gonzalez','N'
+'AAAAAAAADFKABAAA','Latoya','Craft','N'
+'AAAAAAAADIIOAAAA','David','Carroll','Y'
+'AAAAAAAADIJGBAAA','Ruth','Sanders','N'
+'AAAAAAAADLHBBAAA','Henry','Bertrand','N'
+'AAAAAAAAEADJAAAA','Ruth','Carroll','N'
+'AAAAAAAAEJDLAAAA','Alice','Wright','N'
+'AAAAAAAAEKFPAAAA','Annika','Chin','N'
+'AAAAAAAAEKJLAAAA','Aisha','Carlson','Y'
+'AAAAAAAAEPOGAAAA','Felisha','Mendes','Y'
+'AAAAAAAAFACEAAAA','Priscilla','Miller','N'
+'AAAAAAAAFBAHAAAA','Michael','Williams','N'
+'AAAAAAAAFGIGAAAA','Eduardo','Miller','Y'
+'AAAAAAAAFGPGAAAA','Albert','Wadsworth','Y'
+'AAAAAAAAFMHIAAAA','Emilio','Darling','Y'
+'AAAAAAAAFOGIAAAA','Michelle','Greene','N'
+'AAAAAAAAFOJAAAAA','Don','Castillo','Y'
+'AAAAAAAAGEHIAAAA','Tyler','Miller','N'
+'AAAAAAAAGHPBBAAA','Nick','Mendez','Y'
+'AAAAAAAAGNDAAAAA','Terry','Mcdowell','N'
+'AAAAAAAAHGOABAAA','Sonia','White','N'
+'AAAAAAAAHHCABAAA','William','Stewart','Y'
+'AAAAAAAAHJLAAAAA','Audrey','Beltran','Y'
+'AAAAAAAAHMJNAAAA','Ryan','Baptiste','Y'
+'AAAAAAAAHMOIAAAA','Grace','Henderson','N'
+'AAAAAAAAIADEBAAA','Diane','Aldridge','N'
+'AAAAAAAAIBAEBAAA','Sandra','Wilson','N'
+'AAAAAAAAIBFCBAAA','Ruth','Grantham','N'
+'AAAAAAAAIBHHAAAA','Jennifer','Ballard','Y'
+'AAAAAAAAICHFAAAA','Linda','Mccoy','N'
+'AAAAAAAAIDKFAAAA','Michael','Mack','N'
+'AAAAAAAAIJEMAAAA','Charlie','Cummings','Y'
+'AAAAAAAAIMHBAAAA','Kathy','Knowles','N'
+'AAAAAAAAIMHHBAAA','Lillian','Davidson','Y'
+'AAAAAAAAJDBLAAAA','Melvin','Taylor','Y'
+'AAAAAAAAJEKFBAAA','Norma','Burkholder','N'
+'AAAAAAAAJGMMAAAA','Richard','Larson','Y'
+'AAAAAAAAJIALAAAA','Santos','Gutierrez','N'
+'AAAAAAAAJKBNAAAA','Julie','Kern','N'
+'AAAAAAAAJMHLAAAA','Wanda','Ryan','Y'
+'AAAAAAAAJONHBAAA','Warren','Orozco','N'
+'AAAAAAAAJPINAAAA','Rose','Waite','Y'
+'AAAAAAAAKAECAAAA','Milton','Mackey','N'
+'AAAAAAAAKAPPAAAA','Karen','Parker','Y'
+'AAAAAAAAKJBKAAAA','Georgia','Scott','N'
+'AAAAAAAAKJBLAAAA','Kerry','Davis','Y'
+'AAAAAAAAKKGEAAAA','Katie','Dunbar','N'
+'AAAAAAAAKLHHBAAA','Manuel','Castaneda','N'
+'AAAAAAAAKNAKAAAA','Gladys','Banks','N'
+'AAAAAAAALFKKAAAA','Ignacio','Miller','Y'
+'AAAAAAAALHMCAAAA','Brooke','Nelson','Y'
+'AAAAAAAALIOPAAAA','Derek','Allen','Y'
+'AAAAAAAALJNCBAAA','George','Gamez','Y'
+'AAAAAAAAMDCAAAAA','Louann','Hamel','Y'
+'AAAAAAAAMFFLAAAA','Margret','Gray','Y'
+'AAAAAAAAMMOBBAAA','Margaret','Smith','N'
+'AAAAAAAANFBDBAAA','Vernice','Fernandez','Y'
+'AAAAAAAANGDBBAAA','Carlos','Jewell','N'
+'AAAAAAAANIPLAAAA','Eric','Lawrence','Y'
+'AAAAAAAANJAGAAAA','Allen','Hood','Y'
+'AAAAAAAANJHCBAAA','Christopher','Schreiber','N'
+'AAAAAAAANJOLAAAA','Debra','Underwood','Y'
+'AAAAAAAAOBADBAAA','Elizabeth','Burnham','N'
+'AAAAAAAAOCAJAAAA','Jenna','Staton','N'
+'AAAAAAAAOCLBBAAA','NULL','NULL','NULL'
+'AAAAAAAAODMMAAAA','Gayla','Cline','N'
+'AAAAAAAAOFLCAAAA','James','Taylor','N'
+'AAAAAAAAOPDLAAAA','Ann','Pence','N'
+'AAAAAAAAPDFBAAAA','Terrance','Banks','Y'
+'AAAAAAAAPEHEBAAA','Edith','Molina','Y'
+'AAAAAAAAPFCLAAAA','Felicia','Neville','N'
+'AAAAAAAAPICEAAAA','Jennifer','Cortez','Y'
+'AAAAAAAAPJENAAAA','Ashley','Norton','Y'
+'AAAAAAAAPKBCBAAA','Andrea','White','N'
+'AAAAAAAAPKIKAAAA','Wendy','Horvath','Y'
+'AAAAAAAAPMMBBAAA','Paul','Jordan','N'
+'AAAAAAAAPPIBBAAA','Candice','Lee','Y'
+---- TYPES
+STRING, STRING, STRING, STRING
+====
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/impala/blob/35a3e186/testdata/workloads/tpcds/queries/tpcds-decimal_v2-q12.test
----------------------------------------------------------------------
diff --git a/testdata/workloads/tpcds/queries/tpcds-decimal_v2-q12.test b/testdata/workloads/tpcds/queries/tpcds-decimal_v2-q12.test
new file mode 100644
index 0000000..60844bb
--- /dev/null
+++ b/testdata/workloads/tpcds/queries/tpcds-decimal_v2-q12.test
@@ -0,0 +1,137 @@
+====
+---- QUERY: TPCDS-Q12
+select  i_item_id
+      ,i_item_desc
+      ,i_category
+      ,i_class
+      ,i_current_price
+      ,sum(ws_ext_sales_price) as itemrevenue
+      ,sum(ws_ext_sales_price)*100/sum(sum(ws_ext_sales_price)) over
+          (partition by i_class) as 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 timestamp) between cast('1999-02-22' as timestamp)
+        and (cast('1999-02-22' as timestamp) + interval 30 days)
+group by
+  i_item_id
+        ,i_item_desc
+        ,i_category
+        ,i_class
+        ,i_current_price
+order by
+  i_category
+        ,i_class
+        ,i_item_id
+        ,i_item_desc
+        ,revenueratio
+limit 100;
+---- RESULTS
+'AAAAAAAAAAKAAAAA','Small, political activities help great, bad policies. Therefore square features provide on a machines. Rules make over me','Books','arts',2.42,2742.60,3.717520
+'AAAAAAAABHDCAAAA','Minor heads close common children; recently strong firms provide. Useful, young men ought to create changes. Popular, common regulations might decide. Points fit. Obvious, glad officials ','Books','arts',3.88,4258.84,5.772743
+'AAAAAAAACKEAAAAA','Legs appear eventually soci','Books','arts',35.27,4010.65,5.436328
+'AAAAAAAACMDCAAAA','Black, powerful others go now years. Diverse orders might not mean away medium minutes; tight authorities ought to put however for the things','Books','arts',2.75,1156.40,1.567469
+'AAAAAAAACNEDAAAA','Particularly labour stores get farmers. Hence true records see rel','Books','arts',6.89,6606.82,8.955367
+'AAAAAAAADCCDAAAA','Glad users understand very almost original jobs. Towns can understand. Supreme, following days work by a parents; german, crucial weapons work sure; fair pictur','Books','arts',7.18,10391.81,14.085819
+'AAAAAAAADJFCAAAA','Significant, preliminary boys can remain lightly more pale discussion','Books','arts',2.74,8279.54,11.222694
+'AAAAAAAADPCCAAAA','Especially true items might supply particularly. Black, automatic words might develop post-war problems. Fresh, visible workers could not appe','Books','arts',4.23,351.78,0.476828
+'AAAAAAAAEDKDAAAA','Times live now to a sales. British years bring all financ','Books','arts',4.24,11699.92,15.858927
+'AAAAAAAAEGAEAAAA','Far injuries pay so various arms. Courses could go anywhere universal possibilities; talks stand since mean, colonial scho','Books','arts',9.57,51.84,0.070268
+'AAAAAAAAFCFBAAAA','Golden estates meet as yet hands. About solid proteins used to tell. Once causal boots imagine frequently new elections; flexible, other ways find re','Books','arts',9.76,59.01,0.079986
+'AAAAAAAAGHOBAAAA','Fully existing proceedings could not tak','Books','arts',8.66,625.65,0.848052
+'AAAAAAAAIEPCAAAA','New, popular years should think. Shareholders speak also friends; special members could not identify social eyes; indoors full ','Books','arts',0.91,1390.83,1.885233
+'AAAAAAAAIHKBAAAA','Very historic arms may happen even able exis','Books','arts',9.19,13439.76,18.217233
+'AAAAAAAAIIPDAAAA','Af','Books','arts',6.04,109.23,0.148058
+'AAAAAAAAIJGAAAAA','Then western animals could teach somewhere. Today waiting servants confuse','Books','arts',4.10,868.50,1.177228
+'AAAAAAAAKKIAAAAA','Naked, popular schemes campaign then offices. Underlying shares may join','Books','arts',79.28,1841.04,2.495480
+'AAAAAAAAKNBCAAAA','Early, powerful towns add mainly english savings. Years assist then new, public colleagues. Things might encounter then right new features','Books','arts',6.89,365.60,0.495561
+'AAAAAAAAOKPBAAAA','Just good settings must not make; payments assure to a bishops. Principal, sorry amounts would safeguard very so other leaders; tory, substantial stairs m','Books','arts',2.60,5525.16,7.489206
+'AAAAAAAAABMBAAAA','Situations retain; units might sit operations; girls shall make. Ca','Books','business',3.16,1204.56,0.968966
+'AAAAAAAAACEBAAAA','Prese','Books','business',15.17,17499.32,14.076710
+'AAAAAAAAAKBDAAAA','Essential students change even despite a powers. General connections will not maximi','Books','business',3.10,84.80,0.068214
+'AAAAAAAABIPBAAAA','Ultimate, other objects might not install good ','Books','business',2.57,7199.93,5.791729
+'AAAAAAAABKACAAAA','Total pp. accept with a questions; able, generous a','Books','business',5.25,3702.38,2.978249
+'AAAAAAAABMDDAAAA','Head facts resolve even. Characteristics put. Toxic, genuine officials shall not meet. Difficult chil','Books','business',3.85,333.90,0.268594
+'AAAAAAAACDBCAAAA','Tiny years could run too above tough volumes. New germans must not leave as possible sales; inj','Books','business',1.22,799.89,0.643443
+'AAAAAAAACEPBAAAA','Long, married artists would see negative feelings. Emot','Books','business',1.73,2686.56,2.161108
+'AAAAAAAACPODAAAA','Cells stay economic, thin members. Soon special conservatives solve to the figu','Books','business',2.93,2431.81,1.956184
+'AAAAAAAADHNCAAAA','Originally major industries matter mediterranean bodies. Cases should not ','Books','business',45.06,2186.10,1.758531
+'AAAAAAAAEILDAAAA','Bad, able systems shall fall else. Nuclear, economic ways put in an paths. Serious, labour women must not muster however. Wide new readers ought to help ','Books','business',1.36,293.23,0.235879
+'AAAAAAAAFGJCAAAA','Secondary, red structures may seek eyes. High true titles should make now junior fat thoughts. Partly excellent authorities receive direct, net parties. Parents look most also other issues. Empty, con','Books','business',8.59,3319.89,2.670568
+'AAAAAAAAFLMDAAAA','Significantly relevant colleges extract knowingly broad investors. Entire members stay. Mediterranean legs would cut on the knees. Forthcoming, particular students u','Books','business',4.81,347.70,0.279695
+'AAAAAAAAFNOCAAAA','Wonderful systems ask also very parliamentary orders; british companies','Books','business',87.12,105.98,0.085252
+'AAAAAAAAGFDCAAAA','Particularly medieval blocks would not find slightly with a carers. Years respond about at a sec','Books','business',6.00,51.40,0.041347
+'AAAAAAAAGONBAAAA','Ever top offers might struggle far, automatic men. Long-term, long goods dare however; new, other gr','Books','business',2.30,1233.76,0.992455
+'AAAAAAAAIBKDAAAA','Hundreds drop nearly unacceptable accidents. Then strong methods tell large unions. Short companies should help so. Moves shall not set later chief problems. R','Books','business',0.78,1158.21,0.931681
+'AAAAAAAAIJECAAAA','Difficult, royal units put particularly significant, other plans. Essential, contemporary journals will need players. Alternatively parental','Books','business',4.34,10631.67,8.552272
+'AAAAAAAAIKEAAAAA','All ','Books','business',9.44,2.07,0.001665
+'AAAAAAAAIPADAAAA','Orders go into the documents. Social, existing specialists will seem twice associated wishes. Finally nation','Books','business',5.15,1755.92,1.412488
+'AAAAAAAAKAJDAAAA','Short neighbours implement innocently tiny titles. Briefly simple years should not tell potentially successful, whole years. Orange workers carry; home hot feet l','Books','business',4.43,17638.20,14.188427
+'AAAAAAAAKMAAAAAA','Plans consult interested, light boys. Selective, other problems create scientific, young parties. Sufficient speakers might not kiss too social, basic interests. Dual, other times s','Books','business',0.19,3867.73,3.111259
+'AAAAAAAALDFAAAAA','Hands may not allow only in a lands; linear, other pubs say; social, precise women identify for a patients. Preferences develop alone now rich motives. Ever good tas','Books','business',3.68,470.96,0.378847
+'AAAAAAAALGBBAAAA','Modern records retain about there civil plans. Social bodies survive. Great, living losses bother late, coherent others. About british sports ought to use cautiously from ','Books','business',1.94,229.35,0.184493
+'AAAAAAAALPDCAAAA','So small edges will understand currently in a things. New trains point usually systems. Years look growing questions. Different cases could sell just alive, late rules; big, large results will make ','Books','business',4.12,6151.95,4.948719
+'AAAAAAAAMIGCAAAA','Carefully physical hotels must put together; similar details cannot appreciate by a standards. Rates can break m','Books','business',6.63,25528.76,20.535710
+'AAAAAAAAMIMCAAAA','About likely houses like international members. Final, relevant birds answer after the paintings. Hungry, personal days borrow tiny, primary resources. As social relations could choose quite also ','Books','business',0.77,417.22,0.335618
+'AAAAAAAAMKHAAAAA','Unions shall see enough over true attitudes; of course full variable','Books','business',8.90,633.16,0.509323
+'AAAAAAAAMKNDAAAA','Special, clear elements would buy at a games. Things should spot today strange, only devices. Armies should like at a patients. Hands could perform simply narrow values. N','Books','business',1.28,11196.30,9.006468
+'AAAAAAAANACBAAAA','New teachers might demand never assets. Deeply bright ministers make generally never prime imports. Odd writings step common readers; talks take young, r','Books','business',2.95,1151.28,0.926107
+'AAAAAAAAAHKDAAAA','Decisions play actually exclusive activities. Well assistant e','Books','computers',8.77,822.69,0.984915
+'AAAAAAAABHEEAAAA','Subjects may remain officials. Forward, straight objects used to see wh','Books','computers',6.97,5663.04,6.779725
+'AAAAAAAAEAPAAAAA','Just distinct children think individuals; popular arguments develop here cautious methods; appropriate children might beat. Proper, empirical hundreds fall oth','Books','computers',4.01,9320.46,11.158346
+'AAAAAAAAEDMAAAAA','Books understand. Principles produce just at a premises. Years ','Books','computers',44.48,787.29,0.942534
+'AAAAAAAAEMHAAAAA','Boots recommend usually just local centres; c','Books','computers',7.56,765.23,0.916124
+'AAAAAAAAFEEAAAAA','Capital, united feelings paint only things. Greatly financial economies should not pay somewhere soviet necessary armies; educational concepts mus','Books','computers',3.83,78.76,0.094291
+'AAAAAAAAGENAAAAA','Genera','Books','computers',2.84,4719.74,5.650417
+'AAAAAAAAGHCBAAAA','Hundreds would meet regardless german, foreign scien','Books','computers',9.77,2451.75,2.935206
+'AAAAAAAAGMBDAAAA','Vulnerable b','Books','computers',0.58,31.86,0.038142
+'AAAAAAAAGNGBAAAA','Brilliant, massive prisons take still national others. Only northern guidelines go right by the lips. General, spiritual walls shall reach in a languages. British nations eat substantial polici','Books','computers',3.42,2248.01,2.691291
+'AAAAAAAAIGCEAAAA','Concerned numbers can attempt now particular, white friends; un','Books','computers',3.38,1297.25,1.553053
+'AAAAAAAAIGJAAAAA','Probably terrible students may go. There whole issues get academic, soviet charts. ','Books','computers',4.11,84.42,0.101067
+'AAAAAAAAIILCAAAA','At least low personnel might a','Books','computers',9.13,529.20,0.633552
+'AAAAAAAAJBADAAAA','Mean, good relations wake however strictly white possibilities. About aw','Books','computers',6.42,5473.02,6.552235
+'AAAAAAAAJJGBAAAA','Strangers gain officially enough labour problems. Overall systems may not help below lives. Heroes find just apparently generous couple','Books','computers',7.15,7846.40,9.393618
+'AAAAAAAALCDAAAAA','Clearly actual places would supply apparently only rats.','Books','computers',4.34,4611.20,5.520475
+'AAAAAAAALDBBAAAA','Mines should talk outside trees. Regular eyes encourage with an victims. Civil functions try actions. Movies fit secretly for a regions. Whole, imperial customs forget','Books','computers',7.44,5240.16,6.273458
+'AAAAAAAAMJEAAAAA','Local pro','Books','computers',1.04,843.52,1.009852
+'AAAAAAAAMMDEAAAA','Women support almost','Books','computers',4.68,1401.06,1.677333
+'AAAAAAAAMNOBAAAA','Scientific, young creditors might see for the alternativ','Books','computers',6.98,100.95,0.120856
+'AAAAAAAAMOHBAAAA','Fortunately past rules mind respectively appropriate losses. Men must develop above the sources. Mere values lis','Books','computers',2.02,5603.38,6.708301
+'AAAAAAAANAJDAAAA','Religious, delicious ways must a','Books','computers',7.07,14.55,0.017419
+'AAAAAAAANFJBAAAA','Only old doors shall wear again. Earlier high minerals might not tell better persona','Books','computers',16.62,0.00,0.000000
+'AAAAAAAANHFDAAAA','Easier strong operators could not break very; new, permanent animals ','Books','computers',1.15,2953.07,3.535381
+'AAAAAAAAOBNDAAAA','Levels undermine unfortunately efficient weeks','Books','computers',2.19,2853.36,3.416009
+'AAAAAAAAPDLCAAAA','Inc considerations should dare sales. Little, long chapters check better exciting employers. Still english unions could pull wrong shoes. Factors would kee','Books','computers',70.39,7100.08,8.500133
+'AAAAAAAAPJCCAAAA','Strong, british horses may not choose less. Results will not carry harsh workers. False claims will want over labour increases. Co','Books','computers',1.05,7745.78,9.273157
+'AAAAAAAAPKOBAAAA','Yet whole dealers p','Books','computers',3.63,2856.73,3.420044
+'AAAAAAAAPLIDAAAA','Items look somewhat new designs. Patients should solve about a officers. Minutes can act still companies. About dangerous records will not run towa','Books','computers',1.43,86.09,0.103066
+'AAAAAAAAABPAAAAA','Particularly professional women may not tell never present, distant times. Current, only weeks could hurry quite appropriate months. Little attacks waste carefully never politi','Books','cooking',1.82,6350.52,12.317737
+'AAAAAAAAAJNDAAAA','Physical, political decis','Books','cooking',6.76,0.00,0.000000
+'AAAAAAAABINAAAAA','Below invisi','Books','cooking',9.59,2547.42,4.941083
+'AAAAAAAABONAAAAA','Gains cannot cross colourful, long individuals. Drily red difficulties may not say to a plans. Very different cases ta','Books','cooking',1.60,1388.77,2.693717
+'AAAAAAAACBDCAAAA','Well independent scores fight rare changes. Scottish rights would not give; implicit, modern services like yet. Conservative, effective yards should marry about a buildings. Valid, m','Books','cooking',0.50,381.18,0.739353
+'AAAAAAAAGALAAAAA','Great, only pages might not contribute so; small components require on a films. Times find apparently. So traditional sources find conditions. Gro','Books','cooking',3.40,2359.09,4.575791
+'AAAAAAAAGMMCAAAA','Chief countries leave actually rural, other fathers. Women discover very otherwise large ministers. Slow, envi','Books','cooking',7.35,13258.98,25.717677
+'AAAAAAAAGOCAAAAA','Historical, economic lights shall stand much big, odd proposals. Rather grateful branches ought to take. Northern, high miles must ask increasingly. Once chronic','Books','cooking',4.37,3383.64,6.563051
+'AAAAAAAAKCCAAAAA','Possible schools carry primarily dual rises; important meetings could continue other passengers. More scottish things might not fall orders. Right, unable expectati','Books','cooking',4.44,4158.51,8.066022
+'AAAAAAAAKEJAAAAA','Other, atlantic regions know fast. Li','Books','cooking',68.84,5439.00,10.549714
+'AAAAAAAAKJGDAAAA','International eyes might see sales. Joint universities must not hold somewhat with a days. Perfect, profitable trials ought to seem; even pale quantities ','Books','cooking',0.94,5746.30,11.145766
+'AAAAAAAALBKAAAAA','Conditions used to test so for a spirits; open, royal provisions might not look approximate','Books','cooking',36.97,5238.71,10.161223
+'AAAAAAAALIGAAAAA','There superb accidents may strike individual results. Quiet, only forests drop as little unlikely towns. Observations can discern with a points. Substantial banks dest','Books','cooking',0.88,73.37,0.142312
+'AAAAAAAAMIBCAAAA','Views present rapidly in the relations. Average winners could fall double stations; also corresponding heroes promote direct,','Books','cooking',3.17,693.26,1.344676
+'AAAAAAAAONGCAAAA','Outcomes will become high wide, substantial clients. Sufficient, new resources weaken only over the moments. Of cour','Books','cooking',1.32,170.00,0.329739
+'AAAAAAAAPNFEAAAA','Wooden, civil fingers keep great, possible scales. Police begin ago in common responsible times. Further open fathers can believe aga','Books','cooking',0.33,367.15,0.712140
+'AAAAAAAAADBDAAAA','Upper men used to give still different girls. Proposals subsidise famous nerves. C','Books','entertainments',2.21,701.28,1.076508
+'AAAAAAAAAIKCAAAA','Troubles must know wise indicators. Kinds enter technical, new doubts. Likely, annual eyes see equivalent payments. Both inadequate feelings decide ever initial ','Books','entertainments',5.04,10130.68,15.551214
+'AAAAAAAABGOBAAAA','Japanese, long students may help very; there partial bombs must assess; intentions cannot execute most certain children; indeed necessary a','Books','entertainments',5.36,1174.34,1.802684
+'AAAAAAAACIDAAAAA','Millions might answer. Attractive rules might beat coloured volunteers. Scottis','Books','entertainments',3.51,4097.70,6.290221
+'AAAAAAAADCOAAAAA','Silly acres shall belong alike following, similar pairs. Respectively lucky newspapers shall dare. Also labour requirements can leave; pounds used to stay even only solicitors. Silver systems may de','Books','entertainments',75.74,613.76,0.942159
+'AAAAAAAADGKAAAAA','However small values ','Books','entertainments',1.49,3795.87,5.826893
+---- TYPES
+STRING, STRING, STRING, STRING, DECIMAL, DECIMAL, DECIMAL
+====
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/impala/blob/35a3e186/testdata/workloads/tpcds/queries/tpcds-decimal_v2-q13.test
----------------------------------------------------------------------
diff --git a/testdata/workloads/tpcds/queries/tpcds-decimal_v2-q13.test b/testdata/workloads/tpcds/queries/tpcds-decimal_v2-q13.test
new file mode 100644
index 0000000..c5349fd
--- /dev/null
+++ b/testdata/workloads/tpcds/queries/tpcds-decimal_v2-q13.test
@@ -0,0 +1,56 @@
+====
+---- QUERY: TPCDS-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 100.00 and 150.00
+  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 50.00 and 100.00
+  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 150.00 and 200.00
+  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
+     ))
+;
+---- RESULTS
+31,2551.863333,2365.943333,14195.66
+---- TYPES
+DOUBLE, DECIMAL, DECIMAL, DECIMAL
+====
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/impala/blob/35a3e186/testdata/workloads/tpcds/queries/tpcds-decimal_v2-q15.test
----------------------------------------------------------------------
diff --git a/testdata/workloads/tpcds/queries/tpcds-decimal_v2-q15.test b/testdata/workloads/tpcds/queries/tpcds-decimal_v2-q15.test
new file mode 100644
index 0000000..f875433
--- /dev/null
+++ b/testdata/workloads/tpcds/queries/tpcds-decimal_v2-q15.test
@@ -0,0 +1,123 @@
+====
+---- QUERY: TPCDS-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
+ limit 100;
+---- RESULTS
+'30059',688.80
+'30069',323.60
+'30150',372.79
+'30162',1609.70
+'30169',1326.30
+'30191',513.21
+'30194',244.76
+'30309',94.27
+'30330',447.07
+'30399',196.46
+'30411',713.29
+'30492',115.82
+'30499',1142.24
+'30525',406.09
+'30534',1341.26
+'30587',297.85
+'31087',573.97
+'31289',669.35
+'31387',1226.80
+'31675',362.70
+'31692',541.53
+'31749',182.57
+'31757',1553.34
+'31838',862.54
+'31933',675.18
+'31952',1063.42
+'32219',707.81
+'32293',828.11
+'32477',329.28
+'32565',368.44
+'32724',519.06
+'32812',1129.14
+'32898',1283.01
+'33003',838.16
+'33075',190.62
+'33394',138.83
+'33451',1441.78
+'33511',431.19
+'33604',1224.86
+'33683',616.38
+'33951',1241.72
+'34027',407.13
+'34062',443.22
+'34092',366.23
+'34098',276.14
+'34107',1320.29
+'34136',465.89
+'34190',426.36
+'34244',1508.42
+'34289',360.52
+'34338',1290.05
+'34466',1926.39
+'34536',462.20
+'34593',1237.42
+'34854',473.89
+'34975',293.97
+'35038',532.46
+'35115',465.95
+'35124',1186.38
+'35281',820.44
+'35413',328.47
+'35508',309.54
+'35709',526.74
+'35752',278.29
+'35804',1067.01
+'35817',2487.41
+'35867',581.94
+'36060',173.58
+'36074',230.91
+'36098',907.80
+'36115',298.06
+'36192',1034.53
+'36534',1649.99
+'36557',1722.27
+'36614',1557.87
+'36668',730.76
+'36719',1039.55
+'36787',463.11
+'36867',473.78
+'36871',777.15
+'36971',505.82
+'37057',2784.75
+'37683',526.34
+'37746',1903.08
+'37838',984.60
+'38014',337.71
+'38048',670.99
+'38054',1377.23
+'38075',827.32
+'38119',237.47
+'38167',620.19
+'38222',2633.06
+'38354',2411.29
+'38370',1494.42
+'38371',716.56
+'38579',601.67
+'38605',189.50
+'38721',2085.27
+'38828',261.89
+'38877',251.15
+---- TYPES
+STRING, DECIMAL
+====
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/impala/blob/35a3e186/testdata/workloads/tpcds/queries/tpcds-decimal_v2-q16.test
----------------------------------------------------------------------
diff --git a/testdata/workloads/tpcds/queries/tpcds-decimal_v2-q16.test b/testdata/workloads/tpcds/queries/tpcds-decimal_v2-q16.test
new file mode 100644
index 0000000..1c8ac02
--- /dev/null
+++ b/testdata/workloads/tpcds/queries/tpcds-decimal_v2-q16.test
@@ -0,0 +1,35 @@
+====
+---- QUERY: TPCDS-Q16
+select
+   count(distinct cs_order_number) as "order count"
+  ,sum(cs_ext_ship_cost) as "total shipping cost"
+  ,sum(cs_net_profit) as "total net profit"
+from
+   catalog_sales cs1
+  ,date_dim
+  ,customer_address
+  ,call_center
+where
+    cast(d_date as timestamp) between cast('2002-02-01' as timestamp) and
+           (cast('2002-02-01' as timestamp) + interval 60 days)
+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)
+limit 100;
+---- RESULTS
+236,1062963.89,-214910.61
+---- TYPES
+BIGINT, DECIMAL, DECIMAL
+====
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/impala/blob/35a3e186/testdata/workloads/tpcds/queries/tpcds-decimal_v2-q17.test
----------------------------------------------------------------------
diff --git a/testdata/workloads/tpcds/queries/tpcds-decimal_v2-q17.test b/testdata/workloads/tpcds/queries/tpcds-decimal_v2-q17.test
new file mode 100644
index 0000000..ebf420c
--- /dev/null
+++ b/testdata/workloads/tpcds/queries/tpcds-decimal_v2-q17.test
@@ -0,0 +1,49 @@
+====
+---- QUERY: TPCDS-Q17
+select  i_item_id
+       ,i_item_desc
+       ,s_state
+       ,count(ss_quantity) as store_sales_quantitycount
+       ,avg(ss_quantity) as store_sales_quantityave
+       ,stddev_samp(ss_quantity) as store_sales_quantitystdev
+       ,stddev_samp(ss_quantity)/avg(ss_quantity) as store_sales_quantitycov
+       ,count(sr_return_quantity) as store_returns_quantitycount
+       ,avg(sr_return_quantity) as store_returns_quantityave
+       ,stddev_samp(sr_return_quantity) as store_returns_quantitystdev
+       ,stddev_samp(sr_return_quantity)/avg(sr_return_quantity) as store_returns_quantitycov
+       ,count(cs_quantity) as catalog_sales_quantitycount ,avg(cs_quantity) as catalog_sales_quantityave
+       ,stddev_samp(cs_quantity) as catalog_sales_quantitystdev
+       ,stddev_samp(cs_quantity)/avg(cs_quantity) as 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
+         ,i_item_desc
+         ,s_state
+limit 100;
+---- RESULTS
+'AAAAAAAAKPFEAAAA','Recently right','TN',1,99,NULL,NULL,1,66,NULL,NULL,1,32,NULL,NULL
+---- TYPES
+STRING, STRING, STRING, BIGINT, DOUBLE, DOUBLE, DOUBLE, BIGINT, DOUBLE, DOUBLE, DOUBLE, BIGINT, DOUBLE, DOUBLE, DOUBLE
+====
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/impala/blob/35a3e186/testdata/workloads/tpcds/queries/tpcds-decimal_v2-q18a.test
----------------------------------------------------------------------
diff --git a/testdata/workloads/tpcds/queries/tpcds-decimal_v2-q18a.test b/testdata/workloads/tpcds/queries/tpcds-decimal_v2-q18a.test
new file mode 100644
index 0000000..78ffe39
--- /dev/null
+++ b/testdata/workloads/tpcds/queries/tpcds-decimal_v2-q18a.test
@@ -0,0 +1,159 @@
+====
+---- QUERY: TPCDS-Q18A
+with results as
+ (select i_item_id,
+        ca_country,
+        ca_state,
+        ca_county,
+        cast(cs_quantity as decimal(12,2)) agg1,
+        cast(cs_list_price as decimal(12,2)) agg2,
+        cast(cs_coupon_amt as decimal(12,2)) agg3,
+        cast(cs_sales_price as decimal(12,2)) agg4,
+        cast(cs_net_profit as decimal(12,2)) agg5,
+        cast(c_birth_year as decimal(12,2)) agg6,
+        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')
+ )
+  select  i_item_id, ca_country, ca_state, ca_county, agg1, agg2, agg3, agg4, agg5, agg6, agg7
+ from (
+  select i_item_id, ca_country, ca_state, ca_county, avg(agg1) agg1,
+    avg(agg2) agg2, avg(agg3) agg3, avg(agg4) agg4, avg(agg5) agg5, avg(agg6) agg6, avg(agg7) agg7
+  from results
+  group by i_item_id, ca_country, ca_state, ca_county
+  union all
+  select i_item_id, ca_country, ca_state, NULL as county, avg(agg1) agg1, avg(agg2) agg2, avg(agg3) agg3,
+    avg(agg4) agg4, avg(agg5) agg5, avg(agg6) agg6, avg(agg7) agg7
+  from results
+  group by i_item_id, ca_country, ca_state
+  union all
+  select i_item_id, ca_country, NULL as ca_state, NULL as county, avg(agg1) agg1, avg(agg2) agg2, avg(agg3) agg3,
+    avg(agg4) agg4, avg(agg5) agg5, avg(agg6) agg6, avg(agg7) agg7
+  from results
+  group by i_item_id, ca_country
+  union all
+  select i_item_id, NULL as ca_country, NULL as ca_state, NULL as county, avg(agg1) agg1, avg(agg2) agg2, avg(agg3) agg3,
+    avg(agg4) agg4, avg(agg5) agg5, avg(agg6) agg6, avg(agg7) agg7
+  from results
+  group by i_item_id
+  union all
+  select NULL AS i_item_id, NULL as ca_country, NULL as ca_state, NULL as county, avg(agg1) agg1, avg(agg2) agg2, avg(agg3) agg3,
+    avg(agg4) agg4, avg(agg5) agg5, avg(agg6) agg6, avg(agg7) agg7
+  from results
+ ) foo
+ order by ca_country, ca_state, ca_county, i_item_id
+ limit 100;
+---- RESULTS
+'AAAAAAAABFBAAAAA','United States','IN','Adams County',8.000000,86.170000,0.000000,85.300000,415.200000,1981.000000,2.000000
+'AAAAAAAADMKDAAAA','United States','IN','Adams County',99.000000,29.120000,0.000000,11.060000,-562.320000,1981.000000,2.000000
+'AAAAAAAAEGDAAAAA','United States','IN','Adams County',70.000000,51.120000,0.000000,34.250000,1110.200000,1981.000000,2.000000
+'AAAAAAAAGHGAAAAA','United States','IN','Adams County',90.000000,73.470000,0.000000,36.730000,-1318.500000,1981.000000,2.000000
+'AAAAAAAAKBCBAAAA','United States','IN','Adams County',35.000000,46.230000,973.000000,28.660000,-682.850000,1981.000000,2.000000
+'AAAAAAAACCJAAAAA','United States','IN','Cass County',67.000000,55.730000,679.480000,36.220000,-14.170000,1972.000000,1.000000
+'AAAAAAAACIMBAAAA','United States','IN','Cass County',51.000000,21.900000,294.860000,17.520000,-86.780000,1972.000000,1.000000
+'AAAAAAAADJPBAAAA','United States','IN','Cass County',88.000000,51.590000,0.000000,49.010000,2697.200000,1972.000000,1.000000
+'AAAAAAAAHJDDAAAA','United States','IN','Cass County',77.000000,38.310000,0.000000,32.940000,-300.300000,1972.000000,1.000000
+'AAAAAAAANFAEAAAA','United States','IN','Cass County',46.000000,110.690000,0.000000,47.590000,-1474.300000,1972.000000,1.000000
+'AAAAAAAAOLJDAAAA','United States','IN','Cass County',59.000000,239.300000,0.000000,50.250000,-2918.140000,1972.000000,1.000000
+'AAAAAAAACEGCAAAA','United States','IN','Clark County',42.000000,24.850000,0.000000,13.660000,-188.160000,1975.000000,3.000000
+'AAAAAAAACLPDAAAA','United States','IN','Clark County',1.000000,61.080000,0.000000,0.610000,-23.160000,1975.000000,3.000000
+'AAAAAAAAGLDAAAAA','United States','IN','Clark County',11.000000,204.810000,0.000000,12.280000,-963.930000,1975.000000,3.000000
+'AAAAAAAAJPKAAAAA','United States','IN','Clark County',52.000000,11.510000,201.450000,5.870000,-240.450000,1975.000000,3.000000
+'AAAAAAAALJCDAAAA','United States','IN','Clark County',83.000000,101.540000,684.180000,29.440000,-3002.370000,1975.000000,3.000000
+'AAAAAAAACLICAAAA','United States','IN','Crawford County',51.000000,126.570000,0.000000,78.470000,1663.110000,1930.000000,4.000000
+'AAAAAAAAJEDAAAAA','United States','IN','Crawford County',83.000000,78.260000,6237.520000,75.910000,-5952.000000,1930.000000,4.000000
+'AAAAAAAALJFAAAAA','United States','IN','Crawford County',82.000000,94.100000,0.000000,34.810000,-4637.100000,1930.000000,4.000000
+'AAAAAAAAODJAAAAA','United States','IN','Crawford County',49.000000,151.090000,0.000000,15.100000,-2198.140000,1930.000000,4.000000
+'AAAAAAAAOPBBAAAA','United States','IN','Crawford County',73.000000,162.050000,0.000000,71.300000,839.500000,1930.000000,4.000000
+'AAAAAAAAAGCDAAAA','United States','IN','De Kalb County',15.000000,33.560000,0.000000,29.530000,191.250000,1963.000000,5.000000
+'AAAAAAAAALBCAAAA','United States','IN','De Kalb County',3.000000,43.180000,0.000000,5.180000,-39.120000,1963.000000,5.000000
+'AAAAAAAACICCAAAA','United States','IN','De Kalb County',62.000000,111.500000,0.000000,66.900000,-1050.280000,1963.000000,5.000000
+'AAAAAAAADFIDAAAA','United States','IN','De Kalb County',75.000000,277.950000,0.000000,150.090000,3811.500000,1963.000000,5.000000
+'AAAAAAAAGDDBAAAA','United States','IN','De Kalb County',17.000000,102.120000,0.000000,30.630000,-438.430000,1963.000000,5.000000
+'AAAAAAAAGDDCAAAA','United States','IN','De Kalb County',72.000000,7.990000,404.350000,7.910000,-58.750000,1963.000000,5.000000
+'AAAAAAAAIHLCAAAA','United States','IN','De Kalb County',76.000000,234.200000,0.000000,201.410000,8271.840000,1963.000000,5.000000
+'AAAAAAAAILCBAAAA','United States','IN','De Kalb County',92.000000,87.330000,0.000000,3.490000,-2781.160000,1963.000000,5.000000
+'AAAAAAAAJIDCAAAA','United States','IN','De Kalb County',1.000000,82.200000,0.000000,62.470000,-4.360000,1963.000000,5.000000
+'AAAAAAAAACBCAAAA','United States','IN','Dearborn County',1.000000,77.530000,0.000000,49.610000,-1.400000,1982.000000,0.000000
+'AAAAAAAACOHCAAAA','United States','IN','Dearborn County',53.000000,76.540000,258.730000,22.190000,-2407.880000,1982.000000,0.000000
+'AAAAAAAAFBBAAAAA','United States','IN','Dearborn County',66.000000,121.250000,0.000000,54.560000,-524.040000,1982.000000,0.000000
+'AAAAAAAAFIBCAAAA','United States','IN','Dearborn County',26.000000,38.280000,0.000000,25.640000,222.300000,1982.000000,0.000000
+'AAAAAAAAILEDAAAA','United States','IN','Dearborn County',96.000000,213.310000,491.320000,17.060000,-7995.640000,1982.000000,0.000000
+'AAAAAAAAKIKDAAAA','United States','IN','Dearborn County',96.000000,168.660000,0.000000,123.120000,4840.320000,1982.000000,0.000000
+'AAAAAAAAKPEDAAAA','United States','IN','Dearborn County',1.000000,103.550000,10.250000,93.190000,40.150000,1982.000000,0.000000
+'AAAAAAAAMFKBAAAA','United States','IN','Dearborn County',79.000000,98.010000,0.000000,81.340000,2217.530000,1982.000000,0.000000
+'AAAAAAAAMFOBAAAA','United States','IN','Dearborn County',10.000000,203.770000,90.060000,52.980000,-293.260000,1982.000000,0.000000
+'AAAAAAAAMLIBAAAA','United States','IN','Dearborn County',37.000000,48.540000,0.000000,0.000000,-1350.500000,1982.000000,0.000000
+'AAAAAAAAMOIAAAAA','United States','IN','Dearborn County',60.000000,173.070000,1623.980000,58.840000,-1578.380000,1982.000000,0.000000
+'AAAAAAAAONBAAAAA','United States','IN','Dearborn County',14.000000,17.240000,0.000000,1.370000,-114.240000,1982.000000,0.000000
+'AAAAAAAAPFEBAAAA','United States','IN','Dearborn County',35.000000,141.770000,0.000000,89.310000,920.500000,1982.000000,0.000000
+'AAAAAAAAAEJBAAAA','United States','IN','Fayette County',76.000000,85.660000,0.000000,17.130000,-4670.960000,1985.000000,2.000000
+'AAAAAAAAALIBAAAA','United States','IN','Fayette County',53.000000,170.420000,3689.470000,161.890000,-45.190000,1985.000000,2.000000
+'AAAAAAAACDADAAAA','United States','IN','Fayette County',43.000000,45.120000,0.000000,34.290000,774.000000,1985.000000,2.000000
+'AAAAAAAADKDAAAAA','United States','IN','Fayette County',75.000000,40.580000,0.000000,38.140000,606.000000,1985.000000,2.000000
+'AAAAAAAAGCBCAAAA','United States','IN','Fayette County',50.000000,118.210000,648.900000,72.100000,-1849.400000,1985.000000,2.000000
+'AAAAAAAAGKOBAAAA','United States','IN','Fayette County',2.000000,85.080000,0.000000,45.090000,-42.760000,1985.000000,2.000000
+'AAAAAAAAGMLAAAAA','United States','IN','Fayette County',7.000000,28.730000,0.000000,24.420000,62.790000,1985.000000,2.000000
+'AAAAAAAAKNODAAAA','United States','IN','Fayette County',97.000000,153.250000,227.410000,78.150000,-554.300000,1985.000000,2.000000
+'AAAAAAAAKOPBAAAA','United States','IN','Fayette County',28.000000,67.690000,1021.310000,37.220000,-1520.270000,1985.000000,2.000000
+'AAAAAAAAMJJCAAAA','United States','IN','Fayette County',67.000000,25.670000,0.000000,21.810000,775.860000,1985.000000,2.000000
+'AAAAAAAANAHCAAAA','United States','IN','Fayette County',55.000000,45.890000,368.940000,7.800000,-844.690000,1985.000000,2.000000
+'AAAAAAAAAOFDAAAA','United States','IN','Fountain County',87.000000,28.710000,0.000000,27.840000,1472.040000,1968.000000,6.000000
+'AAAAAAAACCGBAAAA','United States','IN','Fountain County',85.000000,44.480000,0.000000,30.240000,15.300000,1968.000000,6.000000
+'AAAAAAAAIIADAAAA','United States','IN','Fountain County',78.000000,118.170000,0.000000,115.800000,3411.720000,1968.000000,6.000000
+'AAAAAAAAOBDBAAAA','United States','IN','Fountain County',65.000000,188.630000,0.000000,165.990000,5481.450000,1968.000000,6.000000
+'AAAAAAAAAEABAAAA','United States','IN','Hamilton County',32.000000,29.890000,0.000000,28.390000,391.360000,1932.000000,5.000000
+'AAAAAAAAAEFCAAAA','United States','IN','Hamilton County',32.000000,31.970000,0.000000,18.540000,65.920000,1932.000000,5.000000
+'AAAAAAAAAMNDAAAA','United States','IN','Hamilton County',70.000000,101.270000,4284.880000,65.820000,-4341.580000,1932.000000,5.000000
+'AAAAAAAAEPKCAAAA','United States','IN','Hamilton County',35.000000,128.900000,0.000000,105.690000,2021.950000,1932.000000,5.000000
+'AAAAAAAAGIMAAAAA','United States','IN','Hamilton County',79.000000,12.060000,326.710000,8.440000,-118.150000,1932.000000,5.000000
+'AAAAAAAAGKFBAAAA','United States','IN','Hamilton County',43.000000,23.850000,0.000000,0.950000,-580.930000,1932.000000,5.000000
+'AAAAAAAAIFICAAAA','United States','IN','Hamilton County',86.000000,2.450000,0.000000,1.980000,48.160000,1932.000000,5.000000
+'AAAAAAAACHNDAAAA','United States','IN','Jennings County',36.000000,2.870000,0.000000,0.110000,-49.320000,1958.000000,2.000000
+'AAAAAAAADBECAAAA','United States','IN','Jennings County',59.000000,89.310000,775.520000,57.150000,747.270000,1958.000000,2.000000
+'AAAAAAAAIAHBAAAA','United States','IN','Jennings County',2.000000,42.430000,0.000000,22.060000,-12.460000,1958.000000,2.000000
+'AAAAAAAAICDEAAAA','United States','IN','Jennings County',17.000000,146.850000,0.000000,41.110000,-524.960000,1958.000000,2.000000
+'AAAAAAAANDMAAAAA','United States','IN','Jennings County',32.000000,238.000000,637.450000,21.420000,-2870.090000,1958.000000,2.000000
+'AAAAAAAAPNBCAAAA','United States','IN','Jennings County',59.000000,230.880000,0.000000,223.950000,7465.270000,1958.000000,2.000000
+'AAAAAAAAAICBAAAA','United States','IN','Johnson County',59.000000,156.860000,0.000000,37.640000,-1144.600000,1924.000000,2.000000
+'AAAAAAAACGJAAAAA','United States','IN','Johnson County',41.000000,111.540000,0.000000,72.500000,1333.320000,1924.000000,2.000000
+'AAAAAAAAHNPCAAAA','United States','IN','Johnson County',5.000000,229.900000,885.990000,188.510000,-432.590000,1924.000000,2.000000
+'AAAAAAAAKBBCAAAA','United States','IN','Johnson County',80.000000,105.660000,0.000000,73.960000,-344.800000,1924.000000,2.000000
+'AAAAAAAAKMEDAAAA','United States','IN','Johnson County',11.000000,81.280000,0.000000,27.630000,-343.970000,1924.000000,2.000000
+'AAAAAAAAKNCEAAAA','United States','IN','Johnson County',68.000000,100.510000,0.000000,18.090000,-4713.080000,1924.000000,2.000000
+'AAAAAAAADAEDAAAA','United States','IN','Kosciusko County',84.000000,68.840000,464.190000,7.570000,-2622.150000,1987.000000,1.000000
+'AAAAAAAAENDAAAAA','United States','IN','Kosciusko County',99.000000,142.120000,679.550000,98.060000,3855.640000,1987.000000,1.000000
+'AAAAAAAAHHFAAAAA','United States','IN','Kosciusko County',59.000000,74.540000,0.000000,64.840000,2237.870000,1987.000000,1.000000
+'AAAAAAAAHKHBAAAA','United States','IN','Kosciusko County',16.000000,58.200000,0.000000,27.350000,-97.600000,1987.000000,1.000000
+'AAAAAAAAIFBCAAAA','United States','IN','Kosciusko County',44.000000,69.880000,0.000000,69.880000,1464.760000,1987.000000,1.000000
+'AAAAAAAAKCLDAAAA','United States','IN','Kosciusko County',53.000000,171.980000,0.000000,29.230000,-1997.570000,1987.000000,1.000000
+'AAAAAAAAKHCEAAAA','United States','IN','Kosciusko County',75.000000,62.040000,0.000000,32.880000,369.750000,1987.000000,1.000000
+'AAAAAAAALOFBAAAA','United States','IN','Kosciusko County',49.000000,95.190000,0.000000,77.100000,2135.420000,1987.000000,1.000000
+'AAAAAAAAMMIAAAAA','United States','IN','Kosciusko County',56.000000,12.780000,0.000000,12.010000,345.520000,1987.000000,1.000000
+'AAAAAAAAPHADAAAA','United States','IN','Kosciusko County',19.000000,89.150000,0.000000,1.780000,-638.400000,1987.000000,1.000000
+'AAAAAAAAAJAEAAAA','United States','IN','La Porte County',56.000000,84.850000,0.000000,6.780000,-2990.400000,1975.000000,4.000000
+'AAAAAAAAALCBAAAA','United States','IN','La Porte County',61.000000,80.160000,0.000000,26.450000,-1646.390000,1975.000000,4.000000
+'AAAAAAAACDDCAAAA','United States','IN','La Porte County',31.000000,129.150000,0.000000,38.740000,-1182.340000,1975.000000,4.000000
+'AAAAAAAACDPDAAAA','United States','IN','La Porte County',23.000000,54.410000,282.090000,22.300000,-343.270000,1975.000000,4.000000
+'AAAAAAAADFEEAAAA','United States','IN','La Porte County',52.000000,126.010000,0.000000,41.580000,-829.920000,1975.000000,4.000000
+'AAAAAAAAEPJDAAAA','United States','IN','La Porte County',38.000000,63.130000,0.000000,46.080000,859.180000,1975.000000,4.000000
+'AAAAAAAAIEDBAAAA','United States','IN','La Porte County',13.000000,50.530000,0.000000,31.320000,-52.260000,1975.000000,4.000000
+'AAAAAAAAIOAEAAAA','United States','IN','La Porte County',10.000000,53.350000,0.000000,33.070000,122.300000,1975.000000,4.000000
+'AAAAAAAAJKMAAAAA','United States','IN','La Porte County',50.000000,66.920000,0.000000,16.730000,-749.500000,1975.000000,4.000000
+'AAAAAAAAKDBAAAAA','United States','IN','La Porte County',57.000000,123.530000,0.000000,81.520000,959.880000,1975.000000,4.000000
+'AAAAAAAAKIDBAAAA','United States','IN','La Porte County',38.000000,50.200000,0.000000,40.660000,-307.040000,1975.000000,4.000000
+'AAAAAAAALHDEAAAA','United States','IN','La Porte County',72.000000,147.380000,0.000000,26.520000,-3985.920000,1975.000000,4.000000
+'AAAAAAAALKEAAAAA','United States','IN','La Porte County',68.000000,159.120000,0.000000,77.960000,-709.920000,1975.000000,4.000000
+---- TYPES
+STRING, STRING, STRING, STRING, DECIMAL, DECIMAL, DECIMAL, DECIMAL, DECIMAL, DECIMAL, DECIMAL
+====
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/impala/blob/35a3e186/testdata/workloads/tpcds/queries/tpcds-decimal_v2-q19.test
----------------------------------------------------------------------
diff --git a/testdata/workloads/tpcds/queries/tpcds-decimal_v2-q19.test b/testdata/workloads/tpcds/queries/tpcds-decimal_v2-q19.test
new file mode 100644
index 0000000..ca73b60
--- /dev/null
+++ b/testdata/workloads/tpcds/queries/tpcds-decimal_v2-q19.test
@@ -0,0 +1,141 @@
+====
+---- QUERY: TPCDS-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,
+  i_brand_id,
+  i_manufact_id,
+  i_manufact
+limit 100;
+---- RESULTS
+3001001,'amalgexporti #1',358,'eingantipri',39779.20
+5002002,'importoscholar #2',503,'pribaranti',38877.55
+2002001,'importoimporto #1',229,'n stableable',38849.73
+6009001,'maxicorp #1',609,'n stbarcally',37679.02
+10012003,'importoamalgamalg #3',68,'eingcally',36856.35
+10015008,'scholaramalgamalg #8',839,'n stprieing',36664.59
+5003002,'exportischolar #2',50,'baranti',35402.74
+4002002,'importoedu pack #2',615,'antioughtcally',34673.98
+3002002,'importoexporti #2',581,'oughteinganti',34669.00
+5002001,'importoscholar #1',442,'ableeseese',34618.53
+5003001,'exportischolar #1',224,'eseableable',34541.38
+5004002,'edu packscholar #2',168,'eingcallyought',33004.86
+4001001,'amalgedu pack #1',379,'n stationpri',32777.45
+7009009,'maxibrand #9',10,'barought',32448.47
+8001009,'amalgnameless #9',21,'oughtable',32020.26
+1003001,'exportiamalg #1',162,'ablecallyought',31531.85
+10011013,'amalgamalgamalg #13',551,'oughtantianti',30259.44
+9004003,'edu packmaxi #3',191,'oughtn stought',29977.55
+7001002,'amalgbrand #2',122,'ableableought',29576.48
+10013006,'exportiamalgamalg #6',461,'oughtcallyese',29475.71
+7008009,'namelessbrand #9',540,'bareseanti',28888.95
+7013001,'exportinameless #1',18,'eingought',28720.16
+5004001,'edu packscholar #1',361,'oughtcallypri',28656.02
+5003001,'exportischolar #1',457,'ationantiese',28560.52
+5001001,'amalgscholar #1',192,'ablen stought',28136.83
+8007009,'brandnameless #9',34,'esepri',27968.38
+6010003,'univbrand #3',165,'anticallyought',27826.40
+4003001,'exportiedu pack #1',30,'barpri',27681.74
+1002002,'importoamalg #2',504,'esebaranti',27540.55
+9009011,'maximaxi #11',117,'ationoughtought',26149.58
+4002001,'importoedu pack #1',96,'callyn st',25291.42
+10012006,'importoamalgamalg #6',162,'ablecallyought',25077.80
+5002001,'importoscholar #1',202,'ablebarable',24662.36
+5004002,'edu packscholar #2',427,'ationableese',24502.14
+8009007,'maxinameless #7',146,'callyeseought',24020.70
+7002005,'importobrand #5',822,'ableableeing',23637.35
+4001001,'amalgedu pack #1',236,'callypriable',23425.22
+3002001,'importoexporti #1',889,'n steingeing',23327.10
+4001001,'amalgedu pack #1',106,'callybarought',23272.95
+9004011,'edu packmaxi #11',241,'oughteseable',23233.46
+3002002,'importoexporti #2',597,'ationn stanti',23181.94
+6011005,'amalgbrand #5',373,'priationpri',22935.30
+5004001,'edu packscholar #1',191,'oughtn stought',22767.49
+10003001,'exportiunivamalg #1',252,'ableantiable',22605.56
+2002001,'importoimporto #1',265,'anticallyable',22316.14
+2004001,'edu packimporto #1',584,'eseeinganti',22312.87
+4004002,'edu packedu pack #2',293,'prin stable',22272.04
+9011008,'amalgunivamalg #8',93,'prin st',22103.70
+1003002,'exportiamalg #2',400,'barbarese',21701.01
+8006008,'corpnameless #8',605,'antibarcally',21599.44
+7014001,'edu packnameless #1',23,'priable',21554.24
+5001002,'amalgscholar #2',124,'eseableought',21004.37
+5003002,'exportischolar #2',162,'ablecallyought',20986.26
+3002001,'importoexporti #1',176,'callyationought',20741.06
+2001001,'amalgimporto #1',219,'n stoughtable',20647.28
+2002001,'importoimporto #1',100,'barbarought',20543.92
+4004001,'edu packedu pack #1',718,'eingoughtation',20488.80
+8014009,'edu packmaxi #9',214,'eseoughtable',20379.43
+10010013,'univamalgamalg #13',656,'callyantically',20274.67
+4003001,'exportiedu pack #1',640,'baresecally',20218.12
+1001001,'amalgamalg #1',257,'ationantiable',19957.37
+2002001,'importoimporto #1',525,'antiableanti',19888.38
+8011002,'amalgmaxi #2',293,'prin stable',18991.25
+4002001,'importoedu pack #1',101,'oughtbarought',18892.36
+9012003,'importounivamalg #3',818,'eingoughteing',18832.74
+10001014,'amalgunivamalg #14',207,'ationbarable',18623.57
+4004001,'edu packedu pack #1',257,'ationantiable',18605.21
+1004001,'edu packamalg #1',675,'antiationcally',18349.99
+8012001,'importomaxi #1',277,'ationationable',18325.53
+1004001,'edu packamalg #1',380,'bareingpri',17896.97
+1002002,'importoamalg #2',50,'baranti',17737.23
+1001001,'amalgamalg #1',346,'callyesepri',17660.98
+2004002,'edu packimporto #2',912,'ableoughtn st',17422.31
+6005006,'scholarcorp #6',270,'barationable',17373.47
+8012007,'importomaxi #7',320,'barablepri',17247.22
+1004001,'edu packamalg #1',594,'esen stanti',17217.04
+10001009,'amalgunivamalg #9',414,'eseoughtese',17196.10
+1003002,'exportiamalg #2',483,'prieingese',17180.13
+10010005,'univamalgamalg #5',684,'eseeingcally',17146.97
+6004005,'edu packcorp #5',224,'eseableable',17081.31
+2002001,'importoimporto #1',134,'esepriought',16596.84
+8014007,'edu packmaxi #7',350,'barantipri',16580.66
+6007007,'brandcorp #7',47,'ationese',16413.40
+10011002,'amalgamalgamalg #2',112,'ableoughtought',16120.65
+2003001,'exportiimporto #1',288,'eingeingable',15769.87
+1002002,'importoamalg #2',489,'n steingese',15707.42
+6013003,'exportibrand #3',16,'callyought',15594.16
+10008005,'namelessunivamalg #5',813,'prioughteing',15433.53
+10004013,'edu packunivamalg #13',764,'esecallyation',15242.69
+9016003,'corpunivamalg #3',51,'oughtanti',15172.76
+10006012,'corpunivamalg #12',166,'callycallyought',15153.42
+5004001,'edu packscholar #1',595,'antin stanti',14910.27
+8003003,'exportinameless #3',85,'antieing',14890.03
+4003001,'exportiedu pack #1',239,'n stpriable',14778.52
+6006001,'corpcorp #1',258,'eingantiable',14579.72
+1004001,'edu packamalg #1',222,'ableableable',14254.25
+4003002,'exportiedu pack #2',117,'ationoughtought',14161.18
+1001001,'amalgamalg #1',89,'n steing',14133.10
+8016009,'corpmaxi #9',734,'esepriation',14055.01
+1002001,'importoamalg #1',184,'eseeingought',13719.81
+---- TYPES
+INT, STRING, INT, STRING, DECIMAL
+====
\ No newline at end of file