hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stak...@apache.org
Subject [15/41] hive git commit: HIVE-17543: Enable PerfCliDriver for HoS (Sahil Takiar, reviewed by Peter Vary) (addendum)
Date Sat, 30 Sep 2017 05:43:19 GMT
http://git-wip-us.apache.org/repos/asf/hive/blob/9244fdc7/ql/src/test/results/clientpositive/perf/tez/query33.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/tez/query33.q.out b/ql/src/test/results/clientpositive/perf/tez/query33.q.out
new file mode 100644
index 0000000..0810c28
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/tez/query33.q.out
@@ -0,0 +1,393 @@
+PREHOOK: query: explain
+with ss as (
+ select
+          i_manufact_id,sum(ss_ext_sales_price) total_sales
+ from
+ 	store_sales,
+ 	date_dim,
+         customer_address,
+         item
+ where
+         i_manufact_id in (select
+  i_manufact_id
+from
+ item
+where i_category in ('Books'))
+ and     ss_item_sk              = i_item_sk
+ and     ss_sold_date_sk         = d_date_sk
+ and     d_year                  = 1999
+ and     d_moy                   = 3
+ and     ss_addr_sk              = ca_address_sk
+ and     ca_gmt_offset           = -6 
+ group by i_manufact_id),
+ cs as (
+ select
+          i_manufact_id,sum(cs_ext_sales_price) total_sales
+ from
+ 	catalog_sales,
+ 	date_dim,
+         customer_address,
+         item
+ where
+         i_manufact_id               in (select
+  i_manufact_id
+from
+ item
+where i_category in ('Books'))
+ and     cs_item_sk              = i_item_sk
+ and     cs_sold_date_sk         = d_date_sk
+ and     d_year                  = 1999
+ and     d_moy                   = 3
+ and     cs_bill_addr_sk         = ca_address_sk
+ and     ca_gmt_offset           = -6 
+ group by i_manufact_id),
+ ws as (
+ select
+          i_manufact_id,sum(ws_ext_sales_price) total_sales
+ from
+ 	web_sales,
+ 	date_dim,
+         customer_address,
+         item
+ where
+         i_manufact_id               in (select
+  i_manufact_id
+from
+ item
+where i_category in ('Books'))
+ and     ws_item_sk              = i_item_sk
+ and     ws_sold_date_sk         = d_date_sk
+ and     d_year                  = 1999
+ and     d_moy                   = 3
+ and     ws_bill_addr_sk         = ca_address_sk
+ and     ca_gmt_offset           = -6
+ group by i_manufact_id)
+  select  i_manufact_id ,sum(total_sales) total_sales
+ from  (select * from ss 
+        union all
+        select * from cs 
+        union all
+        select * from ws) tmp1
+ group by i_manufact_id
+ order by total_sales
+limit 100
+PREHOOK: type: QUERY
+POSTHOOK: query: explain
+with ss as (
+ select
+          i_manufact_id,sum(ss_ext_sales_price) total_sales
+ from
+ 	store_sales,
+ 	date_dim,
+         customer_address,
+         item
+ where
+         i_manufact_id in (select
+  i_manufact_id
+from
+ item
+where i_category in ('Books'))
+ and     ss_item_sk              = i_item_sk
+ and     ss_sold_date_sk         = d_date_sk
+ and     d_year                  = 1999
+ and     d_moy                   = 3
+ and     ss_addr_sk              = ca_address_sk
+ and     ca_gmt_offset           = -6 
+ group by i_manufact_id),
+ cs as (
+ select
+          i_manufact_id,sum(cs_ext_sales_price) total_sales
+ from
+ 	catalog_sales,
+ 	date_dim,
+         customer_address,
+         item
+ where
+         i_manufact_id               in (select
+  i_manufact_id
+from
+ item
+where i_category in ('Books'))
+ and     cs_item_sk              = i_item_sk
+ and     cs_sold_date_sk         = d_date_sk
+ and     d_year                  = 1999
+ and     d_moy                   = 3
+ and     cs_bill_addr_sk         = ca_address_sk
+ and     ca_gmt_offset           = -6 
+ group by i_manufact_id),
+ ws as (
+ select
+          i_manufact_id,sum(ws_ext_sales_price) total_sales
+ from
+ 	web_sales,
+ 	date_dim,
+         customer_address,
+         item
+ where
+         i_manufact_id               in (select
+  i_manufact_id
+from
+ item
+where i_category in ('Books'))
+ and     ws_item_sk              = i_item_sk
+ and     ws_sold_date_sk         = d_date_sk
+ and     d_year                  = 1999
+ and     d_moy                   = 3
+ and     ws_bill_addr_sk         = ca_address_sk
+ and     ca_gmt_offset           = -6
+ group by i_manufact_id)
+  select  i_manufact_id ,sum(total_sales) total_sales
+ from  (select * from ss 
+        union all
+        select * from cs 
+        union all
+        select * from ws) tmp1
+ group by i_manufact_id
+ order by total_sales
+limit 100
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 10 <- Reducer 9 (SIMPLE_EDGE), Union 5 (CONTAINS)
+Reducer 11 <- Map 1 (SIMPLE_EDGE), Reducer 17 (ONE_TO_ONE_EDGE)
+Reducer 12 <- Reducer 11 (SIMPLE_EDGE), Reducer 25 (SIMPLE_EDGE)
+Reducer 13 <- Reducer 12 (SIMPLE_EDGE), Union 5 (CONTAINS)
+Reducer 15 <- Map 14 (SIMPLE_EDGE)
+Reducer 16 <- Map 14 (SIMPLE_EDGE)
+Reducer 17 <- Map 14 (SIMPLE_EDGE)
+Reducer 19 <- Map 18 (SIMPLE_EDGE), Map 21 (SIMPLE_EDGE)
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Reducer 15 (ONE_TO_ONE_EDGE)
+Reducer 20 <- Map 26 (SIMPLE_EDGE), Reducer 19 (SIMPLE_EDGE)
+Reducer 22 <- Map 21 (SIMPLE_EDGE), Map 27 (SIMPLE_EDGE)
+Reducer 23 <- Map 26 (SIMPLE_EDGE), Reducer 22 (SIMPLE_EDGE)
+Reducer 24 <- Map 21 (SIMPLE_EDGE), Map 28 (SIMPLE_EDGE)
+Reducer 25 <- Map 26 (SIMPLE_EDGE), Reducer 24 (SIMPLE_EDGE)
+Reducer 3 <- Reducer 2 (SIMPLE_EDGE), Reducer 20 (SIMPLE_EDGE)
+Reducer 4 <- Reducer 3 (SIMPLE_EDGE), Union 5 (CONTAINS)
+Reducer 6 <- Union 5 (SIMPLE_EDGE)
+Reducer 7 <- Reducer 6 (SIMPLE_EDGE)
+Reducer 8 <- Map 1 (SIMPLE_EDGE), Reducer 16 (ONE_TO_ONE_EDGE)
+Reducer 9 <- Reducer 23 (SIMPLE_EDGE), Reducer 8 (SIMPLE_EDGE)
+
+Stage-0
+  Fetch Operator
+    limit:100
+    Stage-1
+      Reducer 7
+      File Output Operator [FS_121]
+        Limit [LIM_120] (rows=100 width=108)
+          Number of rows:100
+          Select Operator [SEL_119] (rows=335408073 width=108)
+            Output:["_col0","_col1"]
+          <-Reducer 6 [SIMPLE_EDGE]
+            SHUFFLE [RS_118]
+              Group By Operator [GBY_116] (rows=335408073 width=108)
+                Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0
+              <-Union 5 [SIMPLE_EDGE]
+                <-Reducer 10 [CONTAINS]
+                  Reduce Output Operator [RS_115]
+                    PartitionCols:_col0
+                    Group By Operator [GBY_114] (rows=670816147 width=108)
+                      Output:["_col0","_col1"],aggregations:["sum(_col1)"],keys:_col0
+                      Group By Operator [GBY_72] (rows=191657247 width=135)
+                        Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0
+                      <-Reducer 9 [SIMPLE_EDGE]
+                        SHUFFLE [RS_71]
+                          PartitionCols:_col0
+                          Group By Operator [GBY_70] (rows=383314495 width=135)
+                            Output:["_col0","_col1"],aggregations:["sum(_col8)"],keys:_col1
+                            Merge Join Operator [MERGEJOIN_183] (rows=383314495 width=135)
+                              Conds:RS_66._col0=RS_67._col4(Inner),Output:["_col1","_col8"]
+                            <-Reducer 23 [SIMPLE_EDGE]
+                              SHUFFLE [RS_67]
+                                PartitionCols:_col4
+                                Select Operator [SEL_62] (rows=348467716 width=135)
+                                  Output:["_col4","_col5"]
+                                  Merge Join Operator [MERGEJOIN_178] (rows=348467716 width=135)
+                                    Conds:RS_59._col1=RS_60._col0(Inner),Output:["_col2","_col3"]
+                                  <-Map 26 [SIMPLE_EDGE]
+                                    SHUFFLE [RS_60]
+                                      PartitionCols:_col0
+                                      Select Operator [SEL_18] (rows=20000000 width=1014)
+                                        Output:["_col0"]
+                                        Filter Operator [FIL_162] (rows=20000000 width=1014)
+                                          predicate:((ca_gmt_offset = -6) and ca_address_sk is not null)
+                                          TableScan [TS_16] (rows=40000000 width=1014)
+                                            default@customer_address,customer_address,Tbl:COMPLETE,Col:NONE,Output:["ca_address_sk","ca_gmt_offset"]
+                                  <-Reducer 22 [SIMPLE_EDGE]
+                                    SHUFFLE [RS_59]
+                                      PartitionCols:_col1
+                                      Merge Join Operator [MERGEJOIN_177] (rows=316788826 width=135)
+                                        Conds:RS_56._col0=RS_57._col0(Inner),Output:["_col1","_col2","_col3"]
+                                      <-Map 21 [SIMPLE_EDGE]
+                                        SHUFFLE [RS_57]
+                                          PartitionCols:_col0
+                                          Select Operator [SEL_15] (rows=18262 width=1119)
+                                            Output:["_col0"]
+                                            Filter Operator [FIL_161] (rows=18262 width=1119)
+                                              predicate:((d_moy = 3) and (d_year = 1999) and d_date_sk is not null)
+                                              TableScan [TS_13] (rows=73049 width=1119)
+                                                default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_moy"]
+                                      <-Map 27 [SIMPLE_EDGE]
+                                        SHUFFLE [RS_56]
+                                          PartitionCols:_col0
+                                          Select Operator [SEL_49] (rows=287989836 width=135)
+                                            Output:["_col0","_col1","_col2","_col3"]
+                                            Filter Operator [FIL_165] (rows=287989836 width=135)
+                                              predicate:(cs_bill_addr_sk is not null and cs_item_sk is not null and cs_sold_date_sk is not null)
+                                              TableScan [TS_47] (rows=287989836 width=135)
+                                                default@catalog_sales,catalog_sales,Tbl:COMPLETE,Col:NONE,Output:["cs_sold_date_sk","cs_bill_addr_sk","cs_item_sk","cs_ext_sales_price"]
+                            <-Reducer 8 [SIMPLE_EDGE]
+                              SHUFFLE [RS_66]
+                                PartitionCols:_col0
+                                Merge Join Operator [MERGEJOIN_176] (rows=508200 width=1436)
+                                  Conds:RS_63._col1=RS_64._col0(Inner),Output:["_col0","_col1"]
+                                <-Map 1 [SIMPLE_EDGE]
+                                  SHUFFLE [RS_63]
+                                    PartitionCols:_col1
+                                    Select Operator [SEL_2] (rows=462000 width=1436)
+                                      Output:["_col0","_col1"]
+                                      Filter Operator [FIL_158] (rows=462000 width=1436)
+                                        predicate:(i_item_sk is not null and i_manufact_id is not null)
+                                        TableScan [TS_0] (rows=462000 width=1436)
+                                          default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk","i_manufact_id"]
+                                <-Reducer 16 [ONE_TO_ONE_EDGE]
+                                  FORWARD [RS_64]
+                                    PartitionCols:_col0
+                                    Group By Operator [GBY_45] (rows=115500 width=1436)
+                                      Output:["_col0"],keys:KEY._col0
+                                    <-Map 14 [SIMPLE_EDGE]
+                                      SHUFFLE [RS_44]
+                                        PartitionCols:_col0
+                                        Group By Operator [GBY_6] (rows=231000 width=1436)
+                                          Output:["_col0"],keys:i_manufact_id
+                                          Select Operator [SEL_5] (rows=231000 width=1436)
+                                            Output:["i_manufact_id"]
+                                            Filter Operator [FIL_159] (rows=231000 width=1436)
+                                              predicate:((i_category) IN ('Books') and i_manufact_id is not null)
+                                              TableScan [TS_3] (rows=462000 width=1436)
+                                                default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_category","i_manufact_id"]
+                <-Reducer 13 [CONTAINS]
+                  Reduce Output Operator [RS_115]
+                    PartitionCols:_col0
+                    Group By Operator [GBY_114] (rows=670816147 width=108)
+                      Output:["_col0","_col1"],aggregations:["sum(_col1)"],keys:_col0
+                      Group By Operator [GBY_110] (rows=95833781 width=135)
+                        Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0
+                      <-Reducer 12 [SIMPLE_EDGE]
+                        SHUFFLE [RS_109]
+                          PartitionCols:_col0
+                          Group By Operator [GBY_108] (rows=191667562 width=135)
+                            Output:["_col0","_col1"],aggregations:["sum(_col8)"],keys:_col1
+                            Merge Join Operator [MERGEJOIN_184] (rows=191667562 width=135)
+                              Conds:RS_104._col0=RS_105._col3(Inner),Output:["_col1","_col8"]
+                            <-Reducer 11 [SIMPLE_EDGE]
+                              SHUFFLE [RS_104]
+                                PartitionCols:_col0
+                                Merge Join Operator [MERGEJOIN_179] (rows=508200 width=1436)
+                                  Conds:RS_101._col1=RS_102._col0(Inner),Output:["_col0","_col1"]
+                                <-Map 1 [SIMPLE_EDGE]
+                                  SHUFFLE [RS_101]
+                                    PartitionCols:_col1
+                                     Please refer to the previous Select Operator [SEL_2]
+                                <-Reducer 17 [ONE_TO_ONE_EDGE]
+                                  FORWARD [RS_102]
+                                    PartitionCols:_col0
+                                    Group By Operator [GBY_83] (rows=115500 width=1436)
+                                      Output:["_col0"],keys:KEY._col0
+                                    <-Map 14 [SIMPLE_EDGE]
+                                      SHUFFLE [RS_82]
+                                        PartitionCols:_col0
+                                         Please refer to the previous Group By Operator [GBY_6]
+                            <-Reducer 25 [SIMPLE_EDGE]
+                              SHUFFLE [RS_105]
+                                PartitionCols:_col3
+                                Select Operator [SEL_100] (rows=174243235 width=135)
+                                  Output:["_col3","_col5"]
+                                  Merge Join Operator [MERGEJOIN_181] (rows=174243235 width=135)
+                                    Conds:RS_97._col2=RS_98._col0(Inner),Output:["_col1","_col3"]
+                                  <-Map 26 [SIMPLE_EDGE]
+                                    SHUFFLE [RS_98]
+                                      PartitionCols:_col0
+                                       Please refer to the previous Select Operator [SEL_18]
+                                  <-Reducer 24 [SIMPLE_EDGE]
+                                    SHUFFLE [RS_97]
+                                      PartitionCols:_col2
+                                      Merge Join Operator [MERGEJOIN_180] (rows=158402938 width=135)
+                                        Conds:RS_94._col0=RS_95._col0(Inner),Output:["_col1","_col2","_col3"]
+                                      <-Map 21 [SIMPLE_EDGE]
+                                        SHUFFLE [RS_95]
+                                          PartitionCols:_col0
+                                           Please refer to the previous Select Operator [SEL_15]
+                                      <-Map 28 [SIMPLE_EDGE]
+                                        SHUFFLE [RS_94]
+                                          PartitionCols:_col0
+                                          Select Operator [SEL_87] (rows=144002668 width=135)
+                                            Output:["_col0","_col1","_col2","_col3"]
+                                            Filter Operator [FIL_170] (rows=144002668 width=135)
+                                              predicate:(ws_bill_addr_sk is not null and ws_item_sk is not null and ws_sold_date_sk is not null)
+                                              TableScan [TS_85] (rows=144002668 width=135)
+                                                default@web_sales,web_sales,Tbl:COMPLETE,Col:NONE,Output:["ws_sold_date_sk","ws_item_sk","ws_bill_addr_sk","ws_ext_sales_price"]
+                <-Reducer 4 [CONTAINS]
+                  Reduce Output Operator [RS_115]
+                    PartitionCols:_col0
+                    Group By Operator [GBY_114] (rows=670816147 width=108)
+                      Output:["_col0","_col1"],aggregations:["sum(_col1)"],keys:_col0
+                      Group By Operator [GBY_35] (rows=383325119 width=88)
+                        Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0
+                      <-Reducer 3 [SIMPLE_EDGE]
+                        SHUFFLE [RS_34]
+                          PartitionCols:_col0
+                          Group By Operator [GBY_33] (rows=766650239 width=88)
+                            Output:["_col0","_col1"],aggregations:["sum(_col8)"],keys:_col1
+                            Merge Join Operator [MERGEJOIN_182] (rows=766650239 width=88)
+                              Conds:RS_29._col0=RS_30._col3(Inner),Output:["_col1","_col8"]
+                            <-Reducer 2 [SIMPLE_EDGE]
+                              SHUFFLE [RS_29]
+                                PartitionCols:_col0
+                                Merge Join Operator [MERGEJOIN_173] (rows=508200 width=1436)
+                                  Conds:RS_26._col1=RS_27._col0(Inner),Output:["_col0","_col1"]
+                                <-Map 1 [SIMPLE_EDGE]
+                                  SHUFFLE [RS_26]
+                                    PartitionCols:_col1
+                                     Please refer to the previous Select Operator [SEL_2]
+                                <-Reducer 15 [ONE_TO_ONE_EDGE]
+                                  FORWARD [RS_27]
+                                    PartitionCols:_col0
+                                    Group By Operator [GBY_8] (rows=115500 width=1436)
+                                      Output:["_col0"],keys:KEY._col0
+                                    <-Map 14 [SIMPLE_EDGE]
+                                      SHUFFLE [RS_7]
+                                        PartitionCols:_col0
+                                         Please refer to the previous Group By Operator [GBY_6]
+                            <-Reducer 20 [SIMPLE_EDGE]
+                              SHUFFLE [RS_30]
+                                PartitionCols:_col3
+                                Select Operator [SEL_25] (rows=696954748 width=88)
+                                  Output:["_col3","_col5"]
+                                  Merge Join Operator [MERGEJOIN_175] (rows=696954748 width=88)
+                                    Conds:RS_22._col2=RS_23._col0(Inner),Output:["_col1","_col3"]
+                                  <-Map 26 [SIMPLE_EDGE]
+                                    SHUFFLE [RS_23]
+                                      PartitionCols:_col0
+                                       Please refer to the previous Select Operator [SEL_18]
+                                  <-Reducer 19 [SIMPLE_EDGE]
+                                    SHUFFLE [RS_22]
+                                      PartitionCols:_col2
+                                      Merge Join Operator [MERGEJOIN_174] (rows=633595212 width=88)
+                                        Conds:RS_19._col0=RS_20._col0(Inner),Output:["_col1","_col2","_col3"]
+                                      <-Map 21 [SIMPLE_EDGE]
+                                        SHUFFLE [RS_20]
+                                          PartitionCols:_col0
+                                           Please refer to the previous Select Operator [SEL_15]
+                                      <-Map 18 [SIMPLE_EDGE]
+                                        SHUFFLE [RS_19]
+                                          PartitionCols:_col0
+                                          Select Operator [SEL_12] (rows=575995635 width=88)
+                                            Output:["_col0","_col1","_col2","_col3"]
+                                            Filter Operator [FIL_160] (rows=575995635 width=88)
+                                              predicate:(ss_addr_sk is not null and ss_item_sk is not null and ss_sold_date_sk is not null)
+                                              TableScan [TS_10] (rows=575995635 width=88)
+                                                default@store_sales,store_sales,Tbl:COMPLETE,Col:NONE,Output:["ss_sold_date_sk","ss_item_sk","ss_addr_sk","ss_ext_sales_price"]
+

