You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by jc...@apache.org on 2018/02/17 02:03:03 UTC

[2/4] hive git commit: HIVE-18680: FieldTrimmer missing opportunity with SortLimit operators (Jesus Camacho Rodriguez, reviewed by Ashutosh Chauhan)

http://git-wip-us.apache.org/repos/asf/hive/blob/65e3f5f1/ql/src/test/results/clientpositive/perf/tez/query4.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/tez/query4.q.out b/ql/src/test/results/clientpositive/perf/tez/query4.q.out
index c56fae0..241c063 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query4.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query4.q.out
@@ -253,14 +253,14 @@ Stage-0
               Select Operator [SEL_138] (rows=212958399 width=88)
                 Output:["_col0"]
                 Filter Operator [FIL_136] (rows=212958399 width=88)
-                  predicate:(((_col7 / _col31) > (_col23 / _col15)) and ((_col7 / _col31) > (_col39 / _col47)))
+                  predicate:(((_col1 / _col8) > (_col10 / _col12)) and ((_col1 / _col8) > (_col6 / _col3)))
                   Merge Join Operator [MERGEJOIN_296] (rows=1916625598 width=88)
-                    Conds:RS_129._col0=RS_130._col0(Inner),RS_130._col0=RS_131._col0(Inner),RS_130._col0=RS_132._col0(Inner),RS_130._col0=RS_133._col0(Inner),RS_130._col0=RS_134._col0(Inner),Output:["_col7","_col15","_col19","_col23","_col31","_col39","_col47"]
+                    Conds:RS_129._col0=RS_130._col0(Inner),RS_130._col0=RS_131._col0(Inner),RS_130._col0=RS_132._col0(Inner),RS_130._col0=RS_133._col0(Inner),RS_130._col0=RS_134._col0(Inner),Output:["_col1","_col3","_col5","_col6","_col8","_col10","_col12"]
                   <-Reducer 13 [SIMPLE_EDGE]
                     SHUFFLE [RS_131]
                       PartitionCols:_col0
                       Select Operator [SEL_63] (rows=348477374 width=88)
-                        Output:["_col0","_col3","_col7"]
+                        Output:["_col0","_col1","_col2"]
                         Group By Operator [GBY_62] (rows=348477374 width=88)
                           Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2, KEY._col3, KEY._col4, KEY._col5, KEY._col6
                         <-Reducer 12 [SIMPLE_EDGE]
@@ -307,47 +307,49 @@ Stage-0
                   <-Reducer 16 [SIMPLE_EDGE]
                     SHUFFLE [RS_130]
                       PartitionCols:_col0
-                      Filter Operator [FIL_41] (rows=116159124 width=88)
-                        predicate:(_col7 > 0)
-                        Select Operator [SEL_283] (rows=348477374 width=88)
-                          Output:["_col0","_col7"]
-                          Group By Operator [GBY_40] (rows=348477374 width=88)
-                            Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2, KEY._col3, KEY._col4, KEY._col5, KEY._col6
-                          <-Reducer 15 [SIMPLE_EDGE]
-                            SHUFFLE [RS_39]
-                              PartitionCols:_col0, _col1, _col2, _col3, _col4, _col5, _col6
-                              Group By Operator [GBY_38] (rows=696954748 width=88)
-                                Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"],aggregations:["sum(_col7)"],keys:_col0, _col1, _col2, _col3, _col4, _col5, _col6
-                                Select Operator [SEL_36] (rows=696954748 width=88)
-                                  Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
-                                  Merge Join Operator [MERGEJOIN_287] (rows=696954748 width=88)
-                                    Conds:RS_33._col1=RS_34._col0(Inner),Output:["_col2","_col3","_col4","_col5","_col9","_col10","_col11","_col12","_col13","_col14","_col15"]
-                                  <-Map 25 [SIMPLE_EDGE]
-                                    SHUFFLE [RS_34]
-                                      PartitionCols:_col0
-                                       Please refer to the previous Select Operator [SEL_94]
-                                  <-Reducer 14 [SIMPLE_EDGE]
-                                    SHUFFLE [RS_33]
-                                      PartitionCols:_col1
-                                      Merge Join Operator [MERGEJOIN_286] (rows=633595212 width=88)
-                                        Conds:RS_30._col0=RS_31._col0(Inner),Output:["_col1","_col2","_col3","_col4","_col5"]
-                                      <-Map 24 [SIMPLE_EDGE]
-                                        SHUFFLE [RS_31]
-                                          PartitionCols:_col0
-                                          Select Operator [SEL_26] (rows=36524 width=1119)
-                                            Output:["_col0"]
-                                            Filter Operator [FIL_267] (rows=36524 width=1119)
-                                              predicate:((d_year = 2001) and d_date_sk is not null)
-                                               Please refer to the previous TableScan [TS_89]
-                                      <-Map 10 [SIMPLE_EDGE]
-                                        SHUFFLE [RS_30]
-                                          PartitionCols:_col0
-                                           Please refer to the previous Select Operator [SEL_45]
+                      Select Operator [SEL_42] (rows=116159124 width=88)
+                        Output:["_col0","_col1"]
+                        Filter Operator [FIL_41] (rows=116159124 width=88)
+                          predicate:(_col7 > 0)
+                          Select Operator [SEL_283] (rows=348477374 width=88)
+                            Output:["_col0","_col7"]
+                            Group By Operator [GBY_40] (rows=348477374 width=88)
+                              Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2, KEY._col3, KEY._col4, KEY._col5, KEY._col6
+                            <-Reducer 15 [SIMPLE_EDGE]
+                              SHUFFLE [RS_39]
+                                PartitionCols:_col0, _col1, _col2, _col3, _col4, _col5, _col6
+                                Group By Operator [GBY_38] (rows=696954748 width=88)
+                                  Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"],aggregations:["sum(_col7)"],keys:_col0, _col1, _col2, _col3, _col4, _col5, _col6
+                                  Select Operator [SEL_36] (rows=696954748 width=88)
+                                    Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
+                                    Merge Join Operator [MERGEJOIN_287] (rows=696954748 width=88)
+                                      Conds:RS_33._col1=RS_34._col0(Inner),Output:["_col2","_col3","_col4","_col5","_col9","_col10","_col11","_col12","_col13","_col14","_col15"]
+                                    <-Map 25 [SIMPLE_EDGE]
+                                      SHUFFLE [RS_34]
+                                        PartitionCols:_col0
+                                         Please refer to the previous Select Operator [SEL_94]
+                                    <-Reducer 14 [SIMPLE_EDGE]
+                                      SHUFFLE [RS_33]
+                                        PartitionCols:_col1
+                                        Merge Join Operator [MERGEJOIN_286] (rows=633595212 width=88)
+                                          Conds:RS_30._col0=RS_31._col0(Inner),Output:["_col1","_col2","_col3","_col4","_col5"]
+                                        <-Map 24 [SIMPLE_EDGE]
+                                          SHUFFLE [RS_31]
+                                            PartitionCols:_col0
+                                            Select Operator [SEL_26] (rows=36524 width=1119)
+                                              Output:["_col0"]
+                                              Filter Operator [FIL_267] (rows=36524 width=1119)
+                                                predicate:((d_year = 2001) and d_date_sk is not null)
+                                                 Please refer to the previous TableScan [TS_89]
+                                        <-Map 10 [SIMPLE_EDGE]
+                                          SHUFFLE [RS_30]
+                                            PartitionCols:_col0
+                                             Please refer to the previous Select Operator [SEL_45]
                   <-Reducer 20 [SIMPLE_EDGE]
                     SHUFFLE [RS_133]
                       PartitionCols:_col0
                       Select Operator [SEL_106] (rows=87121617 width=135)
-                        Output:["_col0","_col7"]
+                        Output:["_col0","_col1"]
                         Group By Operator [GBY_105] (rows=87121617 width=135)
                           Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2, KEY._col3, KEY._col4, KEY._col5, KEY._col6
                         <-Reducer 19 [SIMPLE_EDGE]
@@ -384,47 +386,49 @@ Stage-0
                   <-Reducer 23 [SIMPLE_EDGE]
                     SHUFFLE [RS_134]
                       PartitionCols:_col0
