impala-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jruss...@apache.org
Subject [08/12] impala git commit: IMPALA-5478: Run TPCDS queries with decimal_v2 enabled
Date Thu, 18 Jan 2018 21:57:53 GMT
http://git-wip-us.apache.org/repos/asf/impala/blob/35a3e186/testdata/workloads/tpcds/queries/tpcds-decimal_v2-q65.test
----------------------------------------------------------------------
diff --git a/testdata/workloads/tpcds/queries/tpcds-decimal_v2-q65.test b/testdata/workloads/tpcds/queries/tpcds-decimal_v2-q65.test
new file mode 100644
index 0000000..0fecab5
--- /dev/null
+++ b/testdata/workloads/tpcds/queries/tpcds-decimal_v2-q65.test
@@ -0,0 +1,160 @@
+====
+---- QUERY: TPCDS-Q65
+select
+  s_store_name,
+  i_item_desc,
+  sc.revenue,
+  i_current_price,
+  i_wholesale_cost,
+  i_brand
+from
+  store,
+  item,
+  (select
+    ss_store_sk,
+    avg(revenue) as ave
+  from
+    (select
+      ss_store_sk,
+      ss_item_sk,
+      sum(ss_sales_price) as revenue
+    from
+      store_sales,
+      date_dim
+    where
+      ss_sold_date_sk = d_date_sk
+      and d_month_seq between 1176 and 1176 + 11
+    group by
+      ss_store_sk,
+      ss_item_sk
+    ) sa
+  group by
+    ss_store_sk
+  ) sb,
+  (select
+    ss_store_sk,
+    ss_item_sk,
+    sum(ss_sales_price) as revenue
+  from
+    store_sales,
+    date_dim
+  where
+    ss_sold_date_sk = d_date_sk
+    and d_month_seq between 1176 and 1176 + 11
+  group by
+    ss_store_sk,
+    ss_item_sk
+  ) sc
+where
+  sb.ss_store_sk = sc.ss_store_sk
+  and sc.revenue <= 0.1 * sb.ave
+  and s_store_sk = sc.ss_store_sk
+  and i_item_sk = sc.ss_item_sk
+order by
+  s_store_name,
+  i_item_desc
+limit 100;
+---- RESULTS
+'able','Commercial, popular processes give later now wooden facts. Black, outer purposes examine national, precise heels. Invisible times s',36.06,5.25,1.68,'amalgedu pack #1'
+'able','Conventional, responsible products discuss delicately then actual findings. Extremel',36.42,3.67,2.82,'namelessnameless #5'
+'able','Difficulties wou',25.25,6.61,2.31,'importobrand #7'
+'able','Efforts might come ever. Even agricultural operations live plus a members. Arts may ring too carefully numerous windows. In particular new ch',22.13,1.49,0.95,'edu packamalg #2'
+'able','Even chief games can present privately extra whole steps. Over old reasons ought to ',21.58,4.30,1.41,'namelesscorp #3'
+'able','Initial, important ministers used to rely. Young, difficult glasses cannot say european, religious organisations; worried minutes protect action',11.03,4.95,3.06,'scholarnameless #7'
+'able','Once olympic sorts could control governments. Final sections mig',21.77,7.76,4.42,'edu packscholar #1'
+'able','Small others will provide probably complete countries. Only effective pensions violate on board maybe left animals. Old r',26.38,2.55,1.60,'maxiunivamalg #2'
+'able','Somehow revolutionary sh',31.09,7.10,3.05,'amalgunivamalg #3'
+'able','Stupid years should not modify loose. Special, sure developments may',7.84,5.81,4.47,'maxicorp #5'
+'able','Swiss, capable lovers handle at least present details. Over here uncomfortable stations take by a lips. Private organisations can supply in a examinatio',29.73,8.15,3.99,'amalgedu pack #2'
+'able','Toys must not meet again goods. Comfortable, major members last days. Popular, double occupations may compensate researchers. Conditions ',25.02,3.35,2.41,'edu packscholar #1'
+'able','Wrong, good values could not work in a minds. Normal structures correct here later massive boo',21.49,4.17,1.45,'importoedu pack #1'
+'ation','Animals conduct primary, sorry tickets. Bare, labour matters used to buy between a patterns. Light authorities explain rules; future eggs can ',1.57,0.86,0.47,'edu packamalg #1'
+'ation','Average services could try unfortunately plants; extensive procedures must',34.63,4.94,3.26,'scholarunivamalg #2'
+'ation','Direct ways topple inches. Complex years can take also across a words. Stupid, global implications would provide sure things. Russians take much for the spots. Indoors local men w',16.06,7.18,4.88,'exportiedu pack #1'
+'ation','Disciplinary signs could prepare particular, other councils. Live criteria ought to stand extra, basic bones. Local leaders tell now tasks. Most old recordings use ago in the governors; par',36.65,8.96,4.39,'amalgscholar #2'
+'ation','Fair families ought to leave relationships. Separate, firm services would assist delicious, serious laws; a',15.31,7.51,2.70,'importoamalg #1'
+'ation','Gradually general affairs come at a gardens. Members may liv',18.43,28.90,11.27,'edu packamalgamalg #15'
+'ation','Here equivalent expectations should stop since to th',18.23,7.88,5.04,'scholarunivamalg #4'
+'ation','Laws propose policies. Commercial, foreign restaurants could take. District',29.49,84.97,32.28,'amalgnameless #5'
+'ation','New r',36.57,2.10,1.19,'importoimporto #2'
+'ation','Officials calculate in the images. Military, olympic services throw apparently old photographs; exotic, wonderful children benefit',25.41,9.36,3.55,'maxibrand #9'
+'ation','Open blue farmers reach useful, old arrangements. American, short years reach now tender, heavy neighbours. Now top boundaries would not enable emotions. Effectively specific ',28.75,2.34,2.01,'exportinameless #7'
+'ation','Or',23.64,3.00,1.86,'amalgedu pack #1'
+'ation','Pensions used to meet in the words. Very african obligati',27.27,0.54,0.27,'exportiexporti #1'
+'ation','Public, limited pup',34.60,9.38,3.93,'amalgmaxi #9'
+'ation','Small kinds would recognize notably violent, labour years. Electronic days would not',30.96,0.90,0.34,'namelesscorp #3'
+'ation','Social, other resources may know reasonable, distant weeks. New, unexpected rates mean. White, electric generations carry together other t',36.10,3.91,2.54,'maxinameless #10'
+'ation','Trustees grow well thereby national attitudes. Social, excellent bacteria contain permanent gaps. Only dynamic uses ought to halt very long, bright men; japanese, distin',3.96,3.31,2.87,'exporticorp #1'
+'bar','Categories shall',18.32,8.98,7.81,'scholarmaxi #9'
+'bar','Clear, top associations can activate all national factors. Items could think sure skills. Fine, thin classes must not help simply only statutory',28.26,6.27,4.57,'brandbrand #10'
+'bar','Extended, local books calm now likely companies. Sometime rich instances improve spanish countries. Crucial flames take further. Rapidly big proposals may not photograph in the opt',12.64,0.55,0.19,'namelessbrand #5'
+'bar','Hours must carry virtually new seats. Polish, happy affairs might get. Originally warm libraries operate real patients. Then soft scie',35.96,28.04,25.23,'edu packedu pack #1'
+'bar','Individual flowers used to give thanks. Particular doubts refer a bit for a directions. Police could',8.31,1.74,1.21,'exportiimporto #2'
+'bar','Low sorts understand. Vegetables must not carry. There legal rates shake so democratic styles. Convenient, single committees might forget',21.35,7.16,5.79,'amalgedu pack #1'
+'bar','Minutes achieve however for a allies. Areas pay apparently alive officers',32.01,3.28,1.34,'amalgedu pack #2'
+'bar','Moments incur pa',32.92,6.14,1.84,'exportiimporto #1'
+'bar','Of course commercial uses look rapidly historical societies. Writers make just high',31.29,3.82,1.33,'exportischolar #1'
+'bar','Old, valuable',23.07,0.23,0.07,'namelessnameless #9'
+'bar','Other things get now. Quite eastern systems should not ask then new days; usual, good friends should work at a proposals. Highly pr',24.90,0.27,0.09,'edu packnameless #1'
+'bar','Pupils change. Frequently nice rates shall not decide future yards. Over upper girls ought to lower in a developments. Formal',36.24,2.19,1.16,'edu packexporti #1'
+'bar','Really foreign workers overcome asleep, young decades. Drugs may tell children; labour, real wages ev',13.88,4.24,2.96,'scholarmaxi #9'
+'bar','Round managers take processes. Primary, particular courses used to hold sacred cases. C',7.23,4.13,2.84,'edu packscholar #1'
+'bar','Simple guests leave british, skilled terms. Kind, little standards must suspect. Combinations may think like, distinguished inches. Artists beat awfully. Ide',27.08,1.68,0.53,'edu packedu pack #2'
+'bar','So damp tests imagine resources. Innocently prime developments shall work small pl',30.83,0.61,0.33,'scholarnameless #6'
+'bar','So much as close reforms would hide at first measures; alone, important contracts lose linguisti',20.14,2.37,1.37,'exportinameless #1'
+'bar','Strange do',15.41,9.47,4.82,'exportiexporti #1'
+'bar','Wide, technical paren',17.06,6.64,3.98,'exportiexporti #1'
+'bar','Wonderful servants must not resolve once physical lives. Later significant an',27.44,0.33,0.22,'brandbrand #7'
+'bar','Years need much. Good interests use too different, junior services. Young items shall not find. Disastrous hands release fast new, alternative applications. American police make in ',33.95,7.68,4.45,'exportiamalg #1'
+'eing','Birds stay foreign, chronic parts. So young cases shall not conclude buildings. About important months may not look; degrees catch just; other societies may not ge',18.42,4.67,2.33,'amalgscholar #2'
+'eing','Central, other hands will agree especially crucial differences',16.71,4.49,3.00,'exportischolar #2'
+'eing','Even single waters make for instance particular hours. Mental rights may cross as just contemporary m',30.54,0.97,0.82,'importounivamalg #5'
+'eing','Flowers cultivate still so-called, available',10.50,3.84,1.22,'edu packmaxi #8'
+'eing','Good, helpful men close. Please difficult lakes should waste very conservative, labour ',11.84,3.13,0.97,'edu packbrand #8'
+'eing','However modern companies ought to make industria',23.09,9.56,3.25,'brandcorp #1'
+'eing','Important, frequent councils explore general, local ideas. Representatives last more. Foreign, sensible pupils pay. Social, american reservations used to get so much',2.86,0.59,0.25,'amalgbrand #2'
+'eing','Increased, special pound',24.05,2.52,1.20,'importoedu pack #2'
+'eing','Laws go shortly british, clear carers. Inner, available aspirations ought to abolish most armed strings. Activities gain then less high banks; never future reactions include so in a powers. Popular, ',30.53,9.69,7.46,'edu packmaxi #8'
+'eing','Main pupils could expel followers. Sometimes severe horses should keep largely earnings. Years put recently permanent inst',19.15,9.17,6.05,'maxinameless #2'
+'eing','More different attempts replace. Changes look shoes. E',25.75,2.47,1.40,'amalgexporti #1'
+'eing','Nations save further new complaints. Perfect things murder different odds. General firms will like also; fatal grounds lie however working sorts. However internal police should design',23.32,8.09,3.31,'amalgexporti #1'
+'eing','Ordinary orders can inspect. New int',34.66,9.58,3.92,'exportiedu pack #2'
+'eing','Other, eager christians live very others. Young, financ',8.49,8.22,5.01,'edu packscholar #1'
+'eing','Parliamentary guests could not convey real chiefs; integrated, full responsibilities take later then important categories. T',28.83,0.41,0.13,'edu packamalg #1'
+'eing','Physical polls melt as eyes. Clear, special sources might invent at once. As immediate things will not',24.71,3.77,1.80,'edu packamalg #2'
+'eing','Specifically honest pp. would ensure wide for a miles. Different families put then western, certain children. Only exciting commitments say f',10.89,0.51,0.26,'edu packunivamalg #11'
+'eing','Students help factors. Seats take matters; likely sources make ridiculous children. Police might say then just natural characters. A',9.32,1.15,0.62,'exportischolar #1'
+'eing','Tired days used to admit for a customs',29.84,5.94,4.93,'importoamalg #1'
+'eing','Wrong, high terms make relatively holidays. Major, relevant theories consider difficult, new markets. Sure, real subjec',27.35,3.29,1.51,'amalgscholar #2'
+'ese','As sure women fall proposals. Entire, loc',35.61,1.91,1.14,'edu packexporti #1'
+'ese','Backwards royal assets get plans; countries used to swing then. Most strange',28.67,1.84,0.82,'exportiedu pack #1'
+'ese','Civil firms say; prospective technologies used to take there. Easy, high assets enter so practical, structural buildings. Studies woul',26.23,9.09,3.45,'maxiunivamalg #6'
+'ese','Comfortable experiments hit defensive implications. Bad resources would not heal central, national twins. Kind, modern thoughts shall ensure home short',34.17,92.12,71.85,'importoedu pack #1'
+'ese','Companies find financially substances. National, enormous conclusions might object here firms; exactly different jobs should complete; practices encourage really months. Necessary, previous recor',24.08,5.63,3.71,'importoamalgamalg #5'
+'ese','Democrats follow mostly available,',25.69,0.59,0.47,'exportibrand #2'
+'ese','Excellent, real advantages would exist posts. Activities shall continue in a feet. Effects think only confidently local c',25.63,2.41,1.90,'amalgunivamalg #11'
+'ese','Expensive reasons shall not carry hardly ri',19.68,4.59,1.46,'scholarbrand #1'
+'ese','Fresh, industrial vegetables could proceed quite i',29.70,7.16,2.57,'scholarunivamalg #8'
+'ese','Full rules may persuade pregnant cars. Earnings publish worried symptoms. Ready',36.87,5.88,4.99,'amalgimporto #1'
+'ese','Horses last results. There thorough parents sail everywhere into a gua',23.67,3.45,2.55,'scholarnameless #5'
+'ese','Large businessmen might give successful poles; children believe however. Hard, fine companies must not dismiss likely advantages. Now great nations shall not walk to',2.78,3.48,1.07,'brandcorp #6'
+'ese','Modern areas include indeed political children. White, widespread services attend also. Pink boundaries explain early because of a letters. Often assistant men make never pale windows. Then inte',30.08,6.20,4.21,'exportiedu pack #2'
+'ese','Nowhere sure shops ought to constitute by a conditions. Apparent hands shall not fit slightly general men. Oth',26.20,3.59,3.08,'amalgscholar #1'
+'ese','Political, french streets used to introduce just labour ',21.21,1.59,1.38,'edu packunivamalg #9'
+'ese','Publications could not judge; double deputies',35.52,6.30,2.39,'edu packamalg #1'
+'ese','Reasonably direct interests turn. Certainly existing ',12.36,1.86,0.89,'importoscholar #1'
+'ese','Temperatures reflect quite',34.31,0.90,0.45,'scholarnameless #3'
+'ese','Tests will maintain only. Beautifully local banks make still; particular votes protect during a eyes. Contracts must understand primarily. Difficult countries cast in a ',19.06,4.13,2.68,'edu packimporto #1'
+'ese','Totally pure styles would seek charges; values say. Normal, big activi',30.40,1.07,0.84,'maxiunivamalg #5'
+'ese','Years want as a whole. Public eyes shall win against a books. Special minutes intensify stones. Alone, right fingers spring men. Ho',32.52,1.73,0.77,'exportibrand #5'
+'ese','NULL',29.58,NULL,NULL,'exportischolar #1'
+'ought','Active abilities depend smoothly by a ',30.54,2.40,1.44,'importoexporti #1'
+'ought','Additional, terrible characters shall examine. Ago lexical conditions get into a weeks. Barely trying results perform still hot men. Great kinds end also committees. Police should live only on the ',18.54,4.46,1.33,'corpmaxi #11'
+'ought','At last political managers would get new, historic workers. Requirements seem loose shadows; activities carry favorite mothers; likely issues stand aside environmental, current funds; below',6.48,1.08,0.43,'exportiexporti #1'
+'ought','Authorities used to leave exactly other co',15.13,2.14,0.72,'exporticorp #5'
+'ought','Costs receive. British teachers evolve mentally only, new words. Good tickets give ',34.78,0.12,0.06,'edu packexporti #1'
+'ought','European, happy homes shall not share. Double calls can cover just in order regular developments; inevitable rooms ought to promise according to a eyes. Normal attempts grow only, complex goods',12.84,8.03,4.57,'univnameless #7'
+'ought','Full-time clothes discharge glad, concerned details. Customs must survive',10.29,8.52,6.73,'exportiunivamalg #14'
+---- TYPES
+STRING, STRING, DECIMAL, DECIMAL, DECIMAL, 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-q67a.test
----------------------------------------------------------------------
diff --git a/testdata/workloads/tpcds/queries/tpcds-decimal_v2-q67a.test b/testdata/workloads/tpcds/queries/tpcds-decimal_v2-q67a.test
new file mode 100644
index 0000000..811f675
--- /dev/null
+++ b/testdata/workloads/tpcds/queries/tpcds-decimal_v2-q67a.test
@@ -0,0 +1,174 @@
+====
+---- QUERY: TPCDS-Q67A
+with results as
+(     select i_category ,i_class ,i_brand ,i_product_name ,d_year ,d_qoy ,d_moy ,s_store_id
+                  ,sum(coalesce(ss_sales_price*ss_quantity,0)) sumsales
+            from store_sales ,date_dim ,store ,item
+       where  ss_sold_date_sk=d_date_sk
+          and ss_item_sk=i_item_sk
+          and ss_store_sk = s_store_sk
+          and d_month_seq between 1200 and 1200 + 11
+       group by i_category, i_class, i_brand, i_product_name, d_year, d_qoy, d_moy,s_store_id)
+ ,
+ results_rollup as
+ (select i_category, i_class, i_brand, i_product_name, d_year, d_qoy, d_moy, s_store_id, sumsales
+  from results
+  union all
+  select i_category, i_class, i_brand, i_product_name, d_year, d_qoy, d_moy, null s_store_id, sum(sumsales) sumsales
+  from results
+  group by i_category, i_class, i_brand, i_product_name, d_year, d_qoy, d_moy
+  union all
+  select i_category, i_class, i_brand, i_product_name, d_year, d_qoy, null d_moy, null s_store_id, sum(sumsales) sumsales
+  from results
+  group by i_category, i_class, i_brand, i_product_name, d_year, d_qoy
+  union all
+  select i_category, i_class, i_brand, i_product_name, d_year, null d_qoy, null d_moy, null s_store_id, sum(sumsales) sumsales
+  from results
+  group by i_category, i_class, i_brand, i_product_name, d_year
+  union all
+  select i_category, i_class, i_brand, i_product_name, null d_year, null d_qoy, null d_moy, null s_store_id, sum(sumsales) sumsales
+  from results
+  group by i_category, i_class, i_brand, i_product_name
+  union all
+  select i_category, i_class, i_brand, null i_product_name, null d_year, null d_qoy, null d_moy, null s_store_id, sum(sumsales) sumsales
+  from results
+  group by i_category, i_class, i_brand
+  union all
+  select i_category, i_class, null i_brand, null i_product_name, null d_year, null d_qoy, null d_moy, null s_store_id, sum(sumsales) sumsales
+  from results
+  group by i_category, i_class
+  union all
+  select i_category, null i_class, null i_brand, null i_product_name, null d_year, null d_qoy, null d_moy, null s_store_id, sum(sumsales) sumsales
+  from results
+  group by i_category
+  union all
+  select null i_category, null i_class, null i_brand, null i_product_name, null d_year, null d_qoy, null d_moy, null s_store_id, sum(sumsales) sumsales
+  from results)
+ select  *
+from (select i_category
+            ,i_class
+            ,i_brand
+            ,i_product_name
+            ,d_year
+            ,d_qoy
+            ,d_moy
+            ,s_store_id
+            ,sumsales
+            ,rank() over (partition by i_category order by sumsales desc) rk
+      from results_rollup) dw2
+where rk <= 100
+order by i_category
+        ,i_class
+        ,i_brand
+        ,i_product_name
+        ,d_year
+        ,d_qoy
+        ,d_moy
+        ,s_store_id
+        ,sumsales
+        ,rk
+limit 100;
+---- RESULTS
+'Books','arts','amalgmaxi #12','NULL',NULL,NULL,NULL,'NULL',1577322.20,26
+'Books','arts','amalgmaxi #2','NULL',NULL,NULL,NULL,'NULL',757558.15,93
+'Books','arts','amalgmaxi #3','NULL',NULL,NULL,NULL,'NULL',889848.65,79
+'Books','arts','amalgmaxi #9','NULL',NULL,NULL,NULL,'NULL',816219.08,89
+'Books','arts','NULL','NULL',NULL,NULL,NULL,'NULL',5188162.15,17
+'Books','business','importomaxi #12','NULL',NULL,NULL,NULL,'NULL',1288307.29,42
+'Books','business','importomaxi #2','NULL',NULL,NULL,NULL,'NULL',985887.08,68
+'Books','business','importomaxi #8','NULL',NULL,NULL,NULL,'NULL',1067725.65,61
+'Books','business','importomaxi #9','NULL',NULL,NULL,NULL,'NULL',1269598.91,45
+'Books','business','NULL','NULL',NULL,NULL,NULL,'NULL',5905977.34,10
+'Books','computers','exportimaxi #12','NULL',NULL,NULL,NULL,'NULL',1456918.73,28
+'Books','computers','exportimaxi #2','NULL',NULL,NULL,NULL,'NULL',1626664.04,24
+'Books','computers','exportimaxi #3','NULL',NULL,NULL,NULL,'NULL',875667.64,82
+'Books','computers','exportimaxi #6','NULL',NULL,NULL,NULL,'NULL',847659.03,86
+'Books','computers','exportimaxi #8','NULL',NULL,NULL,NULL,'NULL',1189646.65,49
+'Books','computers','exportimaxi #9','NULL',NULL,NULL,NULL,'NULL',1059845.98,63
+'Books','computers','NULL','NULL',NULL,NULL,NULL,'NULL',7061536.03,7
+'Books','cooking','amalgunivamalg #12','NULL',NULL,NULL,NULL,'NULL',1097730.00,58
+'Books','cooking','amalgunivamalg #3','NULL',NULL,NULL,NULL,'NULL',978431.47,69
+'Books','cooking','amalgunivamalg #6','NULL',NULL,NULL,NULL,'NULL',858562.34,84
+'Books','cooking','amalgunivamalg #8','NULL',NULL,NULL,NULL,'NULL',917692.00,74
+'Books','cooking','amalgunivamalg #9','NULL',NULL,NULL,NULL,'NULL',881045.30,80
+'Books','cooking','NULL','NULL',NULL,NULL,NULL,'NULL',5357549.49,16
+'Books','entertainments','edu packmaxi #12','NULL',NULL,NULL,NULL,'NULL',962267.01,70
+'Books','entertainments','edu packmaxi #2','NULL',NULL,NULL,NULL,'NULL',750249.81,94
+'Books','entertainments','edu packmaxi #3','NULL',NULL,NULL,NULL,'NULL',1325140.63,39
+'Books','entertainments','edu packmaxi #6','NULL',NULL,NULL,NULL,'NULL',874454.87,83
+'Books','entertainments','edu packmaxi #8','NULL',NULL,NULL,NULL,'NULL',894416.62,78
+'Books','entertainments','NULL','NULL',NULL,NULL,NULL,'NULL',5465761.48,14
+'Books','fiction','scholarunivamalg #12','NULL',NULL,NULL,NULL,'NULL',957012.63,71
+'Books','fiction','scholarunivamalg #2','NULL',NULL,NULL,NULL,'NULL',1798976.95,20
+'Books','fiction','scholarunivamalg #3','NULL',NULL,NULL,NULL,'NULL',1288272.89,43
+'Books','fiction','scholarunivamalg #6','NULL',NULL,NULL,NULL,'NULL',1031571.39,65
+'Books','fiction','scholarunivamalg #8','NULL',NULL,NULL,NULL,'NULL',1444468.85,30
+'Books','fiction','scholarunivamalg #9','NULL',NULL,NULL,NULL,'NULL',1333004.22,38
+'Books','fiction','NULL','NULL',NULL,NULL,NULL,'NULL',7867516.44,3
+'Books','history','scholarmaxi #12','NULL',NULL,NULL,NULL,'NULL',1407800.96,34
+'Books','history','scholarmaxi #2','NULL',NULL,NULL,NULL,'NULL',1601550.87,25
+'Books','history','scholarmaxi #3','NULL',NULL,NULL,NULL,'NULL',1181491.20,50
+'Books','history','scholarmaxi #6','NULL',NULL,NULL,NULL,'NULL',1175904.65,51
+'Books','history','scholarmaxi #8','NULL',NULL,NULL,NULL,'NULL',1205167.13,48
+'Books','history','scholarmaxi #9','NULL',NULL,NULL,NULL,'NULL',1873407.99,18
+'Books','history','NULL','NULL',NULL,NULL,NULL,'NULL',8458815.11,2
+'Books','home repair','importounivamalg #12','NULL',NULL,NULL,NULL,'NULL',929871.46,72
+'Books','home repair','importounivamalg #2','NULL',NULL,NULL,NULL,'NULL',1672201.56,22
+'Books','home repair','importounivamalg #3','NULL',NULL,NULL,NULL,'NULL',1321000.94,40
+'Books','home repair','importounivamalg #6','NULL',NULL,NULL,NULL,'NULL',717528.04,96
+'Books','home repair','importounivamalg #8','NULL',NULL,NULL,NULL,'NULL',1669033.95,23
+'Books','home repair','importounivamalg #9','NULL',NULL,NULL,NULL,'NULL',1066519.11,62
+'Books','home repair','NULL','NULL',NULL,NULL,NULL,'NULL',7388154.74,4
+'Books','mystery','corpunivamalg #12','NULL',NULL,NULL,NULL,'NULL',1146116.05,54
+'Books','mystery','corpunivamalg #2','NULL',NULL,NULL,NULL,'NULL',747999.99,95
+'Books','mystery','corpunivamalg #3','NULL',NULL,NULL,NULL,'NULL',1145257.96,55
+'Books','mystery','corpunivamalg #6','NULL',NULL,NULL,NULL,'NULL',1098189.71,57
+'Books','mystery','corpunivamalg #8','NULL',NULL,NULL,NULL,'NULL',759890.03,92
+'Books','mystery','NULL','NULL',NULL,NULL,NULL,'NULL',5559086.76,13
+'Books','parenting','corpmaxi #12','NULL',NULL,NULL,NULL,'NULL',1022503.60,66
+'Books','parenting','corpmaxi #2','NULL',NULL,NULL,NULL,'NULL',908607.31,76
+'Books','parenting','corpmaxi #6','NULL',NULL,NULL,NULL,'NULL',1717275.15,21
+'Books','parenting','corpmaxi #9','NULL',NULL,NULL,NULL,'NULL',895829.36,77
+'Books','parenting','NULL','NULL',NULL,NULL,NULL,'NULL',5905648.45,11
+'Books','reference','brandmaxi #12','NULL',NULL,NULL,NULL,'NULL',1418372.80,33
+'Books','reference','brandmaxi #2','NULL',NULL,NULL,NULL,'NULL',1154379.77,53
+'Books','reference','brandmaxi #3','NULL',NULL,NULL,NULL,'NULL',1168210.15,52
+'Books','reference','brandmaxi #6','NULL',NULL,NULL,NULL,'NULL',1349780.84,37
+'Books','reference','brandmaxi #8','NULL',NULL,NULL,NULL,'NULL',1429502.89,31
+'Books','reference','brandmaxi #9','NULL',NULL,NULL,NULL,'NULL',714094.43,97
+'Books','reference','NULL','NULL',NULL,NULL,NULL,'NULL',7245435.64,6
+'Books','romance','namelessmaxi #12','NULL',NULL,NULL,NULL,'NULL',1356568.45,36
+'Books','romance','namelessmaxi #2','NULL',NULL,NULL,NULL,'NULL',1236630.16,47
+'Books','romance','namelessmaxi #3','NULL',NULL,NULL,NULL,'NULL',1866764.20,19
+'Books','romance','namelessmaxi #6','NULL',NULL,NULL,NULL,'NULL',1086707.92,59
+'Books','romance','namelessmaxi #8','NULL',NULL,NULL,NULL,'NULL',825762.40,88
+'Books','romance','namelessmaxi #9','NULL',NULL,NULL,NULL,'NULL',876869.83,81
+'Books','romance','NULL','NULL',NULL,NULL,NULL,'NULL',7252274.41,5
+'Books','science','maximaxi #2','NULL',NULL,NULL,NULL,'NULL',702171.30,98
+'Books','science','maximaxi #3','NULL',NULL,NULL,NULL,'NULL',777021.93,90
+'Books','science','maximaxi #6','NULL',NULL,NULL,NULL,'NULL',1446589.43,29
+'Books','science','maximaxi #8','NULL',NULL,NULL,NULL,'NULL',1004042.04,67
+'Books','science','maximaxi #9','NULL',NULL,NULL,NULL,'NULL',849422.20,85
+'Books','science','NULL','NULL',NULL,NULL,NULL,'NULL',5359276.19,15
+'Books','self-help','exportiunivamalg #2','NULL',NULL,NULL,NULL,'NULL',1283148.53,44
+'Books','self-help','exportiunivamalg #3','NULL',NULL,NULL,NULL,'NULL',770181.59,91
+'Books','self-help','exportiunivamalg #6','NULL',NULL,NULL,NULL,'NULL',1391623.86,35
+'Books','self-help','exportiunivamalg #8','NULL',NULL,NULL,NULL,'NULL',695644.62,100
+'Books','self-help','exportiunivamalg #9','NULL',NULL,NULL,NULL,'NULL',1427999.91,32
+'Books','self-help','NULL','NULL',NULL,NULL,NULL,'NULL',6261649.72,8
+'Books','sports','edu packunivamalg #12','NULL',NULL,NULL,NULL,'NULL',928301.94,73
+'Books','sports','edu packunivamalg #6','NULL',NULL,NULL,NULL,'NULL',1503681.79,27
+'Books','sports','edu packunivamalg #8','NULL',NULL,NULL,NULL,'NULL',1263974.84,46
+'Books','sports','edu packunivamalg #9','NULL',NULL,NULL,NULL,'NULL',840684.29,87
+'Books','sports','NULL','NULL',NULL,NULL,NULL,'NULL',5610649.06,12
+'Books','travel','univunivamalg #12','NULL',NULL,NULL,NULL,'NULL',1135250.45,56
+'Books','travel','univunivamalg #2','NULL',NULL,NULL,NULL,'NULL',1053533.86,64
+'Books','travel','univunivamalg #3','NULL',NULL,NULL,NULL,'NULL',1085484.15,60
+'Books','travel','univunivamalg #6','NULL',NULL,NULL,NULL,'NULL',696575.97,99
+'Books','travel','univunivamalg #8','NULL',NULL,NULL,NULL,'NULL',1310411.80,41
+'Books','travel','univunivamalg #9','NULL',NULL,NULL,NULL,'NULL',917487.24,75
+'Books','travel','NULL','NULL',NULL,NULL,NULL,'NULL',6200882.35,9
+'Books','NULL','NULL','NULL',NULL,NULL,NULL,'NULL',102246971.86,1
+---- TYPES
+STRING, STRING, STRING, STRING, INT, INT, INT, STRING, DECIMAL, 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-q68.test
----------------------------------------------------------------------
diff --git a/testdata/workloads/tpcds/queries/tpcds-decimal_v2-q68.test b/testdata/workloads/tpcds/queries/tpcds-decimal_v2-q68.test
new file mode 100644
index 0000000..f3b9667
--- /dev/null
+++ b/testdata/workloads/tpcds/queries/tpcds-decimal_v2-q68.test
@@ -0,0 +1,155 @@
+====
+---- QUERY: TPCDS-Q68
+select
+  c_last_name,
+  c_first_name,
+  ca_city,
+  bought_city,
+  ss_ticket_number,
+  extended_price,
+  extended_tax,
+  list_price
+from
+  (select
+    ss_ticket_number,
+    ss_customer_sk,
+    ca_city bought_city,
+    sum(ss_ext_sales_price) extended_price,
+    sum(ss_ext_list_price) list_price,
+    sum(ss_ext_tax) extended_tax
+  from
+    store_sales,
+    date_dim,
+    store,
+    household_demographics,
+    customer_address
+  where
+    store_sales.ss_sold_date_sk = date_dim.d_date_sk
+    and store_sales.ss_store_sk = store.s_store_sk
+    and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk
+    and store_sales.ss_addr_sk = customer_address.ca_address_sk
+    and date_dim.d_dom between 1 and 2
+    and (household_demographics.hd_dep_count = 4
+      or household_demographics.hd_vehicle_count = 3)
+    and date_dim.d_year in (1999, 1999 + 1, 1999 + 2)
+    and store.s_city in ('Midway', 'Fairview')
+  group by
+    ss_ticket_number,
+    ss_customer_sk,
+    ss_addr_sk,
+    ca_city
+  ) dn,
+  customer,
+  customer_address current_addr
+where
+  ss_customer_sk = c_customer_sk
+  and customer.c_current_addr_sk = current_addr.ca_address_sk
+  and current_addr.ca_city <> bought_city
+order by
+  c_last_name,
+  ss_ticket_number
+limit 100;
+---- RESULTS
+'Aaron','Guy','Lakeside','Mount Pleasant',210815,24704.66,678.88,45673.18
+'Abbott','Joseph','Greenfield','Midway',62751,37795.50,1086.40,53385.17
+'Abbott','Harriet','Wesley','Forest Hills',84405,23666.36,1274.86,45689.64
+'Abney','Louis','Gladstone','Green Acres',140967,20698.82,491.86,48086.21
+'Acevedo','David','Clinton','Shady Grove',131505,22075.16,772.60,46961.99
+'Acosta','Johnnie','Centerville','Enterprise',69183,21688.97,1059.74,34387.30
+'Acosta','David','Harmony','Bunker Hill',112259,11738.20,399.34,17105.96
+'Adair','Evan','Blanchard','New Hope',117449,10843.01,540.08,20084.01
+'Adams','Genevieve','Enterprise','Union Hill',109910,32666.21,1432.96,61189.81
+'Adams','Joyce','Newtown','Concord',166181,18450.10,1108.79,28427.74
+'Adams','John','Marion','Oak Ridge',206733,34785.44,852.47,57926.68
+'Adams','David','Bridgeport','Antioch',213366,12990.48,225.47,28512.17
+'Aguayo','John','Newport','Newtown',156381,17114.17,567.09,30022.52
+'Aguayo','Jeanne','Glendale','Hopewell',199409,29035.37,1374.34,53784.57
+'Aguilar','Arlene','Ashland','Brownsville',121548,31984.01,1162.65,50601.98
+'Aguirre','Penny','Union Hill','Marion',104413,35843.61,966.63,52811.51
+'Ahmed','Maureen','Oak Hill','Union Hill',128051,23686.18,1174.98,41563.27
+'Aiken','James','Mount Olive','Crossroads',212463,18049.02,819.49,29911.37
+'Alarcon','Victoria','Spring Valley','Bunker Hill',134199,18533.41,710.55,37775.73
+'Alexander','Robert','Woodlawn','Arlington',174134,28340.20,914.46,51978.95
+'Alexander','Megan','White Oak','Greenfield',179976,21580.95,898.61,42878.10
+'Alexander','Beverly','Valley View','Five Forks',212635,15885.12,1067.05,30762.55
+'Allen','Amy','Oakland','Greenville',59638,27050.83,1879.66,41767.88
+'Allen','Kenneth','Springdale','Liberty',79152,10310.19,260.52,30436.60
+'Allen','Harold','Lincoln','Providence',84380,22544.47,1135.75,57628.38
+'Allen','William','Lewis','Springdale',101791,20167.15,1076.20,25099.71
+'Allen','Dustin','Arlington','Five Forks',167363,9931.55,397.05,41126.80
+'Allen','Marcus','Woodlawn','Belleville',213821,17649.78,797.92,66454.88
+'Allen','Curtis','Brentwood','Richardson',216964,5751.82,180.82,39045.19
+'Allison','Betty','Hamilton','Riverside',154720,13246.09,394.33,20798.94
+'Allison','Sylvia','Jackson','Woodland',162335,16473.74,541.19,37558.02
+'Alonzo','Charles','Unionville','Jamestown',91324,12253.64,736.42,31247.28
+'Alston','Jesus','Midway','Bridgeport',52608,30120.39,1733.46,61262.55
+'Alvarado','Brooke','Springfield','Deerfield',22264,7382.73,186.70,14659.04
+'Alvarado','Tyson','Pleasant Grove','Midway',187704,21663.47,1230.22,40665.04
+'Alvarez','Glenn','Mount Vernon','Martinsville',191809,19592.11,1176.85,41206.86
+'Amato','Nelson','Brownsville','Harmon',142017,25961.35,978.70,39198.79
+'Ames','Gregory','Summerfield','Carthage',239041,24406.60,890.32,48047.25
+'Anderson','Alan','Bunker Hill','Oakdale',31774,27005.34,1103.94,40676.61
+'Anderson','Mark','Clearwater','Shiloh',34383,11726.53,446.01,24160.55
+'Anderson','Eloise','Fairview','Midway',59994,24468.31,1185.01,71467.37
+'Anderson','Marcia','Clifton','Lawrenceville',83235,32158.02,1641.86,66411.93
+'Anderson','Margaret','Liberty','Woodville',122663,12244.97,448.17,24411.14
+'Anderson','Jeremy','Bridgeport','Golden',148124,18681.36,645.07,31244.92
+'Anderson','Marcia','Clifton','Belmont',156087,15630.25,586.02,36680.54
+'Anderson','Gerald','Centerville','Hamilton',161201,11833.74,556.97,28705.58
+'Anderson','Mark','Clearwater','Deerfield',178872,22171.96,746.63,35582.48
+'Anderson','Latasha','Florence','Altamont',187946,14746.73,254.79,31702.67
+'Anderson','John','Valley View','Pleasant Valley',207323,24052.33,890.91,40618.13
+'Andrews','Johnathan','Pleasant Valley','Cedar',135587,7745.55,264.73,14969.23
+'Angel','Claudette','Sunnyside','Edgewood',196703,40487.66,2101.67,74569.91
+'Antoine','Natalia','Pine Grove','Providence',17718,9705.04,248.18,35927.56
+'Applegate','Edith','Oak Ridge','Waterloo',99615,14067.16,321.47,28150.90
+'Arce','Casey','Sulphur Springs','Salem',22677,32542.08,1517.63,52981.23
+'Archuleta','NULL','Yorktown','Welcome',205016,18262.18,1100.87,35615.43
+'Armijo','Bryan','Pleasant Grove','Woodbury',91994,13606.26,864.10,42234.98
+'Armstrong','Charles','Providence','Pine Grove',62187,13115.42,655.65,45343.33
+'Ashby','Jeanne','Wildwood','Oakwood',28839,21247.34,1166.93,25034.57
+'Ashe','Barbara','Spring Hill','Bunker Hill',17181,23184.07,1387.18,48324.66
+'Ashley','Emmanuel','Forest Hills','Hopewell',170241,28574.95,475.41,80421.92
+'Atkinson','Cedric','Red Hill','Summit',194465,30255.47,1199.93,48718.93
+'Austin','Molly','Greenville','Midway',233037,21252.57,433.63,36658.60
+'Avila','Ashley','Clinton','Summit',214308,19752.60,476.87,47445.77
+'Ayala','Jesus','Woodville','Arlington',17419,30939.94,1343.98,56058.79
+'Ayala','Ana','Clinton','Oakdale',71608,32095.11,851.00,54011.17
+'Ayala','Stacy','Macedonia','Fairview',233483,21589.41,944.73,50167.53
+'Ayres','Loretta','Whispering Pines','Pine Grove',95587,16392.62,528.13,42092.74
+'Babin','Mike','Arcola','Sulphur Springs',179769,20294.32,731.54,46743.49
+'Bailey','Robert','Mountain View','Lakeview',234709,22616.93,831.50,55324.79
+'Baker','Jennifer','Georgetown','Enterprise',29854,22831.56,760.14,35952.11
+'Baker','Joel','Sulphur Springs','Lincoln',48913,17417.92,829.45,33206.23
+'Baker','Benjamin','Bethel','Oakland',79834,4618.07,149.22,24355.19
+'Baker','Richard','Five Forks','Greenfield',110320,20924.76,1460.23,41027.94
+'Baker','Craig','Oak Ridge','Providence',141109,24105.20,1083.53,42863.71
+'Baker','Daniel','Jackson','Wilson',201588,15385.36,778.77,31795.09
+'Baldridge','Victor','Siloam','Mount Pleasant',46121,32854.69,1031.00,77791.74
+'Baldwin','James','Bunker Hill','Edgewood',67593,13885.95,500.11,43493.89
+'Baldwin','Tena','Andover','Glenwood',180853,13526.84,678.23,35726.94
+'Baldwin','Barry','Walnut Grove','Clinton',187586,14637.55,609.62,21051.70
+'Ball','Lionel','Union','Concord',143182,25763.15,1287.78,42039.28
+'Ball','Evelyn','Spring Valley','Five Points',205355,6095.24,447.79,28374.50
+'Ballou','Michael','Reno','Lincoln',177577,10735.74,560.24,36449.75
+'Banks','Marian','Woodville','Richfield',52317,11876.83,597.09,28381.94
+'Banks','Angela','Harmony','Sullivan',90206,21927.27,1023.96,52589.76
+'Barajas','Wendy','Mount Vernon','Liberty',213552,27777.38,940.01,44515.82
+'Barker','Robert','Midway','Oak Ridge',23734,27986.16,662.34,49205.06
+'Barker','Keith','Summit','Lakewood',139745,4983.72,181.81,12471.30
+'Barker','Keith','Summit','Valley View',214164,20816.56,931.20,52036.95
+'Barnes','Arthur','Flint','Stringtown',71708,13512.86,711.46,32063.72
+'Barnes','Charles','Spring Hill','Franklin',79586,35911.85,759.04,61893.18
+'Barnett','Donald','Fairfield','Bethel',69630,28948.35,825.18,59288.30
+'Barnett','Stacie','Wilson','Greenfield',90549,21277.47,819.57,45569.89
+'Barnett','Linda','Centerville','Providence',226202,28599.43,1389.20,57758.69
+'Barney','Bernice','Mount Olive','Summit',192415,14490.99,919.54,33533.73
+'Barnhart','Josephine','Riverside','Salem',123737,17146.50,308.43,29986.14
+'Barr','Kyle','Shiloh','Greenfield',217215,2593.66,68.45,10983.70
+'Barrett','Robert','Kingston','Riverview',52319,23184.59,434.24,30968.82
+'Barton','Margaret','Sleepy Hollow','Highland Park',50712,15262.57,738.68,40574.06
+'Bates','Albert','Springdale','Gravel Hill',113737,12809.77,585.36,31662.77
+'Bauer','August','Fairfield','Belmont',134369,31443.79,1368.37,50747.16
+---- TYPES
+STRING, STRING, STRING, STRING, BIGINT, 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-q69.test
----------------------------------------------------------------------
diff --git a/testdata/workloads/tpcds/queries/tpcds-decimal_v2-q69.test b/testdata/workloads/tpcds/queries/tpcds-decimal_v2-q69.test
new file mode 100644
index 0000000..0fe88d1
--- /dev/null
+++ b/testdata/workloads/tpcds/queries/tpcds-decimal_v2-q69.test
@@ -0,0 +1,150 @@
+====
+---- QUERY: TPCDS-Q69
+select
+  cd_gender,
+  cd_marital_status,
+  cd_education_status,
+  count(*) cnt1,
+  cd_purchase_estimate,
+  count(*) cnt2,
+  cd_credit_rating,
+  count(*) cnt3
+ from
+  customer c,customer_address ca,customer_demographics
+ where
+  c.c_current_addr_sk = ca.ca_address_sk and
+  ca_state in ('KY','GA','NM') and
+  cd_demo_sk = c.c_current_cdemo_sk and
+  exists (select *
+          from store_sales,date_dim
+          where c.c_customer_sk = ss_customer_sk and
+                ss_sold_date_sk = d_date_sk and
+                d_year = 2001 and
+                d_moy between 4 and 4+2) and
+   (not exists (select *
+            from web_sales,date_dim
+            where c.c_customer_sk = ws_bill_customer_sk and
+                  ws_sold_date_sk = d_date_sk and
+                  d_year = 2001 and
+                  d_moy between 4 and 4+2) and
+    not exists (select *
+            from catalog_sales,date_dim
+            where c.c_customer_sk = cs_ship_customer_sk and
+                  cs_sold_date_sk = d_date_sk and
+                  d_year = 2001 and
+                  d_moy between 4 and 4+2))
+ group by cd_gender,
+          cd_marital_status,
+          cd_education_status,
+          cd_purchase_estimate,
+          cd_credit_rating
+ order by cd_gender,
+          cd_marital_status,
+          cd_education_status,
+          cd_purchase_estimate,
+          cd_credit_rating
+ limit 100;
+---- RESULTS
+'F','D','2 yr Degree',1,2500,1,'Low Risk',1
+'F','D','2 yr Degree',1,4500,1,'Good',1
+'F','D','2 yr Degree',2,4500,2,'Low Risk',2
+'F','D','2 yr Degree',1,9000,1,'Good',1
+'F','D','2 yr Degree',1,9500,1,'Good',1
+'F','D','4 yr Degree',1,1000,1,'Low Risk',1
+'F','D','4 yr Degree',1,1500,1,'Low Risk',1
+'F','D','4 yr Degree',1,1500,1,'Unknown',1
+'F','D','4 yr Degree',1,2000,1,'Good',1
+'F','D','4 yr Degree',1,2500,1,'Unknown',1
+'F','D','4 yr Degree',1,4000,1,'Unknown',1
+'F','D','4 yr Degree',1,5500,1,'Good',1
+'F','D','4 yr Degree',1,7000,1,'Good',1
+'F','D','4 yr Degree',1,7000,1,'High Risk',1
+'F','D','4 yr Degree',1,8000,1,'High Risk',1
+'F','D','4 yr Degree',1,8500,1,'Unknown',1
+'F','D','Advanced Degree',1,1000,1,'Good',1
+'F','D','Advanced Degree',1,3500,1,'Good',1
+'F','D','Advanced Degree',1,3500,1,'High Risk',1
+'F','D','Advanced Degree',1,4000,1,'High Risk',1
+'F','D','Advanced Degree',1,5000,1,'High Risk',1
+'F','D','Advanced Degree',1,5500,1,'Good',1
+'F','D','Advanced Degree',1,5500,1,'Low Risk',1
+'F','D','Advanced Degree',1,6500,1,'Low Risk',1
+'F','D','Advanced Degree',1,7000,1,'High Risk',1
+'F','D','Advanced Degree',1,8000,1,'Low Risk',1
+'F','D','Advanced Degree',1,8500,1,'High Risk',1
+'F','D','Advanced Degree',1,9500,1,'Low Risk',1
+'F','D','Advanced Degree',1,9500,1,'Unknown',1
+'F','D','Advanced Degree',1,10000,1,'Low Risk',1
+'F','D','College',1,1500,1,'Low Risk',1
+'F','D','College',1,2500,1,'Good',1
+'F','D','College',1,4000,1,'High Risk',1
+'F','D','College',1,6000,1,'Good',1
+'F','D','College',1,6000,1,'High Risk',1
+'F','D','College',1,9000,1,'High Risk',1
+'F','D','Primary',1,3000,1,'High Risk',1
+'F','D','Primary',1,4000,1,'Low Risk',1
+'F','D','Primary',1,4000,1,'Unknown',1
+'F','D','Primary',1,4500,1,'Unknown',1
+'F','D','Primary',1,5000,1,'High Risk',1
+'F','D','Primary',1,5000,1,'Unknown',1
+'F','D','Primary',1,6000,1,'Good',1
+'F','D','Primary',1,6000,1,'Unknown',1
+'F','D','Primary',1,8500,1,'Unknown',1
+'F','D','Primary',1,9000,1,'Unknown',1
+'F','D','Primary',1,9500,1,'High Risk',1
+'F','D','Primary',1,9500,1,'Unknown',1
+'F','D','Primary',1,10000,1,'Good',1
+'F','D','Primary',2,10000,2,'Low Risk',2
+'F','D','Secondary',1,500,1,'Low Risk',1
+'F','D','Secondary',1,1000,1,'High Risk',1
+'F','D','Secondary',1,3000,1,'Good',1
+'F','D','Secondary',1,3500,1,'Good',1
+'F','D','Secondary',1,6000,1,'Low Risk',1
+'F','D','Secondary',1,6500,1,'Unknown',1
+'F','D','Secondary',1,8500,1,'High Risk',1
+'F','D','Secondary',1,10000,1,'Low Risk',1
+'F','D','Unknown',1,1500,1,'High Risk',1
+'F','D','Unknown',1,3000,1,'Good',1
+'F','D','Unknown',1,3000,1,'High Risk',1
+'F','D','Unknown',1,6000,1,'Good',1
+'F','D','Unknown',1,6500,1,'High Risk',1
+'F','D','Unknown',2,8000,2,'Low Risk',2
+'F','D','Unknown',1,10000,1,'Unknown',1
+'F','M','2 yr Degree',1,2500,1,'Low Risk',1
+'F','M','2 yr Degree',3,4000,3,'Unknown',3
+'F','M','2 yr Degree',1,4500,1,'Low Risk',1
+'F','M','2 yr Degree',1,8500,1,'High Risk',1
+'F','M','4 yr Degree',1,1000,1,'Good',1
+'F','M','4 yr Degree',1,1500,1,'Good',1
+'F','M','4 yr Degree',1,4000,1,'Low Risk',1
+'F','M','4 yr Degree',1,4000,1,'Unknown',1
+'F','M','4 yr Degree',1,5000,1,'Unknown',1
+'F','M','4 yr Degree',1,5500,1,'Low Risk',1
+'F','M','4 yr Degree',1,6000,1,'Good',1
+'F','M','4 yr Degree',1,8000,1,'High Risk',1
+'F','M','Advanced Degree',1,500,1,'Low Risk',1
+'F','M','Advanced Degree',1,500,1,'Unknown',1
+'F','M','Advanced Degree',1,2500,1,'Good',1
+'F','M','Advanced Degree',1,3500,1,'High Risk',1
+'F','M','Advanced Degree',2,5500,2,'Unknown',2
+'F','M','Advanced Degree',1,6500,1,'Good',1
+'F','M','Advanced Degree',1,6500,1,'Unknown',1
+'F','M','Advanced Degree',1,8000,1,'Low Risk',1
+'F','M','Advanced Degree',1,9500,1,'Good',1
+'F','M','Advanced Degree',1,10000,1,'Low Risk',1
+'F','M','College',1,1000,1,'Unknown',1
+'F','M','College',1,3000,1,'Good',1
+'F','M','College',2,5000,2,'High Risk',2
+'F','M','College',1,6000,1,'Low Risk',1
+'F','M','College',1,7000,1,'High Risk',1
+'F','M','College',1,8000,1,'Good',1
+'F','M','College',1,9000,1,'Good',1
+'F','M','College',2,9000,2,'High Risk',2
+'F','M','College',1,9500,1,'High Risk',1
+'F','M','College',1,10000,1,'High Risk',1
+'F','M','Primary',1,1000,1,'Low Risk',1
+'F','M','Primary',1,1500,1,'High Risk',1
+'F','M','Primary',1,7000,1,'Good',1
+---- TYPES
+STRING, STRING, STRING, BIGINT, INT, BIGINT, STRING, 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-q7.test
----------------------------------------------------------------------
diff --git a/testdata/workloads/tpcds/queries/tpcds-decimal_v2-q7.test b/testdata/workloads/tpcds/queries/tpcds-decimal_v2-q7.test
new file mode 100644
index 0000000..954a954
--- /dev/null
+++ b/testdata/workloads/tpcds/queries/tpcds-decimal_v2-q7.test
@@ -0,0 +1,134 @@
+====
+---- QUERY: TPCDS-Q7
+select
+  i_item_id,
+  avg(ss_quantity) agg1,
+  avg(ss_list_price) agg2,
+  avg(ss_coupon_amt) agg3,
+  avg(ss_sales_price) agg4
+from
+  store_sales,
+  customer_demographics,
+  date_dim,
+  item,
+  promotion
+where
+  ss_sold_date_sk = d_date_sk
+  and ss_item_sk = i_item_sk
+  and ss_cdemo_sk = cd_demo_sk
+  and ss_promo_sk = p_promo_sk
+  and cd_gender = 'M'
+  and cd_marital_status = 'S'
+  and cd_education_status = 'College'
+  and (p_channel_email = 'N'
+    or p_channel_event = 'N')
+  and d_year = 2000
+group by
+  i_item_id
+order by
+  i_item_id
+limit 100;
+---- RESULTS
+'AAAAAAAAAAACAAAA',17,13.150000,7.700000,1.970000
+'AAAAAAAAAAAEAAAA',99,123.440000,0.000000,44.430000
+'AAAAAAAAAABBAAAA',11,77.310000,0.000000,38.650000
+'AAAAAAAAAABEAAAA',35.5,18.900000,0.000000,4.850000
+'AAAAAAAAAACAAAAA',61,38.630000,90.245000,16.385000
+'AAAAAAAAAACCAAAA',10.5,83.465000,0.000000,30.020000
+'AAAAAAAAAADBAAAA',44,108.360000,0.000000,13.000000
+'AAAAAAAAAADCAAAA',54,59.290000,0.000000,34.980000
+'AAAAAAAAAADEAAAA',93,43.570000,0.000000,38.340000
+'AAAAAAAAAAEAAAAA',72,16.460000,0.000000,13.330000
+'AAAAAAAAAAEBAAAA',88,29.020000,0.000000,0.870000
+'AAAAAAAAAAEDAAAA',91,84.375000,0.000000,9.090000
+'AAAAAAAAAAFDAAAA',37,33.130000,0.000000,20.200000
+'AAAAAAAAAAGEAAAA',35,56.480000,881.450000,23.630000
+'AAAAAAAAAAHDAAAA',33,59.050000,0.000000,48.530000
+'AAAAAAAAAAICAAAA',68.5,108.730000,166.780000,69.220000
+'AAAAAAAAAAIDAAAA',76,97.190000,0.000000,43.730000
+'AAAAAAAAAAJCAAAA',30,47.550000,0.000000,30.430000
+'AAAAAAAAAAKBAAAA',59,55.080000,0.000000,17.070000
+'AAAAAAAAAAMBAAAA',74,10.390000,0.000000,8.620000
+'AAAAAAAAAAMCAAAA',86,24.100000,0.410000,0.480000
+'AAAAAAAAAANAAAAA',43,80.160000,0.000000,41.680000
+'AAAAAAAAAANBAAAA',28,112.270000,0.000000,57.250000
+'AAAAAAAAAAOAAAAA',46,12.630000,0.000000,4.670000
+'AAAAAAAAAAPBAAAA',66,39.590000,969.800000,18.600000
+'AAAAAAAAAAPCAAAA',90,68.280000,0.000000,47.790000
+'AAAAAAAAABAAAAAA',10.5,71.480000,0.000000,28.920000
+'AAAAAAAAABABAAAA',12.5,100.530000,2.230000,34.807500
+'AAAAAAAAABADAAAA',100,68.670000,0.000000,50.810000
+'AAAAAAAAABAEAAAA',49,15.790000,0.000000,11.840000
+'AAAAAAAAABBCAAAA',52,115.100000,0.000000,24.170000
+'AAAAAAAAABDEAAAA',92,168.960000,0.000000,23.650000
+'AAAAAAAAABEAAAAA',33.33333333333334,58.646667,99.473333,22.166667
+'AAAAAAAAABECAAAA',43,167.740000,0.000000,88.900000
+'AAAAAAAAABEDAAAA',74,129.100000,0.000000,108.440000
+'AAAAAAAAABFBAAAA',36,115.180000,0.000000,109.420000
+'AAAAAAAAABFCAAAA',51,121.980000,0.000000,17.070000
+'AAAAAAAAABFEAAAA',65,117.880000,0.000000,107.270000
+'AAAAAAAAABGBAAAA',52,71.545000,0.000000,30.285000
+'AAAAAAAAABGDAAAA',67.5,58.860000,0.000000,35.250000
+'AAAAAAAAABHAAAAA',71,39.385000,804.375000,8.380000
+'AAAAAAAAABHCAAAA',48,12.670000,52.160000,4.180000
+'AAAAAAAAABHDAAAA',55,17.780000,0.000000,5.515000
+'AAAAAAAAABJAAAAA',32,20.110000,0.000000,15.680000
+'AAAAAAAAABJBAAAA',21,72.335000,0.000000,11.370000
+'AAAAAAAAABJDAAAA',43,74.920000,0.000000,8.240000
+'AAAAAAAAABKAAAAA',67,103.070000,0.000000,34.010000
+'AAAAAAAAABKCAAAA',43,73.930000,0.000000,48.050000
+'AAAAAAAAABKDAAAA',84,102.950000,0.000000,42.200000
+'AAAAAAAAABMAAAAA',58,136.340000,0.000000,35.440000
+'AAAAAAAAABMDAAAA',80,3.060000,0.000000,1.890000
+'AAAAAAAAABNAAAAA',96,81.950000,0.000000,64.740000
+'AAAAAAAAABNCAAAA',42,88.830000,0.000000,20.650000
+'AAAAAAAAABOBAAAA',18,81.490000,0.000000,58.670000
+'AAAAAAAAABOCAAAA',31,73.876667,0.000000,59.940000
+'AAAAAAAAABPBAAAA',48.5,37.830000,183.780000,11.720000
+'AAAAAAAAACACAAAA',60,104.375000,351.565000,25.315000
+'AAAAAAAAACADAAAA',29,43.740000,0.000000,13.990000
+'AAAAAAAAACBBAAAA',44.5,87.510000,0.000000,36.140000
+'AAAAAAAAACBEAAAA',76,156.050000,0.000000,113.910000
+'AAAAAAAAACCDAAAA',26,35.573333,0.000000,13.013333
+'AAAAAAAAACCEAAAA',4,10.980000,0.000000,4.940000
+'AAAAAAAAACDAAAAA',16,87.870000,36.260000,75.560000
+'AAAAAAAAACDCAAAA',27,89.860000,0.000000,40.430000
+'AAAAAAAAACEBAAAA',42,94.580000,0.000000,51.260000
+'AAAAAAAAACFBAAAA',45,88.305000,0.000000,24.260000
+'AAAAAAAAACGAAAAA',47,10.460000,0.000000,5.640000
+'AAAAAAAAACGDAAAA',24,51.545000,0.000000,18.835000
+'AAAAAAAAACHBAAAA',44,103.270000,0.000000,65.060000
+'AAAAAAAAACHCAAAA',68.5,91.680000,0.000000,66.165000
+'AAAAAAAAACIAAAAA',7,25.420000,0.000000,8.640000
+'AAAAAAAAACIBAAAA',21,89.290000,915.010000,71.430000
+'AAAAAAAAACIDAAAA',43,56.280000,56.110000,4.500000
+'AAAAAAAAACLAAAAA',36,125.570000,0.000000,13.810000
+'AAAAAAAAACLDAAAA',61.33333333333334,114.206667,0.000000,59.123333
+'AAAAAAAAACMDAAAA',56,79.020000,0.000000,64.000000
+'AAAAAAAAACNCAAAA',63,54.200000,0.000000,29.260000
+'AAAAAAAAACOAAAAA',50,27.430000,229.215000,13.430000
+'AAAAAAAAACPAAAAA',32,147.620000,2480.320000,87.090000
+'AAAAAAAAACPCAAAA',80,12.600000,0.000000,0.370000
+'AAAAAAAAACPDAAAA',87,105.930000,0.000000,9.530000
+'AAAAAAAAADABAAAA',68.5,35.795000,0.000000,27.840000
+'AAAAAAAAADACAAAA',96,101.540000,0.000000,99.500000
+'AAAAAAAAADAEAAAA',53,74.640000,0.000000,7.630000
+'AAAAAAAAADBBAAAA',6,85.580000,234.140000,81.300000
+'AAAAAAAAADBDAAAA',47,39.330000,62.710000,12.090000
+'AAAAAAAAADBEAAAA',52,2.410000,0.000000,1.060000
+'AAAAAAAAADCAAAAA',91,92.170000,0.000000,67.280000
+'AAAAAAAAADCCAAAA',33,40.800000,0.000000,28.560000
+'AAAAAAAAADDBAAAA',45,18.630000,0.000000,17.690000
+'AAAAAAAAADDCAAAA',66,162.170000,1525.900000,37.290000
+'AAAAAAAAADDEAAAA',35,78.256667,0.000000,36.630000
+'AAAAAAAAADEBAAAA',59.5,110.380000,157.965000,16.165000
+'AAAAAAAAADEEAAAA',17,54.540000,0.000000,16.360000
+'AAAAAAAAADFAAAAA',44,133.510000,0.000000,25.360000
+'AAAAAAAAADGBAAAA',31,107.550000,919.825000,56.535000
+'AAAAAAAAADGCAAAA',78,119.610000,0.000000,74.150000
+'AAAAAAAAADGEAAAA',45.5,99.305000,0.000000,1.065000
+'AAAAAAAAADHAAAAA',86,81.090000,0.000000,37.300000
+'AAAAAAAAADHBAAAA',28,68.580000,223.790000,53.615000
+---- TYPES
+STRING, 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-q70a.test
----------------------------------------------------------------------
diff --git a/testdata/workloads/tpcds/queries/tpcds-decimal_v2-q70a.test b/testdata/workloads/tpcds/queries/tpcds-decimal_v2-q70a.test
new file mode 100644
index 0000000..a2a54a0
--- /dev/null
+++ b/testdata/workloads/tpcds/queries/tpcds-decimal_v2-q70a.test
@@ -0,0 +1,49 @@
+====
+---- QUERY: TPCDS-Q70A
+with results as
+( select
+    sum(ss_net_profit) as total_sum ,s_state ,s_county, 0 as gstate, 0 as g_county
+ from
+    store_sales
+  ,date_dim      d1
+  ,store
+ where
+    d1.d_month_seq between 1200 and 1200 + 11
+ and d1.d_date_sk = ss_sold_date_sk
+ and s_store_sk  = ss_store_sk
+ and s_state in
+            ( select s_state
+              from  (select s_state as s_state,
+                 rank() over ( partition by s_state order by sum(ss_net_profit) desc) as ranking
+                      from  store_sales, store, date_dim
+                      where d_month_seq between 1200 and 1200 + 11
+                 and d_date_sk = ss_sold_date_sk
+                 and s_store_sk  = ss_store_sk
+                      group by s_state
+                    ) tmp1
+              where ranking <= 5)
+  group by s_state,s_county) ,
+ results_rollup as
+(select total_sum ,s_state ,s_county, 0 as g_state, 0 as g_county, 0 as lochierarchy from results
+ union
+ select sum(total_sum) as total_sum,s_state, NULL as s_county, 0 as g_state, 1 as g_county, 1 as lochierarchy from results group by s_state
+ union
+ select sum(total_sum) as total_sum ,NULL as s_state ,NULL as s_county, 1 as g_state, 1 as g_county, 2 as lochierarchy from results)
+ select  total_sum ,s_state ,s_county, lochierarchy
+  ,rank() over (
+     partition by lochierarchy,
+     case when g_county = 0 then s_state end
+     order by total_sum desc) as rank_within_parent
+ from results_rollup
+ order by
+  lochierarchy desc
+  ,case when lochierarchy = 0 then s_state end
+  ,rank_within_parent
+ limit 100;
+---- RESULTS
+-440986113.22,'NULL','NULL',2,1
+-440986113.22,'TN','NULL',1,1
+-440986113.22,'TN','Williamson County',0,1
+---- TYPES
+DECIMAL, STRING, STRING, TINYINT, BIGINT
+====
\ No newline at end of file


Mime
View raw message