http://git-wip-us.apache.org/repos/asf/hive/blob/9244fdc7/ql/src/test/results/clientpositive/perf/tez/query34.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/tez/query34.q.out b/ql/src/test/results/clientpositive/perf/tez/query34.q.out
new file mode 100644
index 0000000..c85b4d0
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/tez/query34.q.out
@@ -0,0 +1,156 @@
+PREHOOK: query: explain
+select c_last_name
+       ,c_first_name
+       ,c_salutation
+       ,c_preferred_cust_flag
+       ,ss_ticket_number
+       ,cnt from
+   (select ss_ticket_number
+          ,ss_customer_sk
+          ,count(*) cnt
+    from store_sales,date_dim,store,household_demographics
+    where store_sales.ss_sold_date_sk = date_dim.d_date_sk
+    and store_sales.ss_store_sk = store.s_store_sk  
+    and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk
+    and (date_dim.d_dom between 1 and 3 or date_dim.d_dom between 25 and 28)
+    and (household_demographics.hd_buy_potential = '>10000' or
+         household_demographics.hd_buy_potential = 'unknown')
+    and household_demographics.hd_vehicle_count > 0
+    and (case when household_demographics.hd_vehicle_count > 0 
+	then household_demographics.hd_dep_count/ household_demographics.hd_vehicle_count 
+	else null 
+	end)  > 1.2
+    and date_dim.d_year in (2000,2000+1,2000+2)
+    and store.s_county in ('Mobile County','Maverick County','Huron County','Kittitas County',
+                           'Fairfield County','Jackson County','Barrow County','Pennington County')
+    group by ss_ticket_number,ss_customer_sk) dn,customer
+    where ss_customer_sk = c_customer_sk
+      and cnt between 15 and 20
+    order by c_last_name,c_first_name,c_salutation,c_preferred_cust_flag desc
+PREHOOK: type: QUERY
+POSTHOOK: query: explain
+select c_last_name
+       ,c_first_name
+       ,c_salutation
+       ,c_preferred_cust_flag
+       ,ss_ticket_number
+       ,cnt from
+   (select ss_ticket_number
+          ,ss_customer_sk
+          ,count(*) cnt
+    from store_sales,date_dim,store,household_demographics
+    where store_sales.ss_sold_date_sk = date_dim.d_date_sk
+    and store_sales.ss_store_sk = store.s_store_sk  
+    and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk
+    and (date_dim.d_dom between 1 and 3 or date_dim.d_dom between 25 and 28)
+    and (household_demographics.hd_buy_potential = '>10000' or
+         household_demographics.hd_buy_potential = 'unknown')
+    and household_demographics.hd_vehicle_count > 0
+    and (case when household_demographics.hd_vehicle_count > 0 
+	then household_demographics.hd_dep_count/ household_demographics.hd_vehicle_count 
+	else null 
+	end)  > 1.2
+    and date_dim.d_year in (2000,2000+1,2000+2)
+    and store.s_county in ('Mobile County','Maverick County','Huron County','Kittitas County',
+                           'Fairfield County','Jackson County','Barrow County','Pennington County')
+    group by ss_ticket_number,ss_customer_sk) dn,customer
+    where ss_customer_sk = c_customer_sk
+      and cnt between 15 and 20
+    order by c_last_name,c_first_name,c_salutation,c_preferred_cust_flag desc
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Reducer 8 (SIMPLE_EDGE)
+Reducer 3 <- Reducer 2 (SIMPLE_EDGE)
+Reducer 5 <- Map 4 (SIMPLE_EDGE), Map 9 (SIMPLE_EDGE)
+Reducer 6 <- Map 10 (SIMPLE_EDGE), Reducer 5 (SIMPLE_EDGE)
+Reducer 7 <- Map 11 (SIMPLE_EDGE), Reducer 6 (SIMPLE_EDGE)
+Reducer 8 <- Reducer 7 (SIMPLE_EDGE)
+
+Stage-0
+  Fetch Operator
+    limit:-1
+    Stage-1
+      Reducer 3
+      File Output Operator [FS_37]
+        Select Operator [SEL_36] (rows=88000001 width=860)
+          Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
+        <-Reducer 2 [SIMPLE_EDGE]
+          SHUFFLE [RS_35]
+            Select Operator [SEL_34] (rows=88000001 width=860)
+              Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
+              Merge Join Operator [MERGEJOIN_60] (rows=88000001 width=860)
+                Conds:RS_31._col0=RS_32._col1(Inner),Output:["_col1","_col2","_col3","_col4","_col5","_col7"]
+              <-Map 1 [SIMPLE_EDGE]
+                SHUFFLE [RS_31]
+                  PartitionCols:_col0
+                  Select Operator [SEL_2] (rows=80000000 width=860)
+                    Output:["_col0","_col1","_col2","_col3","_col4"]
+                    Filter Operator [FIL_52] (rows=80000000 width=860)
+                      predicate:c_customer_sk is not null
+                      TableScan [TS_0] (rows=80000000 width=860)
+                        default@customer,customer,Tbl:COMPLETE,Col:NONE,Output:["c_customer_sk","c_salutation","c_first_name","c_last_name","c_preferred_cust_flag"]
+              <-Reducer 8 [SIMPLE_EDGE]
+                SHUFFLE [RS_32]
+                  PartitionCols:_col1
+                  Filter Operator [FIL_29] (rows=42591679 width=88)
+                    predicate:_col2 BETWEEN 15 AND 20
+                    Select Operator [SEL_28] (rows=383325119 width=88)
+                      Output:["_col0","_col1","_col2"]
+                      Group By Operator [GBY_27] (rows=383325119 width=88)
+                        Output:["_col0","_col1","_col2"],aggregations:["count(VALUE._col0)"],keys:KEY._col0, KEY._col1
+                      <-Reducer 7 [SIMPLE_EDGE]
+                        SHUFFLE [RS_26]
+                          PartitionCols:_col0, _col1
+                          Group By Operator [GBY_25] (rows=766650239 width=88)
+                            Output:["_col0","_col1","_col2"],aggregations:["count()"],keys:_col1, _col4
+                            Merge Join Operator [MERGEJOIN_59] (rows=766650239 width=88)
+                              Conds:RS_21._col3=RS_22._col0(Inner),Output:["_col1","_col4"]
+                            <-Map 11 [SIMPLE_EDGE]
+                              SHUFFLE [RS_22]
+                                PartitionCols:_col0
+                                Select Operator [SEL_14] (rows=852 width=1910)
+                                  Output:["_col0"]
+                                  Filter Operator [FIL_56] (rows=852 width=1910)
+                                    predicate:((s_county) IN ('Mobile County', 'Maverick County', 'Huron County', 'Kittitas County', 'Fairfield County', 'Jackson County', 'Barrow County', 'Pennington County') and s_store_sk is not null)
+                                    TableScan [TS_12] (rows=1704 width=1910)
+                                      default@store,store,Tbl:COMPLETE,Col:NONE,Output:["s_store_sk","s_county"]
+                            <-Reducer 6 [SIMPLE_EDGE]
+                              SHUFFLE [RS_21]
+                                PartitionCols:_col3
+                                Merge Join Operator [MERGEJOIN_58] (rows=696954748 width=88)
+                                  Conds:RS_18._col2=RS_19._col0(Inner),Output:["_col1","_col3","_col4"]
+                                <-Map 10 [SIMPLE_EDGE]
+                                  SHUFFLE [RS_19]
+                                    PartitionCols:_col0
+                                    Select Operator [SEL_11] (rows=1200 width=107)
+                                      Output:["_col0"]
+                                      Filter Operator [FIL_55] (rows=1200 width=107)
+                                        predicate:(((hd_buy_potential = '>10000') or (hd_buy_potential = 'unknown')) and (hd_vehicle_count > 0) and CASE WHEN ((hd_vehicle_count > 0)) THEN (((UDFToDouble(hd_dep_count) / UDFToDouble(hd_vehicle_count)) > 1.2)) ELSE (null) END and hd_demo_sk is not null)
+                                        TableScan [TS_9] (rows=7200 width=107)
+                                          default@household_demographics,household_demographics,Tbl:COMPLETE,Col:NONE,Output:["hd_demo_sk","hd_buy_potential","hd_dep_count","hd_vehicle_count"]
+                                <-Reducer 5 [SIMPLE_EDGE]
+                                  SHUFFLE [RS_18]
+                                    PartitionCols:_col2
+                                    Merge Join Operator [MERGEJOIN_57] (rows=633595212 width=88)
+                                      Conds:RS_15._col0=RS_16._col0(Inner),Output:["_col1","_col2","_col3","_col4"]
+                                    <-Map 4 [SIMPLE_EDGE]
+                                      SHUFFLE [RS_15]
+                                        PartitionCols:_col0
+                                        Select Operator [SEL_5] (rows=575995635 width=88)
+                                          Output:["_col0","_col1","_col2","_col3","_col4"]
+                                          Filter Operator [FIL_53] (rows=575995635 width=88)
+                                            predicate:(ss_customer_sk is not null and ss_hdemo_sk is not null and ss_sold_date_sk is not null and ss_store_sk is not null)
+                                            TableScan [TS_3] (rows=575995635 width=88)
+                                              default@store_sales,store_sales,Tbl:COMPLETE,Col:NONE,Output:["ss_sold_date_sk","ss_customer_sk","ss_hdemo_sk","ss_store_sk","ss_ticket_number"]
+                                    <-Map 9 [SIMPLE_EDGE]
+                                      SHUFFLE [RS_16]
+                                        PartitionCols:_col0
+                                        Select Operator [SEL_8] (rows=8116 width=1119)
+                                          Output:["_col0"]
+                                          Filter Operator [FIL_54] (rows=8116 width=1119)
+                                            predicate:((d_dom BETWEEN 1 AND 3 or d_dom BETWEEN 25 AND 28) and (d_year) IN (2000, 2001, 2002) and d_date_sk is not null)
+                                            TableScan [TS_6] (rows=73049 width=1119)
+                                              default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_dom"]
+