-                      Filter Operator [FIL_127] (rows=29040539 width=135)
-                        predicate:(_col7 > 0)
-                        Select Operator [SEL_282] (rows=87121617 width=135)
-                          Output:["_col0","_col7"]
-                          Group By Operator [GBY_126] (rows=87121617 width=135)
-                            Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2, KEY._col3, KEY._col4, KEY._col5, KEY._col6
-                          <-Reducer 22 [SIMPLE_EDGE]
-                            SHUFFLE [RS_125]
-                              PartitionCols:_col0, _col1, _col2, _col3, _col4, _col5, _col6
-                              Group By Operator [GBY_124] (rows=174243235 width=135)
-                                Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"],aggregations:["sum(_col7)"],keys:_col0, _col1, _col2, _col3, _col4, _col5, _col6
-                                Select Operator [SEL_122] (rows=174243235 width=135)
-                                  Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
-                                  Merge Join Operator [MERGEJOIN_295] (rows=174243235 width=135)
-                                    Conds:RS_119._col1=RS_120._col0(Inner),Output:["_col2","_col3","_col4","_col5","_col9","_col10","_col11","_col12","_col13","_col14","_col15"]
-                                  <-Map 25 [SIMPLE_EDGE]
-                                    SHUFFLE [RS_120]
-                                      PartitionCols:_col0
-                                       Please refer to the previous Select Operator [SEL_94]
-                                  <-Reducer 21 [SIMPLE_EDGE]
-                                    SHUFFLE [RS_119]
-                                      PartitionCols:_col1
-                                      Merge Join Operator [MERGEJOIN_294] (rows=158402938 width=135)
-                                        Conds:RS_116._col0=RS_117._col0(Inner),Output:["_col1","_col2","_col3","_col4","_col5"]
-                                      <-Map 24 [SIMPLE_EDGE]
-                                        SHUFFLE [RS_117]
-                                          PartitionCols:_col0
-                                          Select Operator [SEL_112] (rows=36524 width=1119)
-                                            Output:["_col0"]
-                                            Filter Operator [FIL_279] (rows=36524 width=1119)
-                                              predicate:((d_year = 2001) and d_date_sk is not null)
-                                               Please refer to the previous TableScan [TS_89]
-                                      <-Map 17 [SIMPLE_EDGE]
-                                        SHUFFLE [RS_116]
-                                          PartitionCols:_col0
-                                           Please refer to the previous Select Operator [SEL_88]
+                      Select Operator [SEL_128] (rows=29040539 width=135)
+                        Output:["_col0","_col1"]
+                        Filter Operator [FIL_127] (rows=29040539 width=135)
+                          predicate:(_col7 > 0)
+                          Select Operator [SEL_282] (rows=87121617 width=135)
+                            Output:["_col0","_col7"]
+                            Group By Operator [GBY_126] (rows=87121617 width=135)
+                              Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2, KEY._col3, KEY._col4, KEY._col5, KEY._col6
+                            <-Reducer 22 [SIMPLE_EDGE]
+                              SHUFFLE [RS_125]
+                                PartitionCols:_col0, _col1, _col2, _col3, _col4, _col5, _col6
+                                Group By Operator [GBY_124] (rows=174243235 width=135)
+                                  Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"],aggregations:["sum(_col7)"],keys:_col0, _col1, _col2, _col3, _col4, _col5, _col6
+                                  Select Operator [SEL_122] (rows=174243235 width=135)
+                                    Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
+                                    Merge Join Operator [MERGEJOIN_295] (rows=174243235 width=135)
+                                      Conds:RS_119._col1=RS_120._col0(Inner),Output:["_col2","_col3","_col4","_col5","_col9","_col10","_col11","_col12","_col13","_col14","_col15"]
+                                    <-Map 25 [SIMPLE_EDGE]
+                                      SHUFFLE [RS_120]
+                                        PartitionCols:_col0
+                                         Please refer to the previous Select Operator [SEL_94]
+                                    <-Reducer 21 [SIMPLE_EDGE]
+                                      SHUFFLE [RS_119]
+                                        PartitionCols:_col1
+                                        Merge Join Operator [MERGEJOIN_294] (rows=158402938 width=135)
+                                          Conds:RS_116._col0=RS_117._col0(Inner),Output:["_col1","_col2","_col3","_col4","_col5"]
+                                        <-Map 24 [SIMPLE_EDGE]
+                                          SHUFFLE [RS_117]
+                                            PartitionCols:_col0
+                                            Select Operator [SEL_112] (rows=36524 width=1119)
+                                              Output:["_col0"]
+                                              Filter Operator [FIL_279] (rows=36524 width=1119)
+                                                predicate:((d_year = 2001) and d_date_sk is not null)
+                                                 Please refer to the previous TableScan [TS_89]
+                                        <-Map 17 [SIMPLE_EDGE]
+                                          SHUFFLE [RS_116]
+                                            PartitionCols:_col0
+                                             Please refer to the previous Select Operator [SEL_88]
                   <-Reducer 4 [SIMPLE_EDGE]
                     SHUFFLE [RS_129]
                       PartitionCols:_col0
                       Select Operator [SEL_20] (rows=174233858 width=135)
-                        Output:["_col0","_col7"]
+                        Output:["_col0","_col1"]
                         Group By Operator [GBY_19] (rows=174233858 width=135)
                           Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2, KEY._col3, KEY._col4, KEY._col5, KEY._col6
                         <-Reducer 3 [SIMPLE_EDGE]
@@ -461,40 +465,42 @@ Stage-0
                   <-Reducer 9 [SIMPLE_EDGE]
                     SHUFFLE [RS_132]
                       PartitionCols:_col0
-                      Filter Operator [FIL_84] (rows=58077952 width=135)
-                        predicate:(_col7 > 0)
-                        Select Operator [SEL_281] (rows=174233858 width=135)
-                          Output:["_col0","_col7"]
-                          Group By Operator [GBY_83] (rows=174233858 width=135)
-                            Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2, KEY._col3, KEY._col4, KEY._col5, KEY._col6
-                          <-Reducer 8 [SIMPLE_EDGE]
-                            SHUFFLE [RS_82]
-                              PartitionCols:_col0, _col1, _col2, _col3, _col4, _col5, _col6
-                              Group By Operator [GBY_81] (rows=348467716 width=135)
-                                Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"],aggregations:["sum(_col7)"],keys:_col0, _col1, _col2, _col3, _col4, _col5, _col6
-                                Select Operator [SEL_79] (rows=348467716 width=135)
-                                  Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
-                                  Merge Join Operator [MERGEJOIN_291] (rows=348467716 width=135)
-                                    Conds:RS_76._col1=RS_77._col0(Inner),Output:["_col2","_col3","_col4","_col5","_col9","_col10","_col11","_col12","_col13","_col14","_col15"]
-                                  <-Map 25 [SIMPLE_EDGE]
-                                    SHUFFLE [RS_77]
-                                      PartitionCols:_col0
-                                       Please refer to the previous Select Operator [SEL_94]
-                                  <-Reducer 7 [SIMPLE_EDGE]
-                                    SHUFFLE [RS_76]
-                                      PartitionCols:_col1
-                                      Merge Join Operator [MERGEJOIN_290] (rows=316788826 width=135)
-                                        Conds:RS_73._col0=RS_74._col0(Inner),Output:["_col1","_col2","_col3","_col4","_col5"]
-                                      <-Map 24 [SIMPLE_EDGE]
-                                        SHUFFLE [RS_74]
-                                          PartitionCols:_col0
-                                          Select Operator [SEL_69] (rows=36524 width=1119)
-                                            Output:["_col0"]
-                                            Filter Operator [FIL_273] (rows=36524 width=1119)
-                                              predicate:((d_year = 2001) and d_date_sk is not null)
-                                               Please refer to the previous TableScan [TS_89]
-                                      <-Map 1 [SIMPLE_EDGE]
-                                        SHUFFLE [RS_73]
-                                          PartitionCols:_col0
-                                           Please refer to the previous Select Operator [SEL_2]
+                      Select Operator [SEL_85] (rows=58077952 width=135)
+                        Output:["_col0","_col1"]
+                        Filter Operator [FIL_84] (rows=58077952 width=135)
+                          predicate:(_col7 > 0)
+                          Select Operator [SEL_281] (rows=174233858 width=135)
+                            Output:["_col0","_col7"]
+                            Group By Operator [GBY_83] (rows=174233858 width=135)
+                              Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2, KEY._col3, KEY._col4, KEY._col5, KEY._col6
+                            <-Reducer 8 [SIMPLE_EDGE]
+                              SHUFFLE [RS_82]
+                                PartitionCols:_col0, _col1, _col2, _col3, _col4, _col5, _col6
+                                Group By Operator [GBY_81] (rows=348467716 width=135)
+                                  Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"],aggregations:["sum(_col7)"],keys:_col0, _col1, _col2, _col3, _col4, _col5, _col6
+                                  Select Operator [SEL_79] (rows=348467716 width=135)
+                                    Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
+                                    Merge Join Operator [MERGEJOIN_291] (rows=348467716 width=135)
+                                      Conds:RS_76._col1=RS_77._col0(Inner),Output:["_col2","_col3","_col4","_col5","_col9","_col10","_col11","_col12","_col13","_col14","_col15"]
+                                    <-Map 25 [SIMPLE_EDGE]
+                                      SHUFFLE [RS_77]
+                                        PartitionCols:_col0
+                                         Please refer to the previous Select Operator [SEL_94]
+                                    <-Reducer 7 [SIMPLE_EDGE]
+                                      SHUFFLE [RS_76]
+                                        PartitionCols:_col1
+                                        Merge Join Operator [MERGEJOIN_290] (rows=316788826 width=135)
+                                          Conds:RS_73._col0=RS_74._col0(Inner),Output:["_col1","_col2","_col3","_col4","_col5"]
+                                        <-Map 24 [SIMPLE_EDGE]
+                                          SHUFFLE [RS_74]
+                                            PartitionCols:_col0
+                                            Select Operator [SEL_69] (rows=36524 width=1119)
+                                              Output:["_col0"]
+                                              Filter Operator [FIL_273] (rows=36524 width=1119)
+                                                predicate:((d_year = 2001) and d_date_sk is not null)
+                                                 Please refer to the previous TableScan [TS_89]
+                                        <-Map 1 [SIMPLE_EDGE]
+                                          SHUFFLE [RS_73]
+                                            PartitionCols:_col0
+                                             Please refer to the previous Select Operator [SEL_2]
 