http://git-wip-us.apache.org/repos/asf/hive/blob/9244fdc7/ql/src/test/results/clientpositive/perf/tez/query35.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/tez/query35.q.out b/ql/src/test/results/clientpositive/perf/tez/query35.q.out
new file mode 100644
index 0000000..a72f578
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/tez/query35.q.out
@@ -0,0 +1,284 @@
+PREHOOK: query: explain
+select   
+  ca_state,
+  cd_gender,
+  cd_marital_status,
+  count(*) cnt1,
+  avg(cd_dep_count),
+  max(cd_dep_count),
+  sum(cd_dep_count),
+  cd_dep_employed_count,
+  count(*) cnt2,
+  avg(cd_dep_employed_count),
+  max(cd_dep_employed_count),
+  sum(cd_dep_employed_count),
+  cd_dep_college_count,
+  count(*) cnt3,
+  avg(cd_dep_college_count),
+  max(cd_dep_college_count),
+  sum(cd_dep_college_count)
+ from
+  customer c,customer_address ca,customer_demographics
+ where
+  c.c_current_addr_sk = ca.ca_address_sk and
+  cd_demo_sk = c.c_current_cdemo_sk and 
+  exists (select *
+          from store_sales,date_dim
+          where c.c_customer_sk = ss_customer_sk and
+                ss_sold_date_sk = d_date_sk and
+                d_year = 1999 and
+                d_qoy < 4) and
+   (exists (select *
+            from web_sales,date_dim
+            where c.c_customer_sk = ws_bill_customer_sk and
+                  ws_sold_date_sk = d_date_sk and
+                  d_year = 1999 and
+                  d_qoy < 4) or 
+    exists (select * 
+            from catalog_sales,date_dim
+            where c.c_customer_sk = cs_ship_customer_sk and
+                  cs_sold_date_sk = d_date_sk and
+                  d_year = 1999 and
+                  d_qoy < 4))
+ group by ca_state,
+          cd_gender,
+          cd_marital_status,
+          cd_dep_count,
+          cd_dep_employed_count,
+          cd_dep_college_count
+ order by ca_state,
+          cd_gender,
+          cd_marital_status,
+          cd_dep_count,
+          cd_dep_employed_count,
+          cd_dep_college_count
+ limit 100
+PREHOOK: type: QUERY
+POSTHOOK: query: explain
+select   
+  ca_state,
+  cd_gender,
+  cd_marital_status,
+  count(*) cnt1,
+  avg(cd_dep_count),
+  max(cd_dep_count),
+  sum(cd_dep_count),
+  cd_dep_employed_count,
+  count(*) cnt2,
+  avg(cd_dep_employed_count),
+  max(cd_dep_employed_count),
+  sum(cd_dep_employed_count),
+  cd_dep_college_count,
+  count(*) cnt3,
+  avg(cd_dep_college_count),
+  max(cd_dep_college_count),
+  sum(cd_dep_college_count)
+ from
+  customer c,customer_address ca,customer_demographics
+ where
+  c.c_current_addr_sk = ca.ca_address_sk and
+  cd_demo_sk = c.c_current_cdemo_sk and 
+  exists (select *
+          from store_sales,date_dim
+          where c.c_customer_sk = ss_customer_sk and
+                ss_sold_date_sk = d_date_sk and
+                d_year = 1999 and
+                d_qoy < 4) and
+   (exists (select *
+            from web_sales,date_dim
+            where c.c_customer_sk = ws_bill_customer_sk and
+                  ws_sold_date_sk = d_date_sk and
+                  d_year = 1999 and
+                  d_qoy < 4) or 
+    exists (select * 
+            from catalog_sales,date_dim
+            where c.c_customer_sk = cs_ship_customer_sk and
+                  cs_sold_date_sk = d_date_sk and
+                  d_year = 1999 and
+                  d_qoy < 4))
+ group by ca_state,
+          cd_gender,
+          cd_marital_status,
+          cd_dep_count,
+          cd_dep_employed_count,
+          cd_dep_college_count
+ order by ca_state,
+          cd_gender,
+          cd_marital_status,
+          cd_dep_count,
+          cd_dep_employed_count,
+          cd_dep_college_count
+ limit 100
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 11 <- Map 10 (SIMPLE_EDGE), Map 13 (SIMPLE_EDGE)
+Reducer 12 <- Reducer 11 (SIMPLE_EDGE)
+Reducer 14 <- Map 13 (SIMPLE_EDGE), Map 18 (SIMPLE_EDGE)
+Reducer 15 <- Reducer 14 (SIMPLE_EDGE)
+Reducer 16 <- Map 13 (SIMPLE_EDGE), Map 19 (SIMPLE_EDGE)
+Reducer 17 <- Reducer 16 (SIMPLE_EDGE)
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 8 (SIMPLE_EDGE)
+Reducer 3 <- Map 9 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 4 <- Reducer 12 (ONE_TO_ONE_EDGE), Reducer 15 (ONE_TO_ONE_EDGE), Reducer 3 (SIMPLE_EDGE)
+Reducer 5 <- Reducer 17 (ONE_TO_ONE_EDGE), Reducer 4 (SIMPLE_EDGE)
+Reducer 6 <- Reducer 5 (SIMPLE_EDGE)
+Reducer 7 <- Reducer 6 (SIMPLE_EDGE)
+
+Stage-0
+  Fetch Operator
+    limit:-1
+    Stage-1
+      Reducer 7
+      File Output Operator [FS_75]
+        Limit [LIM_73] (rows=100 width=88)
+          Number of rows:100
+          Select Operator [SEL_72] (rows=383325119 width=88)
+            Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15","_col16"]
+          <-Reducer 6 [SIMPLE_EDGE]
+            SHUFFLE [RS_71]
+              Select Operator [SEL_70] (rows=383325119 width=88)
+                Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col9","_col10","_col11","_col12","_col14","_col15","_col16","_col17"]
+                Group By Operator [GBY_69] (rows=383325119 width=88)
+                  Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15"],aggregations:["count(VALUE._col0)","avg(VALUE._col1)","max(VALUE._col2)","sum(VALUE._col3)","avg(VALUE._col4)","max(VALUE._col5)","sum(VALUE._col6)","avg(VALUE._col7)","max(VALUE._col8)","sum(VALUE._col9)"],keys:KEY._col0, KEY._col1, KEY._col2, KEY._col3, KEY._col4, KEY._col5
+                <-Reducer 5 [SIMPLE_EDGE]
+                  SHUFFLE [RS_68]
+                    PartitionCols:_col0, _col1, _col2, _col3, _col4, _col5
+                    Group By Operator [GBY_67] (rows=766650239 width=88)
+                      Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15"],aggregations:["count()","avg(_col8)","max(_col8)","sum(_col8)","avg(_col9)","max(_col9)","sum(_col9)","avg(_col10)","max(_col10)","sum(_col10)"],keys:_col4, _col6, _col7, _col8, _col9, _col10
+                      Select Operator [SEL_66] (rows=766650239 width=88)
+                        Output:["_col4","_col6","_col7","_col8","_col9","_col10"]
+                        Filter Operator [FIL_65] (rows=766650239 width=88)
+                          predicate:(_col13 is not null or _col15 is not null)
+                          Merge Join Operator [MERGEJOIN_113] (rows=766650239 width=88)
+                            Conds:RS_62._col0=RS_63._col0(Left Outer),Output:["_col4","_col6","_col7","_col8","_col9","_col10","_col13","_col15"]
+                          <-Reducer 17 [ONE_TO_ONE_EDGE]
+                            FORWARD [RS_63]
+                              PartitionCols:_col0
+                              Select Operator [SEL_61] (rows=158394413 width=135)
+                                Output:["_col0","_col1"]
+                                Group By Operator [GBY_60] (rows=158394413 width=135)
+                                  Output:["_col0"],keys:KEY._col0
+                                <-Reducer 16 [SIMPLE_EDGE]
+                                  SHUFFLE [RS_59]
+                                    PartitionCols:_col0
+                                    Group By Operator [GBY_58] (rows=316788826 width=135)
+                                      Output:["_col0"],keys:_col1
+                                      Merge Join Operator [MERGEJOIN_111] (rows=316788826 width=135)
+                                        Conds:RS_54._col0=RS_55._col0(Inner),Output:["_col1"]
+                                      <-Map 13 [SIMPLE_EDGE]
+                                        SHUFFLE [RS_55]
+                                          PartitionCols:_col0
+                                          Select Operator [SEL_14] (rows=12174 width=1119)
+                                            Output:["_col0"]
+                                            Filter Operator [FIL_102] (rows=12174 width=1119)
+                                              predicate:((d_qoy < 4) and (d_year = 1999) and d_date_sk is not null)
+                                              TableScan [TS_12] (rows=73049 width=1119)
+                                                default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_qoy"]
+                                      <-Map 19 [SIMPLE_EDGE]
+                                        SHUFFLE [RS_54]
+                                          PartitionCols:_col0
+                                          Select Operator [SEL_50] (rows=287989836 width=135)
+                                            Output:["_col0","_col1"]
+                                            Filter Operator [FIL_105] (rows=287989836 width=135)
+                                              predicate:(cs_ship_customer_sk is not null and cs_sold_date_sk is not null)
+                                              TableScan [TS_48] (rows=287989836 width=135)
+                                                default@catalog_sales,catalog_sales,Tbl:COMPLETE,Col:NONE,Output:["cs_sold_date_sk","cs_ship_customer_sk"]
+                          <-Reducer 4 [SIMPLE_EDGE]
+                            SHUFFLE [RS_62]
+                              PartitionCols:_col0
+                              Select Operator [SEL_47] (rows=696954748 width=88)
+                                Output:["_col0","_col4","_col6","_col7","_col8","_col9","_col10","_col13"]
+                                Merge Join Operator [MERGEJOIN_112] (rows=696954748 width=88)
+                                  Conds:RS_43._col0=RS_44._col0(Left Outer),RS_43._col0=RS_45._col0(Inner),Output:["_col0","_col4","_col6","_col7","_col8","_col9","_col10","_col12"]
+                                <-Reducer 12 [ONE_TO_ONE_EDGE]
+                                  FORWARD [RS_44]
+                                    PartitionCols:_col0
+                                    Select Operator [SEL_22] (rows=79201469 width=135)
+                                      Output:["_col0","_col1"]
+                                      Group By Operator [GBY_21] (rows=79201469 width=135)
+                                        Output:["_col0"],keys:KEY._col0
+                                      <-Reducer 11 [SIMPLE_EDGE]
+                                        SHUFFLE [RS_20]
+                                          PartitionCols:_col0
+                                          Group By Operator [GBY_19] (rows=158402938 width=135)
+                                            Output:["_col0"],keys:_col1
+                                            Merge Join Operator [MERGEJOIN_109] (rows=158402938 width=135)
+                                              Conds:RS_15._col0=RS_16._col0(Inner),Output:["_col1"]
+                                            <-Map 13 [SIMPLE_EDGE]
+                                              SHUFFLE [RS_16]
+                                                PartitionCols:_col0
+                                                 Please refer to the previous Select Operator [SEL_14]
+                                            <-Map 10 [SIMPLE_EDGE]
+                                              SHUFFLE [RS_15]
+                                                PartitionCols:_col0
+                                                Select Operator [SEL_11] (rows=144002668 width=135)
+                                                  Output:["_col0","_col1"]
+                                                  Filter Operator [FIL_101] (rows=144002668 width=135)
+                                                    predicate:(ws_bill_customer_sk is not null and ws_sold_date_sk is not null)
+                                                    TableScan [TS_9] (rows=144002668 width=135)
+                                                      default@web_sales,web_sales,Tbl:COMPLETE,Col:NONE,Output:["ws_sold_date_sk","ws_bill_customer_sk"]
+                                <-Reducer 15 [ONE_TO_ONE_EDGE]
+                                  FORWARD [RS_45]
+                                    PartitionCols:_col0
+                                    Group By Operator [GBY_35] (rows=316797606 width=88)
+                                      Output:["_col0"],keys:KEY._col0
+                                    <-Reducer 14 [SIMPLE_EDGE]
+                                      SHUFFLE [RS_34]
+                                        PartitionCols:_col0
+                                        Group By Operator [GBY_33] (rows=633595212 width=88)
+                                          Output:["_col0"],keys:_col1
+                                          Merge Join Operator [MERGEJOIN_110] (rows=633595212 width=88)
+                                            Conds:RS_29._col0=RS_30._col0(Inner),Output:["_col1"]
+                                          <-Map 13 [SIMPLE_EDGE]
+                                            SHUFFLE [RS_30]
+                                              PartitionCols:_col0
+                                               Please refer to the previous Select Operator [SEL_14]
+                                          <-Map 18 [SIMPLE_EDGE]
+                                            SHUFFLE [RS_29]
+                                              PartitionCols:_col0
+                                              Select Operator [SEL_25] (rows=575995635 width=88)
+                                                Output:["_col0","_col1"]
+                                                Filter Operator [FIL_103] (rows=575995635 width=88)
+                                                  predicate:(ss_customer_sk is not null and ss_sold_date_sk is not null)
+                                                  TableScan [TS_23] (rows=575995635 width=88)
+                                                    default@store_sales,store_sales,Tbl:COMPLETE,Col:NONE,Output:["ss_sold_date_sk","ss_customer_sk"]
+                                <-Reducer 3 [SIMPLE_EDGE]
+                                  SHUFFLE [RS_43]
+                                    PartitionCols:_col0
+                                    Merge Join Operator [MERGEJOIN_108] (rows=96800003 width=860)
+                                      Conds:RS_40._col1=RS_41._col0(Inner),Output:["_col0","_col4","_col6","_col7","_col8","_col9","_col10"]
+                                    <-Map 9 [SIMPLE_EDGE]
+                                      SHUFFLE [RS_41]
+                                        PartitionCols:_col0
+                                        Select Operator [SEL_8] (rows=1861800 width=385)
+                                          Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
+                                          Filter Operator [FIL_100] (rows=1861800 width=385)
+                                            predicate:cd_demo_sk is not null
+                                            TableScan [TS_6] (rows=1861800 width=385)
+                                              default@customer_demographics,customer_demographics,Tbl:COMPLETE,Col:NONE,Output:["cd_demo_sk","cd_gender","cd_marital_status","cd_dep_count","cd_dep_employed_count","cd_dep_college_count"]
+                                    <-Reducer 2 [SIMPLE_EDGE]
+                                      SHUFFLE [RS_40]
+                                        PartitionCols:_col1
+                                        Merge Join Operator [MERGEJOIN_107] (rows=88000001 width=860)
+                                          Conds:RS_37._col2=RS_38._col0(Inner),Output:["_col0","_col1","_col4"]
+                                        <-Map 1 [SIMPLE_EDGE]
+                                          SHUFFLE [RS_37]
+                                            PartitionCols:_col2
+                                            Select Operator [SEL_2] (rows=80000000 width=860)
+                                              Output:["_col0","_col1","_col2"]
+                                              Filter Operator [FIL_98] (rows=80000000 width=860)
+                                                predicate:(c_current_addr_sk is not null and c_current_cdemo_sk is not null)
+                                                TableScan [TS_0] (rows=80000000 width=860)
+                                                  default@customer,c,Tbl:COMPLETE,Col:NONE,Output:["c_customer_sk","c_current_cdemo_sk","c_current_addr_sk"]
+                                        <-Map 8 [SIMPLE_EDGE]
+                                          SHUFFLE [RS_38]
+                                            PartitionCols:_col0
+                                            Select Operator [SEL_5] (rows=40000000 width=1014)
+                                              Output:["_col0","_col1"]
+                                              Filter Operator [FIL_99] (rows=40000000 width=1014)
+                                                predicate:ca_address_sk is not null
+                                                TableScan [TS_3] (rows=40000000 width=1014)
+                                                  default@customer_address,ca,Tbl:COMPLETE,Col:NONE,Output:["ca_address_sk","ca_state"]
+

http://git-wip-us.apache.org/repos/asf/hive/blob/9244fdc7/ql/src/test/results/clientpositive/perf/tez/query36.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/tez/query36.q.out b/ql/src/test/results/clientpositive/perf/tez/query36.q.out
new file mode 100644
index 0000000..dee62b5
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/tez/query36.q.out
@@ -0,0 +1,149 @@
+PREHOOK: query: explain
+select  
+    sum(ss_net_profit)/sum(ss_ext_sales_price) as gross_margin
+   ,i_category
+   ,i_class
+   ,grouping(i_category)+grouping(i_class) as lochierarchy
+   ,rank() over (
+ 	partition by grouping(i_category)+grouping(i_class),
+ 	case when grouping(i_class) = 0 then i_category end 
+ 	order by sum(ss_net_profit)/sum(ss_ext_sales_price) asc) as rank_within_parent
+ from
+    store_sales
+   ,date_dim       d1
+   ,item
+   ,store
+ where
+    d1.d_year = 1999 
+ and d1.d_date_sk = ss_sold_date_sk
+ and i_item_sk  = ss_item_sk 
+ and s_store_sk  = ss_store_sk
+ and s_state in ('SD','FL','MI','LA',
+                 'MO','SC','AL','GA')
+ group by rollup(i_category,i_class)
+ order by
+   lochierarchy desc
+  ,case when lochierarchy = 0 then i_category end
+  ,rank_within_parent
+  limit 100
+PREHOOK: type: QUERY
+POSTHOOK: query: explain
+select  
+    sum(ss_net_profit)/sum(ss_ext_sales_price) as gross_margin
+   ,i_category
+   ,i_class
+   ,grouping(i_category)+grouping(i_class) as lochierarchy
+   ,rank() over (
+ 	partition by grouping(i_category)+grouping(i_class),
+ 	case when grouping(i_class) = 0 then i_category end 
+ 	order by sum(ss_net_profit)/sum(ss_ext_sales_price) asc) as rank_within_parent
+ from
+    store_sales
+   ,date_dim       d1
+   ,item
+   ,store
+ where
+    d1.d_year = 1999 
+ and d1.d_date_sk = ss_sold_date_sk
+ and i_item_sk  = ss_item_sk 
+ and s_store_sk  = ss_store_sk
+ and s_state in ('SD','FL','MI','LA',
+                 'MO','SC','AL','GA')
+ group by rollup(i_category,i_class)
+ order by
+   lochierarchy desc
+  ,case when lochierarchy = 0 then i_category end
+  ,rank_within_parent
+  limit 100
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 8 (SIMPLE_EDGE)
+Reducer 3 <- Map 9 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 4 <- Map 10 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
+Reducer 5 <- Reducer 4 (SIMPLE_EDGE)
+Reducer 6 <- Reducer 5 (SIMPLE_EDGE)
+Reducer 7 <- Reducer 6 (SIMPLE_EDGE)
+
+Stage-0
+  Fetch Operator
+    limit:-1
+    Stage-1
+      Reducer 7
+      File Output Operator [FS_36]
+        Limit [LIM_34] (rows=100 width=88)
+          Number of rows:100
+          Select Operator [SEL_33] (rows=1149975358 width=88)
+            Output:["_col0","_col1","_col2","_col3","_col4"]
+          <-Reducer 6 [SIMPLE_EDGE]
+            SHUFFLE [RS_32]
+              Select Operator [SEL_30] (rows=1149975358 width=88)
+                Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
+                PTF Operator [PTF_29] (rows=1149975358 width=88)
+                  Function definitions:[{},{"name:":"windowingtablefunction","order by:":"(_col4 / _col5) ASC NULLS FIRST","partition by:":"(grouping(_col6, 1) + grouping(_col6, 0)), CASE WHEN ((grouping(_col6, 0) = 0)) THEN (_col0) ELSE (null) END"}]
+                  Select Operator [SEL_28] (rows=1149975358 width=88)
+                    Output:["_col0","_col1","_col4","_col5","_col6"]
+                  <-Reducer 5 [SIMPLE_EDGE]
+                    SHUFFLE [RS_27]
+                      PartitionCols:(grouping(_col6, 1) + grouping(_col6, 0)), CASE WHEN ((grouping(_col6, 0) = 0)) THEN (_col0) ELSE (null) END
+                      Select Operator [SEL_26] (rows=1149975358 width=88)
+                        Output:["_col0","_col1","_col4","_col5","_col6"]
+                        Group By Operator [GBY_25] (rows=1149975358 width=88)
+                          Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"],keys:KEY._col0, KEY._col1, KEY._col2
+                        <-Reducer 4 [SIMPLE_EDGE]
+                          SHUFFLE [RS_24]
+                            PartitionCols:_col0, _col1, _col2
+                            Group By Operator [GBY_23] (rows=2299950717 width=88)
+                              Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["sum(_col2)","sum(_col3)"],keys:_col0, _col1, 0
+                              Select Operator [SEL_21] (rows=766650239 width=88)
+                                Output:["_col0","_col1","_col2","_col3"]
+                                Merge Join Operator [MERGEJOIN_52] (rows=766650239 width=88)
+                                  Conds:RS_18._col1=RS_19._col0(Inner),Output:["_col3","_col4","_col10","_col11"]
+                                <-Map 10 [SIMPLE_EDGE]
+                                  SHUFFLE [RS_19]
+                                    PartitionCols:_col0
+                                    Select Operator [SEL_11] (rows=462000 width=1436)
+                                      Output:["_col0","_col1","_col2"]
+                                      Filter Operator [FIL_49] (rows=462000 width=1436)
+                                        predicate:i_item_sk is not null
+                                        TableScan [TS_9] (rows=462000 width=1436)
+                                          default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk","i_class","i_category"]
+                                <-Reducer 3 [SIMPLE_EDGE]
+                                  SHUFFLE [RS_18]
+                                    PartitionCols:_col1
+                                    Merge Join Operator [MERGEJOIN_51] (rows=696954748 width=88)
+                                      Conds:RS_15._col2=RS_16._col0(Inner),Output:["_col1","_col3","_col4"]
+                                    <-Map 9 [SIMPLE_EDGE]
+                                      SHUFFLE [RS_16]
+                                        PartitionCols:_col0
+                                        Select Operator [SEL_8] (rows=852 width=1910)
+                                          Output:["_col0"]
+                                          Filter Operator [FIL_48] (rows=852 width=1910)
+                                            predicate:((s_state) IN ('SD', 'FL', 'MI', 'LA', 'MO', 'SC', 'AL', 'GA') and s_store_sk is not null)
+                                            TableScan [TS_6] (rows=1704 width=1910)
+                                              default@store,store,Tbl:COMPLETE,Col:NONE,Output:["s_store_sk","s_state"]
+                                    <-Reducer 2 [SIMPLE_EDGE]
+                                      SHUFFLE [RS_15]
+                                        PartitionCols:_col2
+                                        Merge Join Operator [MERGEJOIN_50] (rows=633595212 width=88)
+                                          Conds:RS_12._col0=RS_13._col0(Inner),Output:["_col1","_col2","_col3","_col4"]
+                                        <-Map 1 [SIMPLE_EDGE]
+                                          SHUFFLE [RS_12]
+                                            PartitionCols:_col0
+                                            Select Operator [SEL_2] (rows=575995635 width=88)
+                                              Output:["_col0","_col1","_col2","_col3","_col4"]
+                                              Filter Operator [FIL_46] (rows=575995635 width=88)
+                                                predicate:(ss_item_sk is not null and ss_sold_date_sk is not null and ss_store_sk is not null)
+                                                TableScan [TS_0] (rows=575995635 width=88)
+                                                  default@store_sales,store_sales,Tbl:COMPLETE,Col:NONE,Output:["ss_sold_date_sk","ss_item_sk","ss_store_sk","ss_ext_sales_price","ss_net_profit"]
+                                        <-Map 8 [SIMPLE_EDGE]
+                                          SHUFFLE [RS_13]
+                                            PartitionCols:_col0
+                                            Select Operator [SEL_5] (rows=36524 width=1119)
+                                              Output:["_col0"]
+                                              Filter Operator [FIL_47] (rows=36524 width=1119)
+                                                predicate:((d_year = 1999) and d_date_sk is not null)
+                                                TableScan [TS_3] (rows=73049 width=1119)
+                                                  default@date_dim,d1,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year"]
+