http://git-wip-us.apache.org/repos/asf/hive/blob/65e3f5f1/ql/src/test/results/clientpositive/perf/tez/query42.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/tez/query42.q.out b/ql/src/test/results/clientpositive/perf/tez/query42.q.out
index f31a62d..0e07c4d 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query42.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query42.q.out
@@ -50,59 +50,57 @@ Reducer 5 <- Reducer 4 (SIMPLE_EDGE)
 
 Stage-0
   Fetch Operator
-    limit:-1
+    limit:100
     Stage-1
       Reducer 5
       File Output Operator [FS_24]
-        Select Operator [SEL_23] (rows=100 width=88)
-          Output:["_col0","_col1","_col2","_col3"]
-          Limit [LIM_22] (rows=100 width=88)
-            Number of rows:100
-            Select Operator [SEL_21] (rows=348477374 width=88)
-              Output:["_col0","_col1","_col2"]
-            <-Reducer 4 [SIMPLE_EDGE]
-              SHUFFLE [RS_20]
-                Select Operator [SEL_19] (rows=348477374 width=88)
-                  Output:["_col0","_col1","_col3"]
-                  Group By Operator [GBY_18] (rows=348477374 width=88)
-                    Output:["_col0","_col1","_col2"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1
-                  <-Reducer 3 [SIMPLE_EDGE]
-                    SHUFFLE [RS_17]
-                      PartitionCols:_col0, _col1
-                      Group By Operator [GBY_16] (rows=696954748 width=88)
-                        Output:["_col0","_col1","_col2"],aggregations:["sum(_col2)"],keys:_col7, _col8
-                        Merge Join Operator [MERGEJOIN_34] (rows=696954748 width=88)
-                          Conds:RS_12._col1=RS_13._col0(Inner),Output:["_col2","_col7","_col8"]
-                        <-Map 7 [SIMPLE_EDGE]
-                          SHUFFLE [RS_13]
-                            PartitionCols:_col0
-                            Select Operator [SEL_8] (rows=231000 width=1436)
-                              Output:["_col0","_col1","_col2"]
-                              Filter Operator [FIL_32] (rows=231000 width=1436)
-                                predicate:((i_manager_id = 1) and i_item_sk is not null)
-                                TableScan [TS_6] (rows=462000 width=1436)
-                                  default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk","i_category_id","i_category","i_manager_id"]
-                        <-Reducer 2 [SIMPLE_EDGE]
-                          SHUFFLE [RS_12]
-                            PartitionCols:_col1
-                            Merge Join Operator [MERGEJOIN_33] (rows=633595212 width=88)
-                              Conds:RS_9._col0=RS_10._col0(Inner),Output:["_col1","_col2"]
-                            <-Map 1 [SIMPLE_EDGE]
-                              SHUFFLE [RS_9]
-                                PartitionCols:_col0
-                                Select Operator [SEL_2] (rows=575995635 width=88)
-                                  Output:["_col0","_col1","_col2"]
-                                  Filter Operator [FIL_30] (rows=575995635 width=88)
-                                    predicate:(ss_item_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_item_sk","ss_ext_sales_price"]
-                            <-Map 6 [SIMPLE_EDGE]
-                              SHUFFLE [RS_10]
-                                PartitionCols:_col0
-                                Select Operator [SEL_5] (rows=18262 width=1119)
-                                  Output:["_col0"]
-                                  Filter Operator [FIL_31] (rows=18262 width=1119)
-                                    predicate:((d_moy = 12) and (d_year = 1998) and d_date_sk is not null)
-                                    TableScan [TS_3] (rows=73049 width=1119)
-                                      default@date_dim,dt,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_moy"]
+        Limit [LIM_23] (rows=100 width=88)
+          Number of rows:100
+          Select Operator [SEL_21] (rows=348477374 width=88)
+            Output:["_col0","_col1","_col2","_col3"]
+          <-Reducer 4 [SIMPLE_EDGE]
+            SHUFFLE [RS_20]
+              Select Operator [SEL_19] (rows=348477374 width=88)
+                Output:["_col0","_col1","_col3"]
+                Group By Operator [GBY_18] (rows=348477374 width=88)
+                  Output:["_col0","_col1","_col2"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1
+                <-Reducer 3 [SIMPLE_EDGE]
+                  SHUFFLE [RS_17]
+                    PartitionCols:_col0, _col1
+                    Group By Operator [GBY_16] (rows=696954748 width=88)
+                      Output:["_col0","_col1","_col2"],aggregations:["sum(_col2)"],keys:_col7, _col8
+                      Merge Join Operator [MERGEJOIN_34] (rows=696954748 width=88)
+                        Conds:RS_12._col1=RS_13._col0(Inner),Output:["_col2","_col7","_col8"]
+                      <-Map 7 [SIMPLE_EDGE]
+                        SHUFFLE [RS_13]
+                          PartitionCols:_col0
+                          Select Operator [SEL_8] (rows=231000 width=1436)
+                            Output:["_col0","_col1","_col2"]
+                            Filter Operator [FIL_32] (rows=231000 width=1436)
+                              predicate:((i_manager_id = 1) and i_item_sk is not null)
+                              TableScan [TS_6] (rows=462000 width=1436)
+                                default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk","i_category_id","i_category","i_manager_id"]
+                      <-Reducer 2 [SIMPLE_EDGE]
+                        SHUFFLE [RS_12]
+                          PartitionCols:_col1
+                          Merge Join Operator [MERGEJOIN_33] (rows=633595212 width=88)
+                            Conds:RS_9._col0=RS_10._col0(Inner),Output:["_col1","_col2"]
+                          <-Map 1 [SIMPLE_EDGE]
+                            SHUFFLE [RS_9]
+                              PartitionCols:_col0
+                              Select Operator [SEL_2] (rows=575995635 width=88)
+                                Output:["_col0","_col1","_col2"]
+                                Filter Operator [FIL_30] (rows=575995635 width=88)
+                                  predicate:(ss_item_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_item_sk","ss_ext_sales_price"]
+                          <-Map 6 [SIMPLE_EDGE]
+                            SHUFFLE [RS_10]
+                              PartitionCols:_col0
+                              Select Operator [SEL_5] (rows=18262 width=1119)
+                                Output:["_col0"]
+                                Filter Operator [FIL_31] (rows=18262 width=1119)
+                                  predicate:((d_moy = 12) and (d_year = 1998) and d_date_sk is not null)
+                                  TableScan [TS_3] (rows=73049 width=1119)
+                                    default@date_dim,dt,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_moy"]
 

http://git-wip-us.apache.org/repos/asf/hive/blob/65e3f5f1/ql/src/test/results/clientpositive/perf/tez/query47.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/tez/query47.q.out b/ql/src/test/results/clientpositive/perf/tez/query47.q.out
index 04354b9..a042691 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query47.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query47.q.out
@@ -127,7 +127,7 @@ Stage-0
               Select Operator [SEL_107] (rows=843315280 width=88)
                 Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
                 Merge Join Operator [MERGEJOIN_189] (rows=843315280 width=88)
-                  Conds:RS_103._col0, _col1, _col2, _col3, (_col7 + 1)=RS_104._col0, _col1, _col2, _col3, _col8(Inner),RS_104._col0, _col1, _col2, _col3, _col8=RS_105._col0, _col1, _col2, _col3, (_col7 - 1)(Inner),Output:["_col6","_col8","_col12","_col13","_col14","_col15","_col23"]
+                  Conds:RS_103._col0, _col1, _col2, _col3, (_col5 + 1)=RS_104._col0, _col1, _col2, _col3, _col8(Inner),RS_104._col0, _col1, _col2, _col3, _col8=RS_105._col0, _col1, _col2, _col3, (_col5 - 1)(Inner),Output:["_col4","_col6","_col10","_col11","_col12","_col13","_col19"]
                 <-Reducer 11 [SIMPLE_EDGE]
                   SHUFFLE [RS_104]
                     PartitionCols:_col0, _col1, _col2, _col3, _col8
@@ -214,9 +214,9 @@ Stage-0
                                                                     default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_moy"]
                 <-Reducer 6 [SIMPLE_EDGE]
                   SHUFFLE [RS_105]
-                    PartitionCols:_col0, _col1, _col2, _col3, (_col7 - 1)
+                    PartitionCols:_col0, _col1, _col2, _col3, (_col5 - 1)
                     Select Operator [SEL_99] (rows=383325119 width=88)
-                      Output:["_col0","_col1","_col2","_col3","_col6","_col7"]
+                      Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
                       Filter Operator [FIL_175] (rows=383325119 width=88)
                         predicate:rank_window_0 is not null
                         PTF Operator [PTF_98] (rows=383325119 width=88)
@@ -229,9 +229,9 @@ Stage-0
                                Please refer to the previous Select Operator [SEL_95]
                 <-Reducer 9 [SIMPLE_EDGE]
                   SHUFFLE [RS_103]
-                    PartitionCols:_col0, _col1, _col2, _col3, (_col7 + 1)
+                    PartitionCols:_col0, _col1, _col2, _col3, (_col5 + 1)
                     Select Operator [SEL_29] (rows=383325119 width=88)
-                      Output:["_col0","_col1","_col2","_col3","_col6","_col7"]
+                      Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
                       Filter Operator [FIL_164] (rows=383325119 width=88)
                         predicate:rank_window_0 is not null
                         PTF Operator [PTF_28] (rows=383325119 width=88)

http://git-wip-us.apache.org/repos/asf/hive/blob/65e3f5f1/ql/src/test/results/clientpositive/perf/tez/query57.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/tez/query57.q.out b/ql/src/test/results/clientpositive/perf/tez/query57.q.out
index 7a275d2..985d588 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query57.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query57.q.out
@@ -121,10 +121,10 @@ Stage-0
               Select Operator [SEL_107] (rows=421645952 width=135)
                 Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8"]
                 Merge Join Operator [MERGEJOIN_189] (rows=421645952 width=135)
-                  Conds:RS_103._col0, _col2, _col1, (_col6 + 1)=RS_104._col0, _col2, _col1, _col7(Inner),RS_104._col0, _col2, _col1, _col7=RS_105._col0, _col2, _col1, (_col6 - 1)(Inner),Output:["_col5","_col7","_col8","_col10","_col11","_col12","_col13","_col20"]
+                  Conds:RS_103._col0, _col1, _col2, (_col4 + 1)=RS_104._col0, _col1, _col2, _col7(Inner),RS_104._col0, _col1, _col2, _col7=RS_105._col0, _col1, _col2, (_col4 - 1)(Inner),Output:["_col3","_col5","_col6","_col8","_col9","_col10","_col11","_col16"]
                 <-Reducer 11 [SIMPLE_EDGE]
                   SHUFFLE [RS_104]
-                    PartitionCols:_col0, _col2, _col1, _col7
+                    PartitionCols:_col0, _col1, _col2, _col7
                     Select Operator [SEL_67] (rows=15971437 width=135)
                       Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
                       Filter Operator [FIL_169] (rows=15971437 width=135)
@@ -208,9 +208,9 @@ Stage-0
                                                                     default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_moy"]
                 <-Reducer 6 [SIMPLE_EDGE]
                   SHUFFLE [RS_105]
-                    PartitionCols:_col0, _col2, _col1, (_col6 - 1)
+                    PartitionCols:_col0, _col1, _col2, (_col4 - 1)
                     Select Operator [SEL_99] (rows=191657247 width=135)
-                      Output:["_col0","_col1","_col2","_col5","_col6"]
+                      Output:["_col0","_col1","_col2","_col3","_col4"]
                       Filter Operator [FIL_175] (rows=191657247 width=135)
                         predicate:rank_window_0 is not null
                         PTF Operator [PTF_98] (rows=191657247 width=135)
@@ -223,9 +223,9 @@ Stage-0
                                Please refer to the previous Select Operator [SEL_95]
                 <-Reducer 9 [SIMPLE_EDGE]
                   SHUFFLE [RS_103]
-                    PartitionCols:_col0, _col2, _col1, (_col6 + 1)
+                    PartitionCols:_col0, _col1, _col2, (_col4 + 1)
                     Select Operator [SEL_29] (rows=191657247 width=135)
-                      Output:["_col0","_col1","_col2","_col5","_col6"]
+                      Output:["_col0","_col1","_col2","_col3","_col4"]
                       Filter Operator [FIL_164] (rows=191657247 width=135)
                         predicate:rank_window_0 is not null
                         PTF Operator [PTF_28] (rows=191657247 width=135)

http://git-wip-us.apache.org/repos/asf/hive/blob/65e3f5f1/ql/src/test/results/clientpositive/perf/tez/query64.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/tez/query64.q.out b/ql/src/test/results/clientpositive/perf/tez/query64.q.out
index cd76cc6..26ba737 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query64.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query64.q.out
@@ -282,14 +282,14 @@ Stage-0
             Select Operator [SEL_260] (rows=273897192 width=88)
               Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col17","_col18"]
               Filter Operator [FIL_259] (rows=273897192 width=88)
-                predicate:(_col30 <= _col13)
+                predicate:(_col19 <= _col12)
                 Merge Join Operator [MERGEJOIN_615] (rows=821691577 width=88)
-                  Conds:RS_256._col2, _col1, _col3=RS_257._col2, _col1, _col3(Inner),Output:["_col0","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col13","_col14","_col15","_col16","_col30","_col31","_col32","_col33"]
+                  Conds:RS_256._col2, _col1, _col3=RS_257._col1, _col0, _col2(Inner),Output:["_col0","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15","_col19","_col20","_col21","_col22"]
                 <-Reducer 14 [SIMPLE_EDGE]
                   SHUFFLE [RS_257]
-                    PartitionCols:_col2, _col1, _col3
+                    PartitionCols:_col1, _col0, _col2
                     Select Operator [SEL_254] (rows=746992327 width=88)
-                      Output:["_col1","_col2","_col3","_col13","_col14","_col15","_col16"]
+                      Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
                       Group By Operator [GBY_253] (rows=746992327 width=88)
                         Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col17"],aggregations:["count(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)","sum(VALUE._col3)"],keys:KEY._col0, KEY._col1, KEY._col2, KEY._col3, KEY._col4, KEY._col5, KEY._col6, KEY._col7, KEY._col8, KEY._col9, KEY._col10, KEY._col11, KEY._col12, KEY._col13
                       <-Reducer 13 [SIMPLE_EDGE]
@@ -545,7 +545,7 @@ Stage-0
                   SHUFFLE [RS_256]
                     PartitionCols:_col2, _col1, _col3
                     Select Operator [SEL_126] (rows=746992327 width=88)
-                      Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col13","_col14","_col15","_col16"]
+                      Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15"]
                       Group By Operator [GBY_125] (rows=746992327 width=88)
                         Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col17"],aggregations:["count(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)","sum(VALUE._col3)"],keys:KEY._col0, KEY._col1, KEY._col2, KEY._col3, KEY._col4, KEY._col5, KEY._col6, KEY._col7, KEY._col8, KEY._col9, KEY._col10, KEY._col11, KEY._col12, KEY._col13
                       <-Reducer 8 [SIMPLE_EDGE]

http://git-wip-us.apache.org/repos/asf/hive/blob/65e3f5f1/ql/src/test/results/clientpositive/perf/tez/query74.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/tez/query74.q.out b/ql/src/test/results/clientpositive/perf/tez/query74.q.out
index a0f5082..ee59718 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query74.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query74.q.out
@@ -151,14 +151,14 @@ Stage-0
               Select Operator [SEL_88] (rows=383325119 width=88)
                 Output:["_col0","_col1","_col2"]
                 Filter Operator [FIL_87] (rows=383325119 width=88)
-                  predicate:((_col19 / _col4) > (_col14 / _col9))
+                  predicate:((_col9 / _col1) > (_col7 / _col3))
                   Merge Join Operator [MERGEJOIN_171] (rows=1149975359 width=88)
-                    Conds:RS_82._col0=RS_83._col0(Inner),RS_83._col0=RS_84._col0(Inner),RS_83._col0=RS_85._col0(Inner),Output:["_col4","_col9","_col10","_col11","_col12","_col14","_col19"]
+                    Conds:RS_82._col0=RS_83._col0(Inner),RS_83._col0=RS_84._col0(Inner),RS_83._col0=RS_85._col0(Inner),Output:["_col1","_col3","_col4","_col5","_col6","_col7","_col9"]
                   <-Reducer 13 [SIMPLE_EDGE]
                     SHUFFLE [RS_85]
                       PartitionCols:_col0
                       Select Operator [SEL_81] (rows=87121617 width=135)
-                        Output:["_col0","_col4"]
+                        Output:["_col0","_col1"]
                         Group By Operator [GBY_80] (rows=87121617 width=135)
                           Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["max(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2, KEY._col3
                         <-Reducer 12 [SIMPLE_EDGE]
@@ -203,45 +203,47 @@ Stage-0
                   <-Reducer 16 [SIMPLE_EDGE]
                     SHUFFLE [RS_82]
                       PartitionCols:_col0
-                      Filter Operator [FIL_19] (rows=29040539 width=135)
-                        predicate:(_col4 > 0)
-                        Select Operator [SEL_161] (rows=87121617 width=135)
-                          Output:["_col0","_col4"]
-                          Group By Operator [GBY_18] (rows=87121617 width=135)
-                            Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["max(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2, KEY._col3
-                          <-Reducer 15 [SIMPLE_EDGE]
-                            SHUFFLE [RS_17]
-                              PartitionCols:_col0, _col1, _col2, _col3
-                              Group By Operator [GBY_16] (rows=174243235 width=135)
-                                Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["max(_col2)"],keys:_col6, _col7, _col8, _col4
-                                Merge Join Operator [MERGEJOIN_164] (rows=174243235 width=135)
-                                  Conds:RS_12._col1=RS_13._col0(Inner),Output:["_col2","_col4","_col6","_col7","_col8"]
-                                <-Map 18 [SIMPLE_EDGE]
-                                  SHUFFLE [RS_13]
-                                    PartitionCols:_col0
-                                     Please refer to the previous Select Operator [SEL_70]
-                                <-Reducer 14 [SIMPLE_EDGE]
-                                  SHUFFLE [RS_12]
-                                    PartitionCols:_col1
-                                    Merge Join Operator [MERGEJOIN_163] (rows=158402938 width=135)
-                                      Conds:RS_9._col0=RS_10._col0(Inner),Output:["_col1","_col2","_col4"]
-                                    <-Map 17 [SIMPLE_EDGE]
-                                      SHUFFLE [RS_10]
-                                        PartitionCols:_col0
-                                        Select Operator [SEL_5] (rows=18262 width=1119)
-                                          Output:["_col0","_col1"]
-                                          Filter Operator [FIL_150] (rows=18262 width=1119)
-                                            predicate:((d_year = 2001) and (d_year) IN (2001, 2002) and d_date_sk is not null)
-                                             Please refer to the previous TableScan [TS_65]
-                                    <-Map 10 [SIMPLE_EDGE]
-                                      SHUFFLE [RS_9]
-                                        PartitionCols:_col0
-                                         Please refer to the previous Select Operator [SEL_64]
+                      Select Operator [SEL_20] (rows=29040539 width=135)
+                        Output:["_col0","_col1"]
+                        Filter Operator [FIL_19] (rows=29040539 width=135)
+                          predicate:(_col4 > 0)
+                          Select Operator [SEL_161] (rows=87121617 width=135)
+                            Output:["_col0","_col4"]
+                            Group By Operator [GBY_18] (rows=87121617 width=135)
+                              Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["max(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2, KEY._col3
+                            <-Reducer 15 [SIMPLE_EDGE]
+                              SHUFFLE [RS_17]
+                                PartitionCols:_col0, _col1, _col2, _col3
+                                Group By Operator [GBY_16] (rows=174243235 width=135)
+                                  Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["max(_col2)"],keys:_col6, _col7, _col8, _col4
+                                  Merge Join Operator [MERGEJOIN_164] (rows=174243235 width=135)
+                                    Conds:RS_12._col1=RS_13._col0(Inner),Output:["_col2","_col4","_col6","_col7","_col8"]
+                                  <-Map 18 [SIMPLE_EDGE]
+                                    SHUFFLE [RS_13]
+                                      PartitionCols:_col0
+                                       Please refer to the previous Select Operator [SEL_70]
+                                  <-Reducer 14 [SIMPLE_EDGE]
+                                    SHUFFLE [RS_12]
+                                      PartitionCols:_col1
+                                      Merge Join Operator [MERGEJOIN_163] (rows=158402938 width=135)
+                                        Conds:RS_9._col0=RS_10._col0(Inner),Output:["_col1","_col2","_col4"]
+                                      <-Map 17 [SIMPLE_EDGE]
+                                        SHUFFLE [RS_10]
+                                          PartitionCols:_col0
+                                          Select Operator [SEL_5] (rows=18262 width=1119)
+                                            Output:["_col0","_col1"]
+                                            Filter Operator [FIL_150] (rows=18262 width=1119)
+                                              predicate:((d_year = 2001) and (d_year) IN (2001, 2002) and d_date_sk is not null)
+                                               Please refer to the previous TableScan [TS_65]
+                                      <-Map 10 [SIMPLE_EDGE]
+                                        SHUFFLE [RS_9]
+                                          PartitionCols:_col0
+                                           Please refer to the previous Select Operator [SEL_64]
                   <-Reducer 4 [SIMPLE_EDGE]
                     SHUFFLE [RS_84]
                       PartitionCols:_col0
                       Select Operator [SEL_61] (rows=348477374 width=88)
-                        Output:["_col0","_col1","_col2","_col4"]
+                        Output:["_col0","_col1","_col2","_col3"]
                         Group By Operator [GBY_60] (rows=348477374 width=88)
                           Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["max(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2, KEY._col3
                         <-Reducer 3 [SIMPLE_EDGE]
@@ -276,38 +278,40 @@ Stage-0
                   <-Reducer 9 [SIMPLE_EDGE]
                     SHUFFLE [RS_83]
                       PartitionCols:_col0
-                      Filter Operator [FIL_40] (rows=116159124 width=88)
-                        predicate:(_col4 > 0)
-                        Select Operator [SEL_162] (rows=348477374 width=88)
-                          Output:["_col0","_col4"]
-                          Group By Operator [GBY_39] (rows=348477374 width=88)
-                            Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["max(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2, KEY._col3
-                          <-Reducer 8 [SIMPLE_EDGE]
-                            SHUFFLE [RS_38]
-                              PartitionCols:_col0, _col1, _col2, _col3
-                              Group By Operator [GBY_37] (rows=696954748 width=88)
-                                Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["max(_col2)"],keys:_col6, _col7, _col8, _col4
-                                Merge Join Operator [MERGEJOIN_166] (rows=696954748 width=88)
-                                  Conds:RS_33._col1=RS_34._col0(Inner),Output:["_col2","_col4","_col6","_col7","_col8"]
-                                <-Map 18 [SIMPLE_EDGE]
-                                  SHUFFLE [RS_34]
-                                    PartitionCols:_col0
-                                     Please refer to the previous Select Operator [SEL_70]
-                                <-Reducer 7 [SIMPLE_EDGE]
-                                  SHUFFLE [RS_33]
-                                    PartitionCols:_col1
-                                    Merge Join Operator [MERGEJOIN_165] (rows=633595212 width=88)
-                                      Conds:RS_30._col0=RS_31._col0(Inner),Output:["_col1","_col2","_col4"]
-                                    <-Map 17 [SIMPLE_EDGE]
-                                      SHUFFLE [RS_31]
-                                        PartitionCols:_col0
-                                        Select Operator [SEL_26] (rows=18262 width=1119)
-                                          Output:["_col0","_col1"]
-                                          Filter Operator [FIL_153] (rows=18262 width=1119)
-                                            predicate:((d_year = 2001) and (d_year) IN (2001, 2002) and d_date_sk is not null)
-                                             Please refer to the previous TableScan [TS_65]
-                                    <-Map 1 [SIMPLE_EDGE]
-                                      SHUFFLE [RS_30]
-                                        PartitionCols:_col0
-                                         Please refer to the previous Select Operator [SEL_44]
+                      Select Operator [SEL_41] (rows=116159124 width=88)
+                        Output:["_col0","_col1"]
+                        Filter Operator [FIL_40] (rows=116159124 width=88)
+                          predicate:(_col4 > 0)
+                          Select Operator [SEL_162] (rows=348477374 width=88)
+                            Output:["_col0","_col4"]
+                            Group By Operator [GBY_39] (rows=348477374 width=88)
+                              Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["max(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2, KEY._col3
+                            <-Reducer 8 [SIMPLE_EDGE]
+                              SHUFFLE [RS_38]
+                                PartitionCols:_col0, _col1, _col2, _col3
+                                Group By Operator [GBY_37] (rows=696954748 width=88)
+                                  Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["max(_col2)"],keys:_col6, _col7, _col8, _col4
+                                  Merge Join Operator [MERGEJOIN_166] (rows=696954748 width=88)
+                                    Conds:RS_33._col1=RS_34._col0(Inner),Output:["_col2","_col4","_col6","_col7","_col8"]
+                                  <-Map 18 [SIMPLE_EDGE]
+                                    SHUFFLE [RS_34]
+                                      PartitionCols:_col0
+                                       Please refer to the previous Select Operator [SEL_70]
+                                  <-Reducer 7 [SIMPLE_EDGE]
+                                    SHUFFLE [RS_33]
+                                      PartitionCols:_col1
+                                      Merge Join Operator [MERGEJOIN_165] (rows=633595212 width=88)
+                                        Conds:RS_30._col0=RS_31._col0(Inner),Output:["_col1","_col2","_col4"]
+                                      <-Map 17 [SIMPLE_EDGE]
+                                        SHUFFLE [RS_31]
+                                          PartitionCols:_col0
+                                          Select Operator [SEL_26] (rows=18262 width=1119)
+                                            Output:["_col0","_col1"]
+                                            Filter Operator [FIL_153] (rows=18262 width=1119)
+                                              predicate:((d_year = 2001) and (d_year) IN (2001, 2002) and d_date_sk is not null)
+                                               Please refer to the previous TableScan [TS_65]
+                                      <-Map 1 [SIMPLE_EDGE]
+                                        SHUFFLE [RS_30]
+                                          PartitionCols:_col0
+                                           Please refer to the previous Select Operator [SEL_44]
 

http://git-wip-us.apache.org/repos/asf/hive/blob/65e3f5f1/ql/src/test/results/clientpositive/perf/tez/query78.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/tez/query78.q.out b/ql/src/test/results/clientpositive/perf/tez/query78.q.out
index 91c244f..9c2d7b3 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query78.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query78.q.out
@@ -130,163 +130,161 @@ Reducer 9 <- Map 1 (SIMPLE_EDGE), Reducer 18 (SIMPLE_EDGE)
 
 Stage-0
   Fetch Operator
-    limit:-1
+    limit:100
     Stage-1
       Reducer 6
       File Output Operator [FS_78]
-        Select Operator [SEL_77] (rows=100 width=88)
-          Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9"]
-          Limit [LIM_76] (rows=100 width=88)
-            Number of rows:100
-            Select Operator [SEL_75] (rows=23425424 width=88)
-              Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8"]
-            <-Reducer 5 [SIMPLE_EDGE]
-              SHUFFLE [RS_74]
-                Select Operator [SEL_73] (rows=23425424 width=88)
-                  Output:["_col0","_col1","_col6","_col7","_col8","_col9","_col10","_col11","_col12"]
-                  Filter Operator [FIL_72] (rows=23425424 width=88)
-                    predicate:(COALESCE(_col11,0) > 0)
-                    Merge Join Operator [MERGEJOIN_113] (rows=70276272 width=88)
-                      Conds:RS_69._col1=RS_70._col0(Left Outer),Output:["_col0","_col1","_col2","_col3","_col4","_col7","_col8","_col9","_col11","_col12","_col13"]
-                    <-Reducer 10 [SIMPLE_EDGE]
-                      SHUFFLE [RS_70]
-                        PartitionCols:_col0
-                        Select Operator [SEL_67] (rows=43558464 width=135)
-                          Output:["_col0","_col1","_col2","_col3"]
-                          Group By Operator [GBY_66] (rows=43558464 width=135)
-                            Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)"],keys:KEY._col0, KEY._col1
-                          <-Reducer 9 [SIMPLE_EDGE]
-                            SHUFFLE [RS_65]
-                              PartitionCols:_col0, _col1
-                              Group By Operator [GBY_64] (rows=87116928 width=135)
-                                Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["sum(_col6)","sum(_col7)","sum(_col8)"],keys:_col3, _col4
-                                Merge Join Operator [MERGEJOIN_111] (rows=87116928 width=135)
-                                  Conds:RS_60._col0=RS_61._col0(Inner),Output:["_col3","_col4","_col6","_col7","_col8"]
-                                <-Map 1 [SIMPLE_EDGE]
-                                  SHUFFLE [RS_60]
-                                    PartitionCols:_col0
-                                    Select Operator [SEL_2] (rows=36524 width=1119)
-                                      Output:["_col0"]
-                                      Filter Operator [FIL_97] (rows=36524 width=1119)
-                                        predicate:((d_year = 2000) and d_date_sk is not null)
-                                        TableScan [TS_0] (rows=73049 width=1119)
-                                          default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year"]
-                                <-Reducer 18 [SIMPLE_EDGE]
-                                  SHUFFLE [RS_61]
-                                    PartitionCols:_col0
-                                    Select Operator [SEL_59] (rows=79197206 width=135)
-                                      Output:["_col0","_col1","_col2","_col4","_col5","_col6"]
-                                      Filter Operator [FIL_58] (rows=79197206 width=135)
-                                        predicate:_col8 is null
-                                        Merge Join Operator [MERGEJOIN_110] (rows=158394413 width=135)
-                                          Conds:RS_55._col2, _col3=RS_56._col0, _col1(Left Outer),Output:["_col0","_col1","_col2","_col4","_col5","_col6","_col8"]
-                                        <-Map 17 [SIMPLE_EDGE]
-                                          SHUFFLE [RS_55]
-                                            PartitionCols:_col2, _col3
-                                            Select Operator [SEL_52] (rows=143994918 width=135)
-                                              Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
-                                              Filter Operator [FIL_104] (rows=143994918 width=135)
-                                                predicate:((cs_item_sk = cs_item_sk) and cs_sold_date_sk is not null)
-                                                TableScan [TS_50] (rows=287989836 width=135)
-                                                  default@catalog_sales,catalog_sales,Tbl:COMPLETE,Col:NONE,Output:["cs_sold_date_sk","cs_bill_customer_sk","cs_item_sk","cs_order_number","cs_quantity","cs_wholesale_cost","cs_sales_price"]
-                                        <-Map 19 [SIMPLE_EDGE]
-                                          SHUFFLE [RS_56]
-                                            PartitionCols:_col0, _col1
-                                            Select Operator [SEL_54] (rows=28798881 width=106)
-                                              Output:["_col0","_col1"]
-                                              TableScan [TS_53] (rows=28798881 width=106)
-                                                default@catalog_returns,catalog_returns,Tbl:COMPLETE,Col:NONE,Output:["cr_item_sk","cr_order_number"]
-                    <-Reducer 4 [SIMPLE_EDGE]
-                      SHUFFLE [RS_69]
-                        PartitionCols:_col1
-                        Filter Operator [FIL_45] (rows=63887519 width=88)
-                          predicate:(COALESCE(_col7,0) > 0)
-                          Merge Join Operator [MERGEJOIN_112] (rows=191662559 width=88)
-                            Conds:RS_42._col1, _col0=RS_43._col1, _col0(Left Outer),Output:["_col0","_col1","_col2","_col3","_col4","_col7","_col8","_col9"]
-                          <-Reducer 3 [ONE_TO_ONE_EDGE]
-                            FORWARD [RS_42]
-                              PartitionCols:_col1, _col0
-                              Select Operator [SEL_20] (rows=174238687 width=88)
-                                Output:["_col0","_col1","_col2","_col3","_col4"]
-                                Group By Operator [GBY_19] (rows=174238687 width=88)
-                                  Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)"],keys:KEY._col0, KEY._col1
-                                <-Reducer 2 [SIMPLE_EDGE]
-                                  SHUFFLE [RS_18]
-                                    PartitionCols:_col0, _col1
-                                    Group By Operator [GBY_17] (rows=348477374 width=88)
-                                      Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["sum(_col6)","sum(_col7)","sum(_col8)"],keys:_col4, _col3
-                                      Merge Join Operator [MERGEJOIN_107] (rows=348477374 width=88)
-                                        Conds:RS_13._col0=RS_14._col0(Inner),Output:["_col3","_col4","_col6","_col7","_col8"]
-                                      <-Map 1 [SIMPLE_EDGE]
-                                        SHUFFLE [RS_13]
-                                          PartitionCols:_col0
-                                           Please refer to the previous Select Operator [SEL_2]
-                                      <-Reducer 12 [SIMPLE_EDGE]
-                                        SHUFFLE [RS_14]
-                                          PartitionCols:_col0
-                                          Select Operator [SEL_12] (rows=316797606 width=88)
-                                            Output:["_col0","_col1","_col2","_col4","_col5","_col6"]
-                                            Filter Operator [FIL_11] (rows=316797606 width=88)
-                                              predicate:_col8 is null
-                                              Merge Join Operator [MERGEJOIN_106] (rows=633595212 width=88)
-                                                Conds:RS_8._col1, _col3=RS_9._col0, _col1(Left Outer),Output:["_col0","_col1","_col2","_col4","_col5","_col6","_col8"]
-                                              <-Map 11 [SIMPLE_EDGE]
-                                                SHUFFLE [RS_8]
-                                                  PartitionCols:_col1, _col3
-                                                  Select Operator [SEL_5] (rows=575995635 width=88)
-                                                    Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
-                                                    Filter Operator [FIL_98] (rows=575995635 width=88)
-                                                      predicate:ss_sold_date_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_item_sk","ss_customer_sk","ss_ticket_number","ss_quantity","ss_wholesale_cost","ss_sales_price"]
-                                              <-Map 13 [SIMPLE_EDGE]
-                                                SHUFFLE [RS_9]
-                                                  PartitionCols:_col0, _col1
-                                                  Select Operator [SEL_7] (rows=57591150 width=77)
-                                                    Output:["_col0","_col1"]
-                                                    TableScan [TS_6] (rows=57591150 width=77)
-                                                      default@store_returns,store_returns,Tbl:COMPLETE,Col:NONE,Output:["sr_item_sk","sr_ticket_number"]
-                          <-Reducer 8 [ONE_TO_ONE_EDGE]
-                            FORWARD [RS_43]
-                              PartitionCols:_col1, _col0
-                              Select Operator [SEL_41] (rows=43560808 width=135)
-                                Output:["_col0","_col1","_col2","_col3","_col4"]
-                                Group By Operator [GBY_40] (rows=43560808 width=135)
-                                  Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)"],keys:KEY._col0, KEY._col1
-                                <-Reducer 7 [SIMPLE_EDGE]
-                                  SHUFFLE [RS_39]
-                                    PartitionCols:_col0, _col1
-                                    Group By Operator [GBY_38] (rows=87121617 width=135)
-                                      Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["sum(_col6)","sum(_col7)","sum(_col8)"],keys:_col4, _col3
-                                      Merge Join Operator [MERGEJOIN_109] (rows=87121617 width=135)
-                                        Conds:RS_34._col0=RS_35._col0(Inner),Output:["_col3","_col4","_col6","_col7","_col8"]
-                                      <-Map 1 [SIMPLE_EDGE]
-                                        SHUFFLE [RS_34]
-                                          PartitionCols:_col0
-                                           Please refer to the previous Select Operator [SEL_2]
-                                      <-Reducer 15 [SIMPLE_EDGE]
-                                        SHUFFLE [RS_35]
-                                          PartitionCols:_col0
-                                          Select Operator [SEL_33] (rows=79201469 width=135)
-                                            Output:["_col0","_col1","_col2","_col4","_col5","_col6"]
-                                            Filter Operator [FIL_32] (rows=79201469 width=135)
-                                              predicate:_col8 is null
-                                              Merge Join Operator [MERGEJOIN_108] (rows=158402938 width=135)
-                                                Conds:RS_29._col1, _col3=RS_30._col0, _col1(Left Outer),Output:["_col0","_col1","_col2","_col4","_col5","_col6","_col8"]
-                                              <-Map 14 [SIMPLE_EDGE]
-                                                SHUFFLE [RS_29]
-                                                  PartitionCols:_col1, _col3
-                                                  Select Operator [SEL_26] (rows=144002668 width=135)
-                                                    Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
-                                                    Filter Operator [FIL_101] (rows=144002668 width=135)
-                                                      predicate:ws_sold_date_sk is not null
-                                                      TableScan [TS_24] (rows=144002668 width=135)
-                                                        default@web_sales,web_sales,Tbl:COMPLETE,Col:NONE,Output:["ws_sold_date_sk","ws_item_sk","ws_bill_customer_sk","ws_order_number","ws_quantity","ws_wholesale_cost","ws_sales_price"]
-                                              <-Map 16 [SIMPLE_EDGE]
-                                                SHUFFLE [RS_30]
-                                                  PartitionCols:_col0, _col1
-                                                  Select Operator [SEL_28] (rows=14398467 width=92)
-                                                    Output:["_col0","_col1"]
-                                                    TableScan [TS_27] (rows=14398467 width=92)
-                                                      default@web_returns,web_returns,Tbl:COMPLETE,Col:NONE,Output:["wr_item_sk","wr_order_number"]
+        Limit [LIM_77] (rows=100 width=88)
+          Number of rows:100
+          Select Operator [SEL_75] (rows=23425424 width=88)
+            Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9"]
+          <-Reducer 5 [SIMPLE_EDGE]
+            SHUFFLE [RS_74]
+              Select Operator [SEL_73] (rows=23425424 width=88)
+                Output:["_col0","_col1","_col6","_col7","_col8","_col9","_col10","_col11","_col12"]
+                Filter Operator [FIL_72] (rows=23425424 width=88)
+                  predicate:(COALESCE(_col11,0) > 0)
+                  Merge Join Operator [MERGEJOIN_113] (rows=70276272 width=88)
+                    Conds:RS_69._col1=RS_70._col0(Left Outer),Output:["_col0","_col1","_col2","_col3","_col4","_col7","_col8","_col9","_col11","_col12","_col13"]
+                  <-Reducer 10 [SIMPLE_EDGE]
+                    SHUFFLE [RS_70]
+                      PartitionCols:_col0
+                      Select Operator [SEL_67] (rows=43558464 width=135)
+                        Output:["_col0","_col1","_col2","_col3"]
+                        Group By Operator [GBY_66] (rows=43558464 width=135)
+                          Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)"],keys:KEY._col0, KEY._col1
+                        <-Reducer 9 [SIMPLE_EDGE]
+                          SHUFFLE [RS_65]
+                            PartitionCols:_col0, _col1
+                            Group By Operator [GBY_64] (rows=87116928 width=135)
+                              Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["sum(_col6)","sum(_col7)","sum(_col8)"],keys:_col3, _col4
+                              Merge Join Operator [MERGEJOIN_111] (rows=87116928 width=135)
+                                Conds:RS_60._col0=RS_61._col0(Inner),Output:["_col3","_col4","_col6","_col7","_col8"]
+                              <-Map 1 [SIMPLE_EDGE]
+                                SHUFFLE [RS_60]
+                                  PartitionCols:_col0
+                                  Select Operator [SEL_2] (rows=36524 width=1119)
+                                    Output:["_col0"]
+                                    Filter Operator [FIL_97] (rows=36524 width=1119)
+                                      predicate:((d_year = 2000) and d_date_sk is not null)
+                                      TableScan [TS_0] (rows=73049 width=1119)
+                                        default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year"]
+                              <-Reducer 18 [SIMPLE_EDGE]
+                                SHUFFLE [RS_61]
+                                  PartitionCols:_col0
+                                  Select Operator [SEL_59] (rows=79197206 width=135)
+                                    Output:["_col0","_col1","_col2","_col4","_col5","_col6"]
+                                    Filter Operator [FIL_58] (rows=79197206 width=135)
+                                      predicate:_col8 is null
+                                      Merge Join Operator [MERGEJOIN_110] (rows=158394413 width=135)
+                                        Conds:RS_55._col2, _col3=RS_56._col0, _col1(Left Outer),Output:["_col0","_col1","_col2","_col4","_col5","_col6","_col8"]
+                                      <-Map 17 [SIMPLE_EDGE]
+                                        SHUFFLE [RS_55]
+                                          PartitionCols:_col2, _col3
+                                          Select Operator [SEL_52] (rows=143994918 width=135)
+                                            Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
+                                            Filter Operator [FIL_104] (rows=143994918 width=135)
+                                              predicate:((cs_item_sk = cs_item_sk) and cs_sold_date_sk is not null)
+                                              TableScan [TS_50] (rows=287989836 width=135)
+                                                default@catalog_sales,catalog_sales,Tbl:COMPLETE,Col:NONE,Output:["cs_sold_date_sk","cs_bill_customer_sk","cs_item_sk","cs_order_number","cs_quantity","cs_wholesale_cost","cs_sales_price"]
+                                      <-Map 19 [SIMPLE_EDGE]
+                                        SHUFFLE [RS_56]
+                                          PartitionCols:_col0, _col1
+                                          Select Operator [SEL_54] (rows=28798881 width=106)
+                                            Output:["_col0","_col1"]
+                                            TableScan [TS_53] (rows=28798881 width=106)
+                                              default@catalog_returns,catalog_returns,Tbl:COMPLETE,Col:NONE,Output:["cr_item_sk","cr_order_number"]
+                  <-Reducer 4 [SIMPLE_EDGE]
+                    SHUFFLE [RS_69]
+                      PartitionCols:_col1
+                      Filter Operator [FIL_45] (rows=63887519 width=88)
+                        predicate:(COALESCE(_col7,0) > 0)
+                        Merge Join Operator [MERGEJOIN_112] (rows=191662559 width=88)
+                          Conds:RS_42._col1, _col0=RS_43._col1, _col0(Left Outer),Output:["_col0","_col1","_col2","_col3","_col4","_col7","_col8","_col9"]
+                        <-Reducer 3 [ONE_TO_ONE_EDGE]
+                          FORWARD [RS_42]
+                            PartitionCols:_col1, _col0
+                            Select Operator [SEL_20] (rows=174238687 width=88)
+                              Output:["_col0","_col1","_col2","_col3","_col4"]
+                              Group By Operator [GBY_19] (rows=174238687 width=88)
+                                Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)"],keys:KEY._col0, KEY._col1
+                              <-Reducer 2 [SIMPLE_EDGE]
+                                SHUFFLE [RS_18]
+                                  PartitionCols:_col0, _col1
+                                  Group By Operator [GBY_17] (rows=348477374 width=88)
+                                    Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["sum(_col6)","sum(_col7)","sum(_col8)"],keys:_col4, _col3
+                                    Merge Join Operator [MERGEJOIN_107] (rows=348477374 width=88)
+                                      Conds:RS_13._col0=RS_14._col0(Inner),Output:["_col3","_col4","_col6","_col7","_col8"]
+                                    <-Map 1 [SIMPLE_EDGE]
+                                      SHUFFLE [RS_13]
+                                        PartitionCols:_col0
+                                         Please refer to the previous Select Operator [SEL_2]
+                                    <-Reducer 12 [SIMPLE_EDGE]
+                                      SHUFFLE [RS_14]
+                                        PartitionCols:_col0
+                                        Select Operator [SEL_12] (rows=316797606 width=88)
+                                          Output:["_col0","_col1","_col2","_col4","_col5","_col6"]
+                                          Filter Operator [FIL_11] (rows=316797606 width=88)
+                                            predicate:_col8 is null
+                                            Merge Join Operator [MERGEJOIN_106] (rows=633595212 width=88)
+                                              Conds:RS_8._col1, _col3=RS_9._col0, _col1(Left Outer),Output:["_col0","_col1","_col2","_col4","_col5","_col6","_col8"]
+                                            <-Map 11 [SIMPLE_EDGE]
+                                              SHUFFLE [RS_8]
+                                                PartitionCols:_col1, _col3
+                                                Select Operator [SEL_5] (rows=575995635 width=88)
+                                                  Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
+                                                  Filter Operator [FIL_98] (rows=575995635 width=88)
+                                                    predicate:ss_sold_date_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_item_sk","ss_customer_sk","ss_ticket_number","ss_quantity","ss_wholesale_cost","ss_sales_price"]
+                                            <-Map 13 [SIMPLE_EDGE]
+                                              SHUFFLE [RS_9]
+                                                PartitionCols:_col0, _col1
+                                                Select Operator [SEL_7] (rows=57591150 width=77)
+                                                  Output:["_col0","_col1"]
+                                                  TableScan [TS_6] (rows=57591150 width=77)
+                                                    default@store_returns,store_returns,Tbl:COMPLETE,Col:NONE,Output:["sr_item_sk","sr_ticket_number"]
+                        <-Reducer 8 [ONE_TO_ONE_EDGE]
+                          FORWARD [RS_43]
+                            PartitionCols:_col1, _col0
+                            Select Operator [SEL_41] (rows=43560808 width=135)
+                              Output:["_col0","_col1","_col2","_col3","_col4"]
+                              Group By Operator [GBY_40] (rows=43560808 width=135)
+                                Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)"],keys:KEY._col0, KEY._col1
+                              <-Reducer 7 [SIMPLE_EDGE]
+                                SHUFFLE [RS_39]
+                                  PartitionCols:_col0, _col1
+                                  Group By Operator [GBY_38] (rows=87121617 width=135)
+                                    Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["sum(_col6)","sum(_col7)","sum(_col8)"],keys:_col4, _col3
+                                    Merge Join Operator [MERGEJOIN_109] (rows=87121617 width=135)
+                                      Conds:RS_34._col0=RS_35._col0(Inner),Output:["_col3","_col4","_col6","_col7","_col8"]
+                                    <-Map 1 [SIMPLE_EDGE]
+                                      SHUFFLE [RS_34]
+                                        PartitionCols:_col0
+                                         Please refer to the previous Select Operator [SEL_2]
+                                    <-Reducer 15 [SIMPLE_EDGE]
+                                      SHUFFLE [RS_35]
+                                        PartitionCols:_col0
+                                        Select Operator [SEL_33] (rows=79201469 width=135)
+                                          Output:["_col0","_col1","_col2","_col4","_col5","_col6"]
+                                          Filter Operator [FIL_32] (rows=79201469 width=135)
+                                            predicate:_col8 is null
+                                            Merge Join Operator [MERGEJOIN_108] (rows=158402938 width=135)
+                                              Conds:RS_29._col1, _col3=RS_30._col0, _col1(Left Outer),Output:["_col0","_col1","_col2","_col4","_col5","_col6","_col8"]
+                                            <-Map 14 [SIMPLE_EDGE]
+                                              SHUFFLE [RS_29]
+                                                PartitionCols:_col1, _col3
+                                                Select Operator [SEL_26] (rows=144002668 width=135)
+                                                  Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
+                                                  Filter Operator [FIL_101] (rows=144002668 width=135)
+                                                    predicate:ws_sold_date_sk is not null
+                                                    TableScan [TS_24] (rows=144002668 width=135)
+                                                      default@web_sales,web_sales,Tbl:COMPLETE,Col:NONE,Output:["ws_sold_date_sk","ws_item_sk","ws_bill_customer_sk","ws_order_number","ws_quantity","ws_wholesale_cost","ws_sales_price"]
+                                            <-Map 16 [SIMPLE_EDGE]
+                                              SHUFFLE [RS_30]
+                                                PartitionCols:_col0, _col1
+                                                Select Operator [SEL_28] (rows=14398467 width=92)
+                                                  Output:["_col0","_col1"]
+                                                  TableScan [TS_27] (rows=14398467 width=92)
+                                                    default@web_returns,web_returns,Tbl:COMPLETE,Col:NONE,Output:["wr_item_sk","wr_order_number"]
 

http://git-wip-us.apache.org/repos/asf/hive/blob/65e3f5f1/ql/src/test/results/clientpositive/perf/tez/query85.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/tez/query85.q.out b/ql/src/test/results/clientpositive/perf/tez/query85.q.out
index 90cc27e..abba10d 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query85.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query85.q.out
@@ -190,7 +190,7 @@ Stage-0
           <-Reducer 9 [SIMPLE_EDGE]
             SHUFFLE [RS_52]
               Select Operator [SEL_51] (rows=1023990 width=385)
-                Output:["_col5","_col6","_col7","_col8"]
+                Output:["_col4","_col5","_col6","_col7"]
                 Group By Operator [GBY_50] (rows=1023990 width=385)
                   Output:["_col0","_col1","_col2","_col3"],aggregations:["avg(VALUE._col0)","avg(VALUE._col1)","avg(VALUE._col2)"],keys:KEY._col0
                 <-Reducer 8 [SIMPLE_EDGE]

http://git-wip-us.apache.org/repos/asf/hive/blob/65e3f5f1/ql/src/test/results/clientpositive/perf/tez/query91.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/tez/query91.q.out b/ql/src/test/results/clientpositive/perf/tez/query91.q.out
index f808a50..dc2e684a 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query91.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query91.q.out
@@ -81,7 +81,7 @@ Stage-0
         <-Reducer 5 [SIMPLE_EDGE]
           SHUFFLE [RS_45]
             Select Operator [SEL_44] (rows=58564004 width=860)
-              Output:["_col0","_col1","_col2","_col6"]
+              Output:["_col0","_col1","_col2","_col4"]
               Group By Operator [GBY_43] (rows=58564004 width=860)
                 Output:["_col0","_col1","_col2","_col3","_col4","_col5"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2, KEY._col3, KEY._col4
               <-Reducer 4 [SIMPLE_EDGE]