http://git-wip-us.apache.org/repos/asf/hive/blob/9244fdc7/ql/src/test/results/clientpositive/perf/tez/query37.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/tez/query37.q.out b/ql/src/test/results/clientpositive/perf/tez/query37.q.out
new file mode 100644
index 0000000..d5af964
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/tez/query37.q.out
@@ -0,0 +1,103 @@
+PREHOOK: query: explain
+select  i_item_id
+       ,i_item_desc
+       ,i_current_price
+ from item, inventory, date_dim, catalog_sales
+ where i_current_price between 22 and 22 + 30
+ and inv_item_sk = i_item_sk
+ and d_date_sk=inv_date_sk
+ and d_date between cast('2001-06-02' as date) and (cast('2001-06-02' as date) +  60 days)
+ and i_manufact_id in (678,964,918,849)
+ and inv_quantity_on_hand between 100 and 500
+ and cs_item_sk = i_item_sk
+ group by i_item_id,i_item_desc,i_current_price
+ order by i_item_id
+ limit 100
+PREHOOK: type: QUERY
+POSTHOOK: query: explain
+select  i_item_id
+       ,i_item_desc
+       ,i_current_price
+ from item, inventory, date_dim, catalog_sales
+ where i_current_price between 22 and 22 + 30
+ and inv_item_sk = i_item_sk
+ and d_date_sk=inv_date_sk
+ and d_date between cast('2001-06-02' as date) and (cast('2001-06-02' as date) +  60 days)
+ and i_manufact_id in (678,964,918,849)
+ and inv_quantity_on_hand between 100 and 500
+ and cs_item_sk = i_item_sk
+ group by i_item_id,i_item_desc,i_current_price
+ order by i_item_id
+ limit 100
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 5 (SIMPLE_EDGE), Reducer 7 (SIMPLE_EDGE)
+Reducer 3 <- Reducer 2 (SIMPLE_EDGE)
+Reducer 4 <- Reducer 3 (SIMPLE_EDGE)
+Reducer 7 <- Map 6 (SIMPLE_EDGE), Map 8 (SIMPLE_EDGE)
+
+Stage-0
+  Fetch Operator
+    limit:100
+    Stage-1
+      Reducer 4
+      File Output Operator [FS_28]
+        Limit [LIM_27] (rows=100 width=135)
+          Number of rows:100
+          Select Operator [SEL_26] (rows=316788826 width=135)
+            Output:["_col0","_col1","_col2"]
+          <-Reducer 3 [SIMPLE_EDGE]
+            SHUFFLE [RS_25]
+              Group By Operator [GBY_23] (rows=316788826 width=135)
+                Output:["_col0","_col1","_col2"],keys:KEY._col0, KEY._col1, KEY._col2
+              <-Reducer 2 [SIMPLE_EDGE]
+                SHUFFLE [RS_22]
+                  PartitionCols:_col0, _col1, _col2
+                  Group By Operator [GBY_21] (rows=633577652 width=135)
+                    Output:["_col0","_col1","_col2"],keys:_col2, _col3, _col4
+                    Merge Join Operator [MERGEJOIN_44] (rows=633577652 width=135)
+                      Conds:RS_16._col0=RS_17._col0(Inner),RS_17._col0=RS_18._col1(Inner),Output:["_col2","_col3","_col4"]
+                    <-Map 1 [SIMPLE_EDGE]
+                      SHUFFLE [RS_16]
+                        PartitionCols:_col0
+                        Select Operator [SEL_2] (rows=287989836 width=135)
+                          Output:["_col0"]
+                          Filter Operator [FIL_39] (rows=287989836 width=135)
+                            predicate:cs_item_sk is not null
+                            TableScan [TS_0] (rows=287989836 width=135)
+                              default@catalog_sales,catalog_sales,Tbl:COMPLETE,Col:NONE,Output:["cs_item_sk"]
+                    <-Map 5 [SIMPLE_EDGE]
+                      SHUFFLE [RS_17]
+                        PartitionCols:_col0
+                        Select Operator [SEL_5] (rows=25666 width=1436)
+                          Output:["_col0","_col1","_col2","_col3"]
+                          Filter Operator [FIL_40] (rows=25666 width=1436)
+                            predicate:((i_manufact_id) IN (678, 964, 918, 849) and i_current_price BETWEEN 22 AND 52 and i_item_sk is not null)
+                            TableScan [TS_3] (rows=462000 width=1436)
+                              default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk","i_item_id","i_item_desc","i_current_price","i_manufact_id"]
+                    <-Reducer 7 [SIMPLE_EDGE]
+                      SHUFFLE [RS_18]
+                        PartitionCols:_col1
+                        Merge Join Operator [MERGEJOIN_43] (rows=4593600 width=15)
+                          Conds:RS_12._col0=RS_13._col0(Inner),Output:["_col1"]
+                        <-Map 6 [SIMPLE_EDGE]
+                          SHUFFLE [RS_12]
+                            PartitionCols:_col0
+                            Select Operator [SEL_8] (rows=4176000 width=15)
+                              Output:["_col0","_col1"]
+                              Filter Operator [FIL_41] (rows=4176000 width=15)
+                                predicate:(inv_date_sk is not null and inv_item_sk is not null and inv_quantity_on_hand BETWEEN 100 AND 500)
+                                TableScan [TS_6] (rows=37584000 width=15)
+                                  default@inventory,inventory,Tbl:COMPLETE,Col:NONE,Output:["inv_date_sk","inv_item_sk","inv_quantity_on_hand"]
+                        <-Map 8 [SIMPLE_EDGE]
+                          SHUFFLE [RS_13]
+                            PartitionCols:_col0
+                            Select Operator [SEL_11] (rows=8116 width=1119)
+                              Output:["_col0"]
+                              Filter Operator [FIL_42] (rows=8116 width=1119)
+                                predicate:(CAST( d_date AS TIMESTAMP) BETWEEN 2001-06-02 00:00:00.0 AND 2001-08-01 00:00:00.0 and d_date_sk is not null)
+                                TableScan [TS_9] (rows=73049 width=1119)
+                                  default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_date"]
+

http://git-wip-us.apache.org/repos/asf/hive/blob/9244fdc7/ql/src/test/results/clientpositive/perf/tez/query38.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/tez/query38.q.out b/ql/src/test/results/clientpositive/perf/tez/query38.q.out
new file mode 100644
index 0000000..199bed7
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/tez/query38.q.out
@@ -0,0 +1,212 @@
+PREHOOK: query: explain
+select  count(*) from (
+    select distinct c_last_name, c_first_name, d_date
+    from store_sales, date_dim, customer
+          where store_sales.ss_sold_date_sk = date_dim.d_date_sk
+      and store_sales.ss_customer_sk = customer.c_customer_sk
+      and d_month_seq between 1212 and 1212 + 11
+  intersect
+    select distinct c_last_name, c_first_name, d_date
+    from catalog_sales, date_dim, customer
+          where catalog_sales.cs_sold_date_sk = date_dim.d_date_sk
+      and catalog_sales.cs_bill_customer_sk = customer.c_customer_sk
+      and d_month_seq between 1212 and 1212 + 11
+  intersect
+    select distinct c_last_name, c_first_name, d_date
+    from web_sales, date_dim, customer
+          where web_sales.ws_sold_date_sk = date_dim.d_date_sk
+      and web_sales.ws_bill_customer_sk = customer.c_customer_sk
+      and d_month_seq between 1212 and 1212 + 11
+) hot_cust
+limit 100
+PREHOOK: type: QUERY
+POSTHOOK: query: explain
+select  count(*) from (
+    select distinct c_last_name, c_first_name, d_date
+    from store_sales, date_dim, customer
+          where store_sales.ss_sold_date_sk = date_dim.d_date_sk
+      and store_sales.ss_customer_sk = customer.c_customer_sk
+      and d_month_seq between 1212 and 1212 + 11
+  intersect
+    select distinct c_last_name, c_first_name, d_date
+    from catalog_sales, date_dim, customer
+          where catalog_sales.cs_sold_date_sk = date_dim.d_date_sk
+      and catalog_sales.cs_bill_customer_sk = customer.c_customer_sk
+      and d_month_seq between 1212 and 1212 + 11
+  intersect
+    select distinct c_last_name, c_first_name, d_date
+    from web_sales, date_dim, customer
+          where web_sales.ws_sold_date_sk = date_dim.d_date_sk
+      and web_sales.ws_bill_customer_sk = customer.c_customer_sk
+      and d_month_seq between 1212 and 1212 + 11
+) hot_cust
+limit 100
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 10 <- Map 15 (SIMPLE_EDGE), Reducer 9 (SIMPLE_EDGE)
+Reducer 11 <- Reducer 10 (SIMPLE_EDGE), Union 5 (CONTAINS)
+Reducer 12 <- Map 17 (SIMPLE_EDGE), Map 8 (SIMPLE_EDGE)
+Reducer 13 <- Map 15 (SIMPLE_EDGE), Reducer 12 (SIMPLE_EDGE)
+Reducer 14 <- Reducer 13 (SIMPLE_EDGE), Union 5 (CONTAINS)
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 8 (SIMPLE_EDGE)
+Reducer 3 <- Map 15 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 4 <- Reducer 3 (SIMPLE_EDGE), Union 5 (CONTAINS)
+Reducer 6 <- Union 5 (SIMPLE_EDGE)
+Reducer 7 <- Reducer 6 (CUSTOM_SIMPLE_EDGE)
+Reducer 9 <- Map 16 (SIMPLE_EDGE), Map 8 (SIMPLE_EDGE)
+
+Stage-0
+  Fetch Operator
+    limit:100
+    Stage-1
+      Reducer 7
+      File Output Operator [FS_89]
+        Limit [LIM_88] (rows=1 width=16)
+          Number of rows:100
+          Group By Operator [GBY_86] (rows=1 width=16)
+            Output:["_col0"],aggregations:["count(VALUE._col0)"]
+          <-Reducer 6 [CUSTOM_SIMPLE_EDGE]
+            PARTITION_ONLY_SHUFFLE [RS_85]
+              Group By Operator [GBY_84] (rows=1 width=16)
+                Output:["_col0"],aggregations:["count()"]
+                Select Operator [SEL_82] (rows=1 width=108)
+                  Filter Operator [FIL_81] (rows=1 width=108)
+                    predicate:(_col3 = 3)
+                    Select Operator [SEL_114] (rows=152458212 width=108)
+                      Output:["_col3"]
+                      Group By Operator [GBY_80] (rows=152458212 width=108)
+                        Output:["_col0","_col1","_col2","_col3"],aggregations:["count(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2
+                      <-Union 5 [SIMPLE_EDGE]
+                        <-Reducer 11 [CONTAINS]
+                          Reduce Output Operator [RS_79]
+                            PartitionCols:_col0, _col1, _col2
+                            Group By Operator [GBY_78] (rows=304916424 width=108)
+                              Output:["_col0","_col1","_col2","_col3"],aggregations:["count(_col3)"],keys:_col0, _col1, _col2
+                              Group By Operator [GBY_48] (rows=87116929 width=135)
+                                Output:["_col0","_col1","_col2","_col3"],aggregations:["count()"],keys:_col1, _col0, _col2
+                                Select Operator [SEL_44] (rows=174233858 width=135)
+                                  Output:["_col0","_col1","_col2"]
+                                  Group By Operator [GBY_43] (rows=174233858 width=135)
+                                    Output:["_col0","_col1","_col2"],keys:KEY._col0, KEY._col1, KEY._col2
+                                  <-Reducer 10 [SIMPLE_EDGE]
+                                    SHUFFLE [RS_42]
+                                      PartitionCols:_col0, _col1, _col2
+                                      Group By Operator [GBY_41] (rows=348467716 width=135)
+                                        Output:["_col0","_col1","_col2"],keys:_col7, _col6, _col3
+                                        Merge Join Operator [MERGEJOIN_118] (rows=348467716 width=135)
+                                          Conds:RS_37._col1=RS_38._col0(Inner),Output:["_col3","_col6","_col7"]
+                                        <-Map 15 [SIMPLE_EDGE]
+                                          SHUFFLE [RS_38]
+                                            PartitionCols:_col0
+                                            Select Operator [SEL_8] (rows=80000000 width=860)
+                                              Output:["_col0","_col1","_col2"]
+                                              Filter Operator [FIL_107] (rows=80000000 width=860)
+                                                predicate:c_customer_sk is not null
+                                                TableScan [TS_6] (rows=80000000 width=860)
+                                                  default@customer,customer,Tbl:COMPLETE,Col:NONE,Output:["c_customer_sk","c_first_name","c_last_name"]
+                                        <-Reducer 9 [SIMPLE_EDGE]
+                                          SHUFFLE [RS_37]
+                                            PartitionCols:_col1
+                                            Merge Join Operator [MERGEJOIN_117] (rows=316788826 width=135)
+                                              Conds:RS_34._col0=RS_35._col0(Inner),Output:["_col1","_col3"]
+                                            <-Map 8 [SIMPLE_EDGE]
+                                              SHUFFLE [RS_35]
+                                                PartitionCols:_col0
+                                                Select Operator [SEL_5] (rows=8116 width=1119)
+                                                  Output:["_col0","_col1"]
+                                                  Filter Operator [FIL_106] (rows=8116 width=1119)
+                                                    predicate:(d_date_sk is not null and d_month_seq BETWEEN 1212 AND 1223)
+                                                    TableScan [TS_3] (rows=73049 width=1119)
+                                                      default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_date","d_month_seq"]
+                                            <-Map 16 [SIMPLE_EDGE]
+                                              SHUFFLE [RS_34]
+                                                PartitionCols:_col0
+                                                Select Operator [SEL_27] (rows=287989836 width=135)
+                                                  Output:["_col0","_col1"]
+                                                  Filter Operator [FIL_108] (rows=287989836 width=135)
+                                                    predicate:(cs_bill_customer_sk is not null and cs_sold_date_sk is not null)
+                                                    TableScan [TS_25] (rows=287989836 width=135)
+                                                      default@catalog_sales,catalog_sales,Tbl:COMPLETE,Col:NONE,Output:["cs_sold_date_sk","cs_bill_customer_sk"]
+                        <-Reducer 14 [CONTAINS]
+                          Reduce Output Operator [RS_79]
+                            PartitionCols:_col0, _col1, _col2
+                            Group By Operator [GBY_78] (rows=304916424 width=108)
+                              Output:["_col0","_col1","_col2","_col3"],aggregations:["count(_col3)"],keys:_col0, _col1, _col2
+                              Group By Operator [GBY_74] (rows=43560808 width=135)
+                                Output:["_col0","_col1","_col2","_col3"],aggregations:["count()"],keys:_col1, _col0, _col2
+                                Select Operator [SEL_70] (rows=87121617 width=135)
+                                  Output:["_col0","_col1","_col2"]
+                                  Group By Operator [GBY_69] (rows=87121617 width=135)
+                                    Output:["_col0","_col1","_col2"],keys:KEY._col0, KEY._col1, KEY._col2
+                                  <-Reducer 13 [SIMPLE_EDGE]
+                                    SHUFFLE [RS_68]
+                                      PartitionCols:_col0, _col1, _col2
+                                      Group By Operator [GBY_67] (rows=174243235 width=135)
+                                        Output:["_col0","_col1","_col2"],keys:_col7, _col6, _col3
+                                        Merge Join Operator [MERGEJOIN_120] (rows=174243235 width=135)
+                                          Conds:RS_63._col1=RS_64._col0(Inner),Output:["_col3","_col6","_col7"]
+                                        <-Map 15 [SIMPLE_EDGE]
+                                          SHUFFLE [RS_64]
+                                            PartitionCols:_col0
+                                             Please refer to the previous Select Operator [SEL_8]
+                                        <-Reducer 12 [SIMPLE_EDGE]
+                                          SHUFFLE [RS_63]
+                                            PartitionCols:_col1
+                                            Merge Join Operator [MERGEJOIN_119] (rows=158402938 width=135)
+                                              Conds:RS_60._col0=RS_61._col0(Inner),Output:["_col1","_col3"]
+                                            <-Map 8 [SIMPLE_EDGE]
+                                              SHUFFLE [RS_61]
+                                                PartitionCols:_col0
+                                                 Please refer to the previous Select Operator [SEL_5]
+                                            <-Map 17 [SIMPLE_EDGE]
+                                              SHUFFLE [RS_60]
+                                                PartitionCols:_col0
+                                                Select Operator [SEL_53] (rows=144002668 width=135)
+                                                  Output:["_col0","_col1"]
+                                                  Filter Operator [FIL_111] (rows=144002668 width=135)
+                                                    predicate:(ws_bill_customer_sk is not null and ws_sold_date_sk is not null)
+                                                    TableScan [TS_51] (rows=144002668 width=135)
+                                                      default@web_sales,web_sales,Tbl:COMPLETE,Col:NONE,Output:["ws_sold_date_sk","ws_bill_customer_sk"]
+                        <-Reducer 4 [CONTAINS]
+                          Reduce Output Operator [RS_79]
+                            PartitionCols:_col0, _col1, _col2
+                            Group By Operator [GBY_78] (rows=304916424 width=108)
+                              Output:["_col0","_col1","_col2","_col3"],aggregations:["count(_col3)"],keys:_col0, _col1, _col2
+                              Group By Operator [GBY_23] (rows=174238687 width=88)
+                                Output:["_col0","_col1","_col2","_col3"],aggregations:["count()"],keys:_col1, _col0, _col2
+                                Select Operator [SEL_19] (rows=348477374 width=88)
+                                  Output:["_col0","_col1","_col2"]
+                                  Group By Operator [GBY_18] (rows=348477374 width=88)
+                                    Output:["_col0","_col1","_col2"],keys:KEY._col0, KEY._col1, KEY._col2
+                                  <-Reducer 3 [SIMPLE_EDGE]
+                                    SHUFFLE [RS_17]
+                                      PartitionCols:_col0, _col1, _col2
+                                      Group By Operator [GBY_16] (rows=696954748 width=88)
+                                        Output:["_col0","_col1","_col2"],keys:_col7, _col6, _col3
+                                        Merge Join Operator [MERGEJOIN_116] (rows=696954748 width=88)
+                                          Conds:RS_12._col1=RS_13._col0(Inner),Output:["_col3","_col6","_col7"]
+                                        <-Map 15 [SIMPLE_EDGE]
+                                          SHUFFLE [RS_13]
+                                            PartitionCols:_col0
+                                             Please refer to the previous Select Operator [SEL_8]
+                                        <-Reducer 2 [SIMPLE_EDGE]
+                                          SHUFFLE [RS_12]
+                                            PartitionCols:_col1
+                                            Merge Join Operator [MERGEJOIN_115] (rows=633595212 width=88)
+                                              Conds:RS_9._col0=RS_10._col0(Inner),Output:["_col1","_col3"]
+                                            <-Map 8 [SIMPLE_EDGE]
+                                              SHUFFLE [RS_10]
+                                                PartitionCols:_col0
+                                                 Please refer to the previous Select Operator [SEL_5]
+                                            <-Map 1 [SIMPLE_EDGE]
+                                              SHUFFLE [RS_9]
+                                                PartitionCols:_col0
+                                                Select Operator [SEL_2] (rows=575995635 width=88)
+                                                  Output:["_col0","_col1"]
+                                                  Filter Operator [FIL_105] (rows=575995635 width=88)
+                                                    predicate:(ss_customer_sk is not null and ss_sold_date_sk is not null)
+                                                    TableScan [TS_0] (rows=575995635 width=88)
+                                                      default@store_sales,store_sales,Tbl:COMPLETE,Col:NONE,Output:["ss_sold_date_sk","ss_customer_sk"]
+


Mime
View raw message