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 2015/12/21 02:07:04 UTC

[23/32] hive git commit: HIVE-11865: Disable Hive PPD optimizer when CBO has optimized the plan (Jesus Camacho Rodriguez, reviewed by Laljo John Pullokkaran)

http://git-wip-us.apache.org/repos/asf/hive/blob/6f44fc81/ql/src/test/results/clientpositive/perf/query43.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/query43.q.out b/ql/src/test/results/clientpositive/perf/query43.q.out
index 4e738e6..7fa4f53 100644
--- a/ql/src/test/results/clientpositive/perf/query43.q.out
+++ b/ql/src/test/results/clientpositive/perf/query43.q.out
@@ -15,48 +15,48 @@ Stage-0
       limit:100
       Stage-1
          Reducer 5
-         File Output Operator [FS_28]
+         File Output Operator [FS_24]
             compressed:false
             Statistics:Num rows: 100 Data size: 111900 Basic stats: COMPLETE Column stats: NONE
             table:{"input format:":"org.apache.hadoop.mapred.TextInputFormat","output format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"}
-            Limit [LIM_27]
+            Limit [LIM_23]
                Number of rows:100
                Statistics:Num rows: 100 Data size: 111900 Basic stats: COMPLETE Column stats: NONE
-               Select Operator [SEL_26]
+               Select Operator [SEL_22]
                |  outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8"]
                |  Statistics:Num rows: 22096 Data size: 24726006 Basic stats: COMPLETE Column stats: NONE
                |<-Reducer 4 [SIMPLE_EDGE]
-                  Reduce Output Operator [RS_25]
+                  Reduce Output Operator [RS_21]
                      key expressions:_col0 (type: string), _col1 (type: string), _col2 (type: decimal(17,2)), _col3 (type: decimal(17,2)), _col4 (type: decimal(17,2)), _col5 (type: decimal(17,2)), _col6 (type: decimal(17,2)), _col7 (type: decimal(17,2)), _col8 (type: decimal(17,2))
                      sort order:+++++++++
                      Statistics:Num rows: 22096 Data size: 24726006 Basic stats: COMPLETE Column stats: NONE
-                     Group By Operator [GBY_23]
+                     Group By Operator [GBY_19]
                      |  aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)","sum(VALUE._col3)","sum(VALUE._col4)","sum(VALUE._col5)","sum(VALUE._col6)"]
                      |  keys:KEY._col0 (type: string), KEY._col1 (type: string)
                      |  outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8"]
                      |  Statistics:Num rows: 22096 Data size: 24726006 Basic stats: COMPLETE Column stats: NONE
                      |<-Reducer 3 [SIMPLE_EDGE]
-                        Reduce Output Operator [RS_22]
+                        Reduce Output Operator [RS_18]
                            key expressions:_col0 (type: string), _col1 (type: string)
                            Map-reduce partition columns:_col0 (type: string), _col1 (type: string)
                            sort order:++
                            Statistics:Num rows: 44193 Data size: 49453132 Basic stats: COMPLETE Column stats: NONE
                            value expressions:_col2 (type: decimal(17,2)), _col3 (type: decimal(17,2)), _col4 (type: decimal(17,2)), _col5 (type: decimal(17,2)), _col6 (type: decimal(17,2)), _col7 (type: decimal(17,2)), _col8 (type: decimal(17,2))
-                           Group By Operator [GBY_21]
+                           Group By Operator [GBY_17]
                               aggregations:["sum(_col2)","sum(_col3)","sum(_col4)","sum(_col5)","sum(_col6)","sum(_col7)","sum(_col8)"]
                               keys:_col0 (type: string), _col1 (type: string)
                               outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8"]
                               Statistics:Num rows: 44193 Data size: 49453132 Basic stats: COMPLETE Column stats: NONE
-                              Select Operator [SEL_19]
+                              Select Operator [SEL_15]
                                  outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8"]
                                  Statistics:Num rows: 44193 Data size: 49453132 Basic stats: COMPLETE Column stats: NONE
-                                 Merge Join Operator [MERGEJOIN_38]
+                                 Merge Join Operator [MERGEJOIN_34]
                                  |  condition map:[{"":"Inner Join 0 to 1"}]
                                  |  keys:{"0":"_col4 (type: int)","1":"_col0 (type: int)"}
                                  |  outputColumnNames:["_col2","_col5","_col7","_col8"]
                                  |  Statistics:Num rows: 44193 Data size: 49453132 Basic stats: COMPLETE Column stats: NONE
                                  |<-Map 7 [SIMPLE_EDGE]
-                                 |  Reduce Output Operator [RS_17]
+                                 |  Reduce Output Operator [RS_13]
                                  |     key expressions:_col0 (type: int)
                                  |     Map-reduce partition columns:_col0 (type: int)
                                  |     sort order:+
@@ -65,26 +65,26 @@ Stage-0
                                  |     Select Operator [SEL_8]
                                  |        outputColumnNames:["_col0","_col1","_col2"]
                                  |        Statistics:Num rows: 852 Data size: 1628138 Basic stats: COMPLETE Column stats: NONE
-                                 |        Filter Operator [FIL_36]
+                                 |        Filter Operator [FIL_32]
                                  |           predicate:((s_gmt_offset = -6) and s_store_sk is not null) (type: boolean)
                                  |           Statistics:Num rows: 852 Data size: 1628138 Basic stats: COMPLETE Column stats: NONE
                                  |           TableScan [TS_6]
                                  |              alias:store
                                  |              Statistics:Num rows: 1704 Data size: 3256276 Basic stats: COMPLETE Column stats: NONE
                                  |<-Reducer 2 [SIMPLE_EDGE]
-                                    Reduce Output Operator [RS_15]
+                                    Reduce Output Operator [RS_12]
                                        key expressions:_col4 (type: int)
                                        Map-reduce partition columns:_col4 (type: int)
                                        sort order:+
                                        Statistics:Num rows: 40176 Data size: 44957392 Basic stats: COMPLETE Column stats: NONE
                                        value expressions:_col2 (type: string), _col5 (type: decimal(7,2))
-                                       Merge Join Operator [MERGEJOIN_37]
+                                       Merge Join Operator [MERGEJOIN_33]
                                        |  condition map:[{"":"Inner Join 0 to 1"}]
                                        |  keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
                                        |  outputColumnNames:["_col2","_col4","_col5"]
                                        |  Statistics:Num rows: 40176 Data size: 44957392 Basic stats: COMPLETE Column stats: NONE
                                        |<-Map 1 [SIMPLE_EDGE]
-                                       |  Reduce Output Operator [RS_10]
+                                       |  Reduce Output Operator [RS_9]
                                        |     key expressions:_col0 (type: int)
                                        |     Map-reduce partition columns:_col0 (type: int)
                                        |     sort order:+
@@ -93,14 +93,14 @@ Stage-0
                                        |     Select Operator [SEL_2]
                                        |        outputColumnNames:["_col0","_col2"]
                                        |        Statistics:Num rows: 36524 Data size: 40870356 Basic stats: COMPLETE Column stats: NONE
-                                       |        Filter Operator [FIL_34]
+                                       |        Filter Operator [FIL_30]
                                        |           predicate:((d_year = 1998) and d_date_sk is not null) (type: boolean)
                                        |           Statistics:Num rows: 36524 Data size: 40870356 Basic stats: COMPLETE Column stats: NONE
                                        |           TableScan [TS_0]
                                        |              alias:date_dim
                                        |              Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
                                        |<-Map 6 [SIMPLE_EDGE]
-                                          Reduce Output Operator [RS_12]
+                                          Reduce Output Operator [RS_10]
                                              key expressions:_col0 (type: int)
                                              Map-reduce partition columns:_col0 (type: int)
                                              sort order:+
@@ -109,7 +109,7 @@ Stage-0
                                              Select Operator [SEL_5]
                                                 outputColumnNames:["_col0","_col1","_col2"]
                                                 Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
-                                                Filter Operator [FIL_35]
+                                                Filter Operator [FIL_31]
                                                    predicate:(ss_sold_date_sk is not null and ss_store_sk is not null) (type: boolean)
                                                    Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
                                                    TableScan [TS_3]

http://git-wip-us.apache.org/repos/asf/hive/blob/6f44fc81/ql/src/test/results/clientpositive/perf/query45.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/query45.q.out b/ql/src/test/results/clientpositive/perf/query45.q.out
index dd14ac4..f55f20c 100644
--- a/ql/src/test/results/clientpositive/perf/query45.q.out
+++ b/ql/src/test/results/clientpositive/perf/query45.q.out
@@ -18,63 +18,63 @@ Stage-0
       limit:100
       Stage-1
          Reducer 7
-         File Output Operator [FS_54]
+         File Output Operator [FS_44]
             compressed:false
             Statistics:Num rows: 100 Data size: 86000 Basic stats: COMPLETE Column stats: NONE
             table:{"input format:":"org.apache.hadoop.mapred.TextInputFormat","output format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"}
-            Limit [LIM_53]
+            Limit [LIM_43]
                Number of rows:100
                Statistics:Num rows: 100 Data size: 86000 Basic stats: COMPLETE Column stats: NONE
-               Select Operator [SEL_52]
+               Select Operator [SEL_42]
                |  outputColumnNames:["_col0","_col1","_col2"]
                |  Statistics:Num rows: 58564004 Data size: 50366227250 Basic stats: COMPLETE Column stats: NONE
                |<-Reducer 6 [SIMPLE_EDGE]
-                  Reduce Output Operator [RS_51]
+                  Reduce Output Operator [RS_41]
                      key expressions:_col0 (type: string), _col1 (type: string)
                      sort order:++
                      Statistics:Num rows: 58564004 Data size: 50366227250 Basic stats: COMPLETE Column stats: NONE
                      value expressions:_col2 (type: decimal(17,2))
-                     Select Operator [SEL_50]
+                     Select Operator [SEL_40]
                         outputColumnNames:["_col0","_col1","_col2"]
                         Statistics:Num rows: 58564004 Data size: 50366227250 Basic stats: COMPLETE Column stats: NONE
-                        Group By Operator [GBY_49]
+                        Group By Operator [GBY_39]
                         |  aggregations:["sum(VALUE._col0)"]
                         |  keys:KEY._col0 (type: string), KEY._col1 (type: string)
                         |  outputColumnNames:["_col0","_col1","_col2"]
                         |  Statistics:Num rows: 58564004 Data size: 50366227250 Basic stats: COMPLETE Column stats: NONE
                         |<-Reducer 5 [SIMPLE_EDGE]
-                           Reduce Output Operator [RS_48]
+                           Reduce Output Operator [RS_38]
                               key expressions:_col0 (type: string), _col1 (type: string)
                               Map-reduce partition columns:_col0 (type: string), _col1 (type: string)
                               sort order:++
                               Statistics:Num rows: 117128008 Data size: 100732454500 Basic stats: COMPLETE Column stats: NONE
                               value expressions:_col2 (type: decimal(17,2))
-                              Group By Operator [GBY_47]
+                              Group By Operator [GBY_37]
                                  aggregations:["sum(_col3)"]
                                  keys:_col7 (type: string), _col8 (type: string)
                                  outputColumnNames:["_col0","_col1","_col2"]
                                  Statistics:Num rows: 117128008 Data size: 100732454500 Basic stats: COMPLETE Column stats: NONE
-                                 Select Operator [SEL_46]
+                                 Select Operator [SEL_36]
                                     outputColumnNames:["_col7","_col8","_col3"]
                                     Statistics:Num rows: 117128008 Data size: 100732454500 Basic stats: COMPLETE Column stats: NONE
-                                    Merge Join Operator [MERGEJOIN_82]
+                                    Merge Join Operator [MERGEJOIN_72]
                                     |  condition map:[{"":"Inner Join 0 to 1"}]
                                     |  keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
                                     |  outputColumnNames:["_col3","_col7","_col8"]
                                     |  Statistics:Num rows: 117128008 Data size: 100732454500 Basic stats: COMPLETE Column stats: NONE
                                     |<-Reducer 12 [SIMPLE_EDGE]
-                                    |  Reduce Output Operator [RS_44]
+                                    |  Reduce Output Operator [RS_34]
                                     |     key expressions:_col0 (type: int)
                                     |     Map-reduce partition columns:_col0 (type: int)
                                     |     sort order:+
                                     |     Statistics:Num rows: 508200 Data size: 729916518 Basic stats: COMPLETE Column stats: NONE
-                                    |     Merge Join Operator [MERGEJOIN_81]
+                                    |     Merge Join Operator [MERGEJOIN_71]
                                     |     |  condition map:[{"":"Left Semi Join 0 to 1"}]
                                     |     |  keys:{"0":"_col1 (type: string)","1":"_col0 (type: string)"}
                                     |     |  outputColumnNames:["_col0"]
                                     |     |  Statistics:Num rows: 508200 Data size: 729916518 Basic stats: COMPLETE Column stats: NONE
                                     |     |<-Map 11 [SIMPLE_EDGE]
-                                    |     |  Reduce Output Operator [RS_21]
+                                    |     |  Reduce Output Operator [RS_20]
                                     |     |     key expressions:_col1 (type: string)
                                     |     |     Map-reduce partition columns:_col1 (type: string)
                                     |     |     sort order:+
@@ -83,14 +83,14 @@ Stage-0
                                     |     |     Select Operator [SEL_14]
                                     |     |        outputColumnNames:["_col0","_col1"]
                                     |     |        Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
-                                    |     |        Filter Operator [FIL_76]
+                                    |     |        Filter Operator [FIL_66]
                                     |     |           predicate:(i_item_sk is not null and i_item_id is not null) (type: boolean)
                                     |     |           Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
                                     |     |           TableScan [TS_12]
                                     |     |              alias:item
                                     |     |              Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
                                     |     |<-Map 13 [SIMPLE_EDGE]
-                                    |        Reduce Output Operator [RS_23]
+                                    |        Reduce Output Operator [RS_21]
                                     |           key expressions:_col0 (type: string)
                                     |           Map-reduce partition columns:_col0 (type: string)
                                     |           sort order:+
@@ -102,26 +102,26 @@ Stage-0
                                     |              Select Operator [SEL_17]
                                     |                 outputColumnNames:["_col0"]
                                     |                 Statistics:Num rows: 231000 Data size: 331780228 Basic stats: COMPLETE Column stats: NONE
-                                    |                 Filter Operator [FIL_77]
+                                    |                 Filter Operator [FIL_67]
                                     |                    predicate:((i_item_sk) IN (2, 3, 5, 7, 11, 13, 17, 19, 23, 29) and i_item_id is not null) (type: boolean)
                                     |                    Statistics:Num rows: 231000 Data size: 331780228 Basic stats: COMPLETE Column stats: NONE
                                     |                    TableScan [TS_15]
                                     |                       alias:item
                                     |                       Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
                                     |<-Reducer 4 [SIMPLE_EDGE]
-                                       Reduce Output Operator [RS_42]
+                                       Reduce Output Operator [RS_33]
                                           key expressions:_col1 (type: int)
                                           Map-reduce partition columns:_col1 (type: int)
                                           sort order:+
                                           Statistics:Num rows: 106480005 Data size: 91574956652 Basic stats: COMPLETE Column stats: NONE
                                           value expressions:_col3 (type: decimal(7,2)), _col7 (type: string), _col8 (type: string)
-                                          Merge Join Operator [MERGEJOIN_80]
+                                          Merge Join Operator [MERGEJOIN_70]
                                           |  condition map:[{"":"Inner Join 0 to 1"}]
                                           |  keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
                                           |  outputColumnNames:["_col1","_col3","_col7","_col8"]
                                           |  Statistics:Num rows: 106480005 Data size: 91574956652 Basic stats: COMPLETE Column stats: NONE
                                           |<-Map 10 [SIMPLE_EDGE]
-                                          |  Reduce Output Operator [RS_39]
+                                          |  Reduce Output Operator [RS_31]
                                           |     key expressions:_col0 (type: int)
                                           |     Map-reduce partition columns:_col0 (type: int)
                                           |     sort order:+
@@ -129,26 +129,26 @@ Stage-0
                                           |     Select Operator [SEL_11]
                                           |        outputColumnNames:["_col0"]
                                           |        Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
-                                          |        Filter Operator [FIL_75]
+                                          |        Filter Operator [FIL_65]
                                           |           predicate:(((d_qoy = 2) and (d_year = 2000)) and d_date_sk is not null) (type: boolean)
                                           |           Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
                                           |           TableScan [TS_9]
                                           |              alias:date_dim
                                           |              Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
                                           |<-Reducer 3 [SIMPLE_EDGE]
-                                             Reduce Output Operator [RS_37]
+                                             Reduce Output Operator [RS_30]
                                                 key expressions:_col0 (type: int)
                                                 Map-reduce partition columns:_col0 (type: int)
                                                 sort order:+
                                                 Statistics:Num rows: 96800003 Data size: 83249958789 Basic stats: COMPLETE Column stats: NONE
                                                 value expressions:_col1 (type: int), _col3 (type: decimal(7,2)), _col7 (type: string), _col8 (type: string)
-                                                Merge Join Operator [MERGEJOIN_79]
+                                                Merge Join Operator [MERGEJOIN_69]
                                                 |  condition map:[{"":"Inner Join 0 to 1"}]
                                                 |  keys:{"0":"_col5 (type: int)","1":"_col0 (type: int)"}
                                                 |  outputColumnNames:["_col0","_col1","_col3","_col7","_col8"]
                                                 |  Statistics:Num rows: 96800003 Data size: 83249958789 Basic stats: COMPLETE Column stats: NONE
                                                 |<-Map 9 [SIMPLE_EDGE]
-                                                |  Reduce Output Operator [RS_34]
+                                                |  Reduce Output Operator [RS_28]
                                                 |     key expressions:_col0 (type: int)
                                                 |     Map-reduce partition columns:_col0 (type: int)
                                                 |     sort order:+
@@ -157,26 +157,26 @@ Stage-0
                                                 |     Select Operator [SEL_8]
                                                 |        outputColumnNames:["_col0","_col1","_col2"]
                                                 |        Statistics:Num rows: 40000000 Data size: 40595195284 Basic stats: COMPLETE Column stats: NONE
-                                                |        Filter Operator [FIL_74]
+                                                |        Filter Operator [FIL_64]
                                                 |           predicate:ca_address_sk is not null (type: boolean)
                                                 |           Statistics:Num rows: 40000000 Data size: 40595195284 Basic stats: COMPLETE Column stats: NONE
                                                 |           TableScan [TS_6]
                                                 |              alias:customer_address
                                                 |              Statistics:Num rows: 40000000 Data size: 40595195284 Basic stats: COMPLETE Column stats: NONE
                                                 |<-Reducer 2 [SIMPLE_EDGE]
-                                                   Reduce Output Operator [RS_32]
+                                                   Reduce Output Operator [RS_27]
                                                       key expressions:_col5 (type: int)
                                                       Map-reduce partition columns:_col5 (type: int)
                                                       sort order:+
                                                       Statistics:Num rows: 88000001 Data size: 75681779077 Basic stats: COMPLETE Column stats: NONE
                                                       value expressions:_col0 (type: int), _col1 (type: int), _col3 (type: decimal(7,2))
-                                                      Merge Join Operator [MERGEJOIN_78]
+                                                      Merge Join Operator [MERGEJOIN_68]
                                                       |  condition map:[{"":"Inner Join 0 to 1"}]
                                                       |  keys:{"0":"_col2 (type: int)","1":"_col0 (type: int)"}
                                                       |  outputColumnNames:["_col0","_col1","_col3","_col5"]
                                                       |  Statistics:Num rows: 88000001 Data size: 75681779077 Basic stats: COMPLETE Column stats: NONE
                                                       |<-Map 1 [SIMPLE_EDGE]
-                                                      |  Reduce Output Operator [RS_27]
+                                                      |  Reduce Output Operator [RS_24]
                                                       |     key expressions:_col2 (type: int)
                                                       |     Map-reduce partition columns:_col2 (type: int)
                                                       |     sort order:+
@@ -185,14 +185,14 @@ Stage-0
                                                       |     Select Operator [SEL_2]
                                                       |        outputColumnNames:["_col0","_col1","_col2","_col3"]
                                                       |        Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
-                                                      |        Filter Operator [FIL_72]
+                                                      |        Filter Operator [FIL_62]
                                                       |           predicate:((ws_bill_customer_sk is not null and ws_sold_date_sk is not null) and ws_item_sk is not null) (type: boolean)
                                                       |           Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
                                                       |           TableScan [TS_0]
                                                       |              alias:web_sales
                                                       |              Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
                                                       |<-Map 8 [SIMPLE_EDGE]
-                                                         Reduce Output Operator [RS_29]
+                                                         Reduce Output Operator [RS_25]
                                                             key expressions:_col0 (type: int)
                                                             Map-reduce partition columns:_col0 (type: int)
                                                             sort order:+
@@ -201,7 +201,7 @@ Stage-0
                                                             Select Operator [SEL_5]
                                                                outputColumnNames:["_col0","_col1"]
                                                                Statistics:Num rows: 80000000 Data size: 68801615852 Basic stats: COMPLETE Column stats: NONE
-                                                               Filter Operator [FIL_73]
+                                                               Filter Operator [FIL_63]
                                                                   predicate:(c_customer_sk is not null and c_current_addr_sk is not null) (type: boolean)
                                                                   Statistics:Num rows: 80000000 Data size: 68801615852 Basic stats: COMPLETE Column stats: NONE
                                                                   TableScan [TS_3]

http://git-wip-us.apache.org/repos/asf/hive/blob/6f44fc81/ql/src/test/results/clientpositive/perf/query46.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/query46.q.out b/ql/src/test/results/clientpositive/perf/query46.q.out
index 5d11fd7..0ded912 100644
--- a/ql/src/test/results/clientpositive/perf/query46.q.out
+++ b/ql/src/test/results/clientpositive/perf/query46.q.out
@@ -19,114 +19,114 @@ Stage-0
       limit:100
       Stage-1
          Reducer 9
-         File Output Operator [FS_62]
+         File Output Operator [FS_50]
             compressed:false
             Statistics:Num rows: 100 Data size: 86000 Basic stats: COMPLETE Column stats: NONE
             table:{"input format:":"org.apache.hadoop.mapred.TextInputFormat","output format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"}
-            Limit [LIM_61]
+            Limit [LIM_49]
                Number of rows:100
                Statistics:Num rows: 100 Data size: 86000 Basic stats: COMPLETE Column stats: NONE
-               Select Operator [SEL_60]
+               Select Operator [SEL_48]
                |  outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
                |  Statistics:Num rows: 96800003 Data size: 83249958789 Basic stats: COMPLETE Column stats: NONE
                |<-Reducer 8 [SIMPLE_EDGE]
-                  Reduce Output Operator [RS_59]
+                  Reduce Output Operator [RS_47]
                      key expressions:_col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: int)
                      sort order:+++++
                      Statistics:Num rows: 96800003 Data size: 83249958789 Basic stats: COMPLETE Column stats: NONE
                      value expressions:_col5 (type: decimal(17,2)), _col6 (type: decimal(17,2))
-                     Select Operator [SEL_58]
+                     Select Operator [SEL_46]
                         outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
                         Statistics:Num rows: 96800003 Data size: 83249958789 Basic stats: COMPLETE Column stats: NONE
-                        Filter Operator [FIL_90]
+                        Filter Operator [FIL_45]
                            predicate:(_col10 <> _col2) (type: boolean)
                            Statistics:Num rows: 96800003 Data size: 83249958789 Basic stats: COMPLETE Column stats: NONE
-                           Merge Join Operator [MERGEJOIN_103]
+                           Merge Join Operator [MERGEJOIN_90]
                            |  condition map:[{"":"Inner Join 0 to 1"}]
                            |  keys:{"0":"_col6 (type: int)","1":"_col0 (type: int)"}
                            |  outputColumnNames:["_col0","_col2","_col3","_col4","_col7","_col8","_col10"]
                            |  Statistics:Num rows: 96800003 Data size: 83249958789 Basic stats: COMPLETE Column stats: NONE
                            |<-Map 15 [SIMPLE_EDGE]
-                           |  Reduce Output Operator [RS_55]
+                           |  Reduce Output Operator [RS_43]
                            |     key expressions:_col0 (type: int)
                            |     Map-reduce partition columns:_col0 (type: int)
                            |     sort order:+
                            |     Statistics:Num rows: 40000000 Data size: 40595195284 Basic stats: COMPLETE Column stats: NONE
                            |     value expressions:_col1 (type: string)
-                           |     Select Operator [SEL_46]
+                           |     Select Operator [SEL_38]
                            |        outputColumnNames:["_col0","_col1"]
                            |        Statistics:Num rows: 40000000 Data size: 40595195284 Basic stats: COMPLETE Column stats: NONE
-                           |        Filter Operator [FIL_97]
+                           |        Filter Operator [FIL_84]
                            |           predicate:ca_address_sk is not null (type: boolean)
                            |           Statistics:Num rows: 40000000 Data size: 40595195284 Basic stats: COMPLETE Column stats: NONE
-                           |           TableScan [TS_44]
+                           |           TableScan [TS_36]
                            |              alias:customer_address
                            |              Statistics:Num rows: 40000000 Data size: 40595195284 Basic stats: COMPLETE Column stats: NONE
                            |<-Reducer 7 [SIMPLE_EDGE]
-                              Reduce Output Operator [RS_53]
+                              Reduce Output Operator [RS_42]
                                  key expressions:_col6 (type: int)
                                  Map-reduce partition columns:_col6 (type: int)
                                  sort order:+
                                  Statistics:Num rows: 88000001 Data size: 75681779077 Basic stats: COMPLETE Column stats: NONE
                                  value expressions:_col0 (type: int), _col2 (type: string), _col3 (type: decimal(17,2)), _col4 (type: decimal(17,2)), _col7 (type: string), _col8 (type: string)
-                                 Merge Join Operator [MERGEJOIN_102]
+                                 Merge Join Operator [MERGEJOIN_89]
                                  |  condition map:[{"":"Inner Join 0 to 1"}]
                                  |  keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
                                  |  outputColumnNames:["_col0","_col2","_col3","_col4","_col6","_col7","_col8"]
                                  |  Statistics:Num rows: 88000001 Data size: 75681779077 Basic stats: COMPLETE Column stats: NONE
                                  |<-Map 14 [SIMPLE_EDGE]
-                                 |  Reduce Output Operator [RS_50]
+                                 |  Reduce Output Operator [RS_40]
                                  |     key expressions:_col0 (type: int)
                                  |     Map-reduce partition columns:_col0 (type: int)
                                  |     sort order:+
                                  |     Statistics:Num rows: 80000000 Data size: 68801615852 Basic stats: COMPLETE Column stats: NONE
                                  |     value expressions:_col1 (type: int), _col2 (type: string), _col3 (type: string)
-                                 |     Select Operator [SEL_43]
+                                 |     Select Operator [SEL_35]
                                  |        outputColumnNames:["_col0","_col1","_col2","_col3"]
                                  |        Statistics:Num rows: 80000000 Data size: 68801615852 Basic stats: COMPLETE Column stats: NONE
-                                 |        Filter Operator [FIL_96]
+                                 |        Filter Operator [FIL_83]
                                  |           predicate:(c_customer_sk is not null and c_current_addr_sk is not null) (type: boolean)
                                  |           Statistics:Num rows: 80000000 Data size: 68801615852 Basic stats: COMPLETE Column stats: NONE
-                                 |           TableScan [TS_41]
+                                 |           TableScan [TS_33]
                                  |              alias:customer
                                  |              Statistics:Num rows: 80000000 Data size: 68801615852 Basic stats: COMPLETE Column stats: NONE
                                  |<-Reducer 6 [SIMPLE_EDGE]
-                                    Reduce Output Operator [RS_48]
+                                    Reduce Output Operator [RS_39]
                                        key expressions:_col1 (type: int)
                                        Map-reduce partition columns:_col1 (type: int)
                                        sort order:+
                                        Statistics:Num rows: 22000000 Data size: 22327357890 Basic stats: COMPLETE Column stats: NONE
                                        value expressions:_col0 (type: int), _col2 (type: string), _col3 (type: decimal(17,2)), _col4 (type: decimal(17,2))
-                                       Select Operator [SEL_39]
+                                       Select Operator [SEL_31]
                                           outputColumnNames:["_col0","_col1","_col2","_col3","_col4"]
                                           Statistics:Num rows: 22000000 Data size: 22327357890 Basic stats: COMPLETE Column stats: NONE
-                                          Group By Operator [GBY_38]
+                                          Group By Operator [GBY_30]
                                           |  aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"]
                                           |  keys:KEY._col0 (type: int), KEY._col1 (type: int), KEY._col2 (type: int), KEY._col3 (type: string)
                                           |  outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
                                           |  Statistics:Num rows: 22000000 Data size: 22327357890 Basic stats: COMPLETE Column stats: NONE
                                           |<-Reducer 5 [SIMPLE_EDGE]
-                                             Reduce Output Operator [RS_37]
+                                             Reduce Output Operator [RS_29]
                                                 key expressions:_col0 (type: int), _col1 (type: int), _col2 (type: int), _col3 (type: string)
                                                 Map-reduce partition columns:_col0 (type: int), _col1 (type: int), _col2 (type: int), _col3 (type: string)
                                                 sort order:++++
                                                 Statistics:Num rows: 44000000 Data size: 44654715780 Basic stats: COMPLETE Column stats: NONE
                                                 value expressions:_col4 (type: decimal(17,2)), _col5 (type: decimal(17,2))
-                                                Group By Operator [GBY_36]
+                                                Group By Operator [GBY_28]
                                                    aggregations:["sum(_col6)","sum(_col7)"]
                                                    keys:_col1 (type: int), _col3 (type: int), _col5 (type: int), _col17 (type: string)
                                                    outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
                                                    Statistics:Num rows: 44000000 Data size: 44654715780 Basic stats: COMPLETE Column stats: NONE
-                                                   Select Operator [SEL_35]
+                                                   Select Operator [SEL_27]
                                                       outputColumnNames:["_col1","_col3","_col5","_col17","_col6","_col7"]
                                                       Statistics:Num rows: 44000000 Data size: 44654715780 Basic stats: COMPLETE Column stats: NONE
-                                                      Merge Join Operator [MERGEJOIN_101]
+                                                      Merge Join Operator [MERGEJOIN_88]
                                                       |  condition map:[{"":"Inner Join 0 to 1"}]
                                                       |  keys:{"0":"_col3 (type: int)","1":"_col0 (type: int)"}
                                                       |  outputColumnNames:["_col1","_col3","_col5","_col6","_col7","_col17"]
                                                       |  Statistics:Num rows: 44000000 Data size: 44654715780 Basic stats: COMPLETE Column stats: NONE
                                                       |<-Map 13 [SIMPLE_EDGE]
-                                                      |  Reduce Output Operator [RS_33]
+                                                      |  Reduce Output Operator [RS_25]
                                                       |     key expressions:_col0 (type: int)
                                                       |     Map-reduce partition columns:_col0 (type: int)
                                                       |     sort order:+
@@ -135,26 +135,26 @@ Stage-0
                                                       |     Select Operator [SEL_14]
                                                       |        outputColumnNames:["_col0","_col1"]
                                                       |        Statistics:Num rows: 40000000 Data size: 40595195284 Basic stats: COMPLETE Column stats: NONE
-                                                      |        Filter Operator [FIL_95]
+                                                      |        Filter Operator [FIL_82]
                                                       |           predicate:ca_address_sk is not null (type: boolean)
                                                       |           Statistics:Num rows: 40000000 Data size: 40595195284 Basic stats: COMPLETE Column stats: NONE
                                                       |           TableScan [TS_12]
                                                       |              alias:customer_address
                                                       |              Statistics:Num rows: 40000000 Data size: 40595195284 Basic stats: COMPLETE Column stats: NONE
                                                       |<-Reducer 4 [SIMPLE_EDGE]
-                                                         Reduce Output Operator [RS_31]
+                                                         Reduce Output Operator [RS_24]
                                                             key expressions:_col3 (type: int)
                                                             Map-reduce partition columns:_col3 (type: int)
                                                             sort order:+
                                                             Statistics:Num rows: 24305 Data size: 27199223 Basic stats: COMPLETE Column stats: NONE
                                                             value expressions:_col1 (type: int), _col5 (type: int), _col6 (type: decimal(7,2)), _col7 (type: decimal(7,2))
-                                                            Merge Join Operator [MERGEJOIN_100]
+                                                            Merge Join Operator [MERGEJOIN_87]
                                                             |  condition map:[{"":"Inner Join 0 to 1"}]
                                                             |  keys:{"0":"_col2 (type: int)","1":"_col0 (type: int)"}
                                                             |  outputColumnNames:["_col1","_col3","_col5","_col6","_col7"]
                                                             |  Statistics:Num rows: 24305 Data size: 27199223 Basic stats: COMPLETE Column stats: NONE
                                                             |<-Map 12 [SIMPLE_EDGE]
-                                                            |  Reduce Output Operator [RS_28]
+                                                            |  Reduce Output Operator [RS_22]
                                                             |     key expressions:_col0 (type: int)
                                                             |     Map-reduce partition columns:_col0 (type: int)
                                                             |     sort order:+
@@ -162,26 +162,26 @@ Stage-0
                                                             |     Select Operator [SEL_11]
                                                             |        outputColumnNames:["_col0"]
                                                             |        Statistics:Num rows: 7200 Data size: 770400 Basic stats: COMPLETE Column stats: NONE
-                                                            |        Filter Operator [FIL_94]
+                                                            |        Filter Operator [FIL_81]
                                                             |           predicate:(((hd_dep_count = 4) or (hd_vehicle_count = 2)) and hd_demo_sk is not null) (type: boolean)
                                                             |           Statistics:Num rows: 7200 Data size: 770400 Basic stats: COMPLETE Column stats: NONE
                                                             |           TableScan [TS_9]
                                                             |              alias:household_demographics
                                                             |              Statistics:Num rows: 7200 Data size: 770400 Basic stats: COMPLETE Column stats: NONE
                                                             |<-Reducer 3 [SIMPLE_EDGE]
-                                                               Reduce Output Operator [RS_26]
+                                                               Reduce Output Operator [RS_21]
                                                                   key expressions:_col2 (type: int)
                                                                   Map-reduce partition columns:_col2 (type: int)
                                                                   sort order:+
                                                                   Statistics:Num rows: 22096 Data size: 24726566 Basic stats: COMPLETE Column stats: NONE
                                                                   value expressions:_col1 (type: int), _col3 (type: int), _col5 (type: int), _col6 (type: decimal(7,2)), _col7 (type: decimal(7,2))
-                                                                  Merge Join Operator [MERGEJOIN_99]
+                                                                  Merge Join Operator [MERGEJOIN_86]
                                                                   |  condition map:[{"":"Inner Join 0 to 1"}]
                                                                   |  keys:{"0":"_col4 (type: int)","1":"_col0 (type: int)"}
                                                                   |  outputColumnNames:["_col1","_col2","_col3","_col5","_col6","_col7"]
                                                                   |  Statistics:Num rows: 22096 Data size: 24726566 Basic stats: COMPLETE Column stats: NONE
                                                                   |<-Map 11 [SIMPLE_EDGE]
-                                                                  |  Reduce Output Operator [RS_23]
+                                                                  |  Reduce Output Operator [RS_19]
                                                                   |     key expressions:_col0 (type: int)
                                                                   |     Map-reduce partition columns:_col0 (type: int)
                                                                   |     sort order:+
@@ -189,26 +189,26 @@ Stage-0
                                                                   |     Select Operator [SEL_8]
                                                                   |        outputColumnNames:["_col0"]
                                                                   |        Statistics:Num rows: 852 Data size: 1628138 Basic stats: COMPLETE Column stats: NONE
-                                                                  |        Filter Operator [FIL_93]
+                                                                  |        Filter Operator [FIL_80]
                                                                   |           predicate:((s_city) IN ('Rosedale', 'Bethlehem', 'Clinton', 'Clifton', 'Springfield') and s_store_sk is not null) (type: boolean)
                                                                   |           Statistics:Num rows: 852 Data size: 1628138 Basic stats: COMPLETE Column stats: NONE
                                                                   |           TableScan [TS_6]
                                                                   |              alias:store
                                                                   |              Statistics:Num rows: 1704 Data size: 3256276 Basic stats: COMPLETE Column stats: NONE
                                                                   |<-Reducer 2 [SIMPLE_EDGE]
-                                                                     Reduce Output Operator [RS_21]
+                                                                     Reduce Output Operator [RS_18]
                                                                         key expressions:_col4 (type: int)
                                                                         Map-reduce partition columns:_col4 (type: int)
                                                                         sort order:+
                                                                         Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
                                                                         value expressions:_col1 (type: int), _col2 (type: int), _col3 (type: int), _col5 (type: int), _col6 (type: decimal(7,2)), _col7 (type: decimal(7,2))
-                                                                        Merge Join Operator [MERGEJOIN_98]
+                                                                        Merge Join Operator [MERGEJOIN_85]
                                                                         |  condition map:[{"":"Inner Join 0 to 1"}]
                                                                         |  keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
                                                                         |  outputColumnNames:["_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
                                                                         |  Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
                                                                         |<-Map 1 [SIMPLE_EDGE]
-                                                                        |  Reduce Output Operator [RS_16]
+                                                                        |  Reduce Output Operator [RS_15]
                                                                         |     key expressions:_col0 (type: int)
                                                                         |     Map-reduce partition columns:_col0 (type: int)
                                                                         |     sort order:+
@@ -217,14 +217,14 @@ Stage-0
                                                                         |     Select Operator [SEL_2]
                                                                         |        outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
                                                                         |        Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
-                                                                        |        Filter Operator [FIL_91]
+                                                                        |        Filter Operator [FIL_78]
                                                                         |           predicate:((((ss_sold_date_sk is not null and ss_store_sk is not null) and ss_hdemo_sk is not null) and ss_addr_sk is not null) and ss_customer_sk is not null) (type: boolean)
                                                                         |           Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
                                                                         |           TableScan [TS_0]
                                                                         |              alias:store_sales
                                                                         |              Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
                                                                         |<-Map 10 [SIMPLE_EDGE]
-                                                                           Reduce Output Operator [RS_18]
+                                                                           Reduce Output Operator [RS_16]
                                                                               key expressions:_col0 (type: int)
                                                                               Map-reduce partition columns:_col0 (type: int)
                                                                               sort order:+
@@ -232,7 +232,7 @@ Stage-0
                                                                               Select Operator [SEL_5]
                                                                                  outputColumnNames:["_col0"]
                                                                                  Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
-                                                                                 Filter Operator [FIL_92]
+                                                                                 Filter Operator [FIL_79]
                                                                                     predicate:(((d_year) IN (1998, 1999, 2000) and (d_dow) IN (6, 0)) and d_date_sk is not null) (type: boolean)
                                                                                     Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
                                                                                     TableScan [TS_3]

http://git-wip-us.apache.org/repos/asf/hive/blob/6f44fc81/ql/src/test/results/clientpositive/perf/query48.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/query48.q.out b/ql/src/test/results/clientpositive/perf/query48.q.out
index d15d578..40b76f0 100644
--- a/ql/src/test/results/clientpositive/perf/query48.q.out
+++ b/ql/src/test/results/clientpositive/perf/query48.q.out
@@ -16,63 +16,63 @@ Stage-0
       limit:-1
       Stage-1
          Reducer 6
-         File Output Operator [FS_42]
+         File Output Operator [FS_34]
             compressed:false
             Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
             table:{"input format:":"org.apache.hadoop.mapred.TextInputFormat","output format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"}
-            Group By Operator [GBY_40]
+            Group By Operator [GBY_32]
             |  aggregations:["sum(VALUE._col0)"]
             |  outputColumnNames:["_col0"]
             |  Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
             |<-Reducer 5 [SIMPLE_EDGE]
-               Reduce Output Operator [RS_39]
+               Reduce Output Operator [RS_31]
                   sort order:
                   Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
                   value expressions:_col0 (type: bigint)
-                  Group By Operator [GBY_38]
+                  Group By Operator [GBY_30]
                      aggregations:["sum(_col4)"]
                      outputColumnNames:["_col0"]
                      Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
-                     Merge Join Operator [MERGEJOIN_66]
+                     Merge Join Operator [MERGEJOIN_57]
                      |  condition map:[{"":"Inner Join 0 to 1"}]
                      |  keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
                      |  outputColumnNames:["_col4"]
                      |  Statistics:Num rows: 18150000 Data size: 18420070657 Basic stats: COMPLETE Column stats: NONE
                      |<-Map 10 [SIMPLE_EDGE]
-                     |  Reduce Output Operator [RS_35]
+                     |  Reduce Output Operator [RS_27]
                      |     key expressions:_col0 (type: int)
                      |     Map-reduce partition columns:_col0 (type: int)
                      |     sort order:+
                      |     Statistics:Num rows: 36524 Data size: 40870356 Basic stats: COMPLETE Column stats: NONE
-                     |     Select Operator [SEL_31]
+                     |     Select Operator [SEL_25]
                      |        outputColumnNames:["_col0"]
                      |        Statistics:Num rows: 36524 Data size: 40870356 Basic stats: COMPLETE Column stats: NONE
-                     |        Filter Operator [FIL_62]
+                     |        Filter Operator [FIL_53]
                      |           predicate:((d_year = 1998) and d_date_sk is not null) (type: boolean)
                      |           Statistics:Num rows: 36524 Data size: 40870356 Basic stats: COMPLETE Column stats: NONE
-                     |           TableScan [TS_29]
+                     |           TableScan [TS_23]
                      |              alias:date_dim
                      |              Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
                      |<-Reducer 4 [SIMPLE_EDGE]
-                        Reduce Output Operator [RS_33]
+                        Reduce Output Operator [RS_26]
                            key expressions:_col0 (type: int)
                            Map-reduce partition columns:_col0 (type: int)
                            sort order:+
                            Statistics:Num rows: 16500000 Data size: 16745518417 Basic stats: COMPLETE Column stats: NONE
                            value expressions:_col4 (type: int)
-                           Select Operator [SEL_28]
+                           Select Operator [SEL_22]
                               outputColumnNames:["_col0","_col4"]
                               Statistics:Num rows: 16500000 Data size: 16745518417 Basic stats: COMPLETE Column stats: NONE
-                              Filter Operator [FIL_57]
+                              Filter Operator [FIL_21]
                                  predicate:(((_col12) IN ('KY', 'GA', 'NM') and _col6 BETWEEN 0 AND 2000) or ((_col12) IN ('MT', 'OR', 'IN') and _col6 BETWEEN 150 AND 3000) or ((_col12) IN ('WI', 'MO', 'WV') and _col6 BETWEEN 50 AND 25000)) (type: boolean)
                                  Statistics:Num rows: 16500000 Data size: 16745518417 Basic stats: COMPLETE Column stats: NONE
-                                 Merge Join Operator [MERGEJOIN_65]
+                                 Merge Join Operator [MERGEJOIN_56]
                                  |  condition map:[{"":"Inner Join 0 to 1"}]
                                  |  keys:{"0":"_col2 (type: int)","1":"_col0 (type: int)"}
                                  |  outputColumnNames:["_col0","_col4","_col6","_col12"]
                                  |  Statistics:Num rows: 22000000 Data size: 22327357890 Basic stats: COMPLETE Column stats: NONE
                                  |<-Map 9 [SIMPLE_EDGE]
-                                 |  Reduce Output Operator [RS_25]
+                                 |  Reduce Output Operator [RS_19]
                                  |     key expressions:_col0 (type: int)
                                  |     Map-reduce partition columns:_col0 (type: int)
                                  |     sort order:+
@@ -81,26 +81,26 @@ Stage-0
                                  |     Select Operator [SEL_11]
                                  |        outputColumnNames:["_col0","_col1"]
                                  |        Statistics:Num rows: 20000000 Data size: 20297597642 Basic stats: COMPLETE Column stats: NONE
-                                 |        Filter Operator [FIL_61]
+                                 |        Filter Operator [FIL_52]
                                  |           predicate:((((ca_state) IN ('KY', 'GA', 'NM') or (ca_state) IN ('MT', 'OR', 'IN') or (ca_state) IN ('WI', 'MO', 'WV')) and (ca_country = 'United States')) and ca_address_sk is not null) (type: boolean)
                                  |           Statistics:Num rows: 20000000 Data size: 20297597642 Basic stats: COMPLETE Column stats: NONE
                                  |           TableScan [TS_9]
                                  |              alias:customer_address
                                  |              Statistics:Num rows: 40000000 Data size: 40595195284 Basic stats: COMPLETE Column stats: NONE
                                  |<-Reducer 3 [SIMPLE_EDGE]
-                                    Reduce Output Operator [RS_23]
+                                    Reduce Output Operator [RS_18]
                                        key expressions:_col2 (type: int)
                                        Map-reduce partition columns:_col2 (type: int)
                                        sort order:+
                                        Statistics:Num rows: 5445 Data size: 1972040 Basic stats: COMPLETE Column stats: NONE
                                        value expressions:_col0 (type: int), _col4 (type: int), _col6 (type: decimal(7,2))
-                                       Merge Join Operator [MERGEJOIN_64]
+                                       Merge Join Operator [MERGEJOIN_55]
                                        |  condition map:[{"":"Inner Join 0 to 1"}]
                                        |  keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
                                        |  outputColumnNames:["_col0","_col2","_col4","_col6"]
                                        |  Statistics:Num rows: 5445 Data size: 1972040 Basic stats: COMPLETE Column stats: NONE
                                        |<-Map 8 [SIMPLE_EDGE]
-                                       |  Reduce Output Operator [RS_20]
+                                       |  Reduce Output Operator [RS_16]
                                        |     key expressions:_col0 (type: int)
                                        |     Map-reduce partition columns:_col0 (type: int)
                                        |     sort order:+
@@ -108,26 +108,26 @@ Stage-0
                                        |     Select Operator [SEL_8]
                                        |        outputColumnNames:["_col0"]
                                        |        Statistics:Num rows: 4950 Data size: 1792764 Basic stats: COMPLETE Column stats: NONE
-                                       |        Filter Operator [FIL_60]
+                                       |        Filter Operator [FIL_51]
                                        |           predicate:(((cd_education_status = '4 yr Degree') and (cd_marital_status = 'M')) and cd_demo_sk is not null) (type: boolean)
                                        |           Statistics:Num rows: 4950 Data size: 1792764 Basic stats: COMPLETE Column stats: NONE
                                        |           TableScan [TS_6]
                                        |              alias:customer_demographics
                                        |              Statistics:Num rows: 19800 Data size: 7171059 Basic stats: COMPLETE Column stats: NONE
                                        |<-Reducer 2 [SIMPLE_EDGE]
-                                          Reduce Output Operator [RS_18]
+                                          Reduce Output Operator [RS_15]
                                              key expressions:_col1 (type: int)
                                              Map-reduce partition columns:_col1 (type: int)
                                              sort order:+
                                              Statistics:Num rows: 1874 Data size: 3581903 Basic stats: COMPLETE Column stats: NONE
                                              value expressions:_col0 (type: int), _col2 (type: int), _col4 (type: int), _col6 (type: decimal(7,2))
-                                             Merge Join Operator [MERGEJOIN_63]
+                                             Merge Join Operator [MERGEJOIN_54]
                                              |  condition map:[{"":"Inner Join 0 to 1"}]
                                              |  keys:{"0":"_col3 (type: int)","1":"_col0 (type: int)"}
                                              |  outputColumnNames:["_col0","_col1","_col2","_col4","_col6"]
                                              |  Statistics:Num rows: 1874 Data size: 3581903 Basic stats: COMPLETE Column stats: NONE
                                              |<-Map 1 [SIMPLE_EDGE]
-                                             |  Reduce Output Operator [RS_13]
+                                             |  Reduce Output Operator [RS_12]
                                              |     key expressions:_col3 (type: int)
                                              |     Map-reduce partition columns:_col3 (type: int)
                                              |     sort order:+
@@ -136,14 +136,14 @@ Stage-0
                                              |     Select Operator [SEL_2]
                                              |        outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col6"]
                                              |        Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
-                                             |        Filter Operator [FIL_58]
+                                             |        Filter Operator [FIL_49]
                                              |           predicate:((((((ss_net_profit BETWEEN 0 AND 2000 or ss_net_profit BETWEEN 150 AND 3000 or ss_net_profit BETWEEN 50 AND 25000) and ss_store_sk is not null) and (ss_sales_price BETWEEN 100.0 AND 150.0 or ss_sales_price BETWEEN 50.0 AND 100.0 or ss_sales_price BETWEEN 150.0 AND 200.0)) and ss_cdemo_sk is not null) and ss_addr_sk is not null) and ss_sold_date_sk is not null) (type: boolean)
                                              |           Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
                                              |           TableScan [TS_0]
                                              |              alias:store_sales
                                              |              Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
                                              |<-Map 7 [SIMPLE_EDGE]
-                                                Reduce Output Operator [RS_15]
+                                                Reduce Output Operator [RS_13]
                                                    key expressions:_col0 (type: int)
                                                    Map-reduce partition columns:_col0 (type: int)
                                                    sort order:+
@@ -151,7 +151,7 @@ Stage-0
                                                    Select Operator [SEL_5]
                                                       outputColumnNames:["_col0"]
                                                       Statistics:Num rows: 1704 Data size: 3256276 Basic stats: COMPLETE Column stats: NONE
-                                                      Filter Operator [FIL_59]
+                                                      Filter Operator [FIL_50]
                                                          predicate:s_store_sk is not null (type: boolean)
                                                          Statistics:Num rows: 1704 Data size: 3256276 Basic stats: COMPLETE Column stats: NONE
                                                          TableScan [TS_3]

http://git-wip-us.apache.org/repos/asf/hive/blob/6f44fc81/ql/src/test/results/clientpositive/perf/query50.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/query50.q.out b/ql/src/test/results/clientpositive/perf/query50.q.out
index fcc8338..8b41d05 100644
--- a/ql/src/test/results/clientpositive/perf/query50.q.out
+++ b/ql/src/test/results/clientpositive/perf/query50.q.out
@@ -129,49 +129,49 @@ Stage-0
       limit:100
       Stage-1
          Reducer 7
-         File Output Operator [FS_44]
+         File Output Operator [FS_36]
             compressed:false
             Statistics:Num rows: 100 Data size: 111900 Basic stats: COMPLETE Column stats: NONE
             table:{"input format:":"org.apache.hadoop.mapred.TextInputFormat","output format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"}
-            Limit [LIM_43]
+            Limit [LIM_35]
                Number of rows:100
                Statistics:Num rows: 100 Data size: 111900 Basic stats: COMPLETE Column stats: NONE
-               Select Operator [SEL_42]
+               Select Operator [SEL_34]
                |  outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14"]
                |  Statistics:Num rows: 44194 Data size: 49453809 Basic stats: COMPLETE Column stats: NONE
                |<-Reducer 6 [SIMPLE_EDGE]
-                  Reduce Output Operator [RS_41]
+                  Reduce Output Operator [RS_33]
                      key expressions:_col0 (type: string), _col1 (type: int), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: string), _col6 (type: string), _col7 (type: string), _col8 (type: string), _col9 (type: string)
                      sort order:++++++++++
                      Statistics:Num rows: 44194 Data size: 49453809 Basic stats: COMPLETE Column stats: NONE
                      value expressions:_col10 (type: bigint), _col11 (type: bigint), _col12 (type: bigint), _col13 (type: bigint), _col14 (type: bigint)
-                     Group By Operator [GBY_39]
+                     Group By Operator [GBY_31]
                      |  aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)","sum(VALUE._col3)","sum(VALUE._col4)"]
                      |  keys:KEY._col0 (type: string), KEY._col1 (type: int), KEY._col2 (type: string), KEY._col3 (type: string), KEY._col4 (type: string), KEY._col5 (type: string), KEY._col6 (type: string), KEY._col7 (type: string), KEY._col8 (type: string), KEY._col9 (type: string)
                      |  outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14"]
                      |  Statistics:Num rows: 44194 Data size: 49453809 Basic stats: COMPLETE Column stats: NONE
                      |<-Reducer 5 [SIMPLE_EDGE]
-                        Reduce Output Operator [RS_38]
+                        Reduce Output Operator [RS_30]
                            key expressions:_col0 (type: string), _col1 (type: int), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: string), _col6 (type: string), _col7 (type: string), _col8 (type: string), _col9 (type: string)
                            Map-reduce partition columns:_col0 (type: string), _col1 (type: int), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: string), _col6 (type: string), _col7 (type: string), _col8 (type: string), _col9 (type: string)
                            sort order:++++++++++
                            Statistics:Num rows: 88388 Data size: 98907619 Basic stats: COMPLETE Column stats: NONE
                            value expressions:_col10 (type: bigint), _col11 (type: bigint), _col12 (type: bigint), _col13 (type: bigint), _col14 (type: bigint)
-                           Group By Operator [GBY_37]
+                           Group By Operator [GBY_29]
                               aggregations:["sum(_col10)","sum(_col11)","sum(_col12)","sum(_col13)","sum(_col14)"]
                               keys:_col0 (type: string), _col1 (type: int), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: string), _col6 (type: string), _col7 (type: string), _col8 (type: string), _col9 (type: string)
                               outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14"]
                               Statistics:Num rows: 88388 Data size: 98907619 Basic stats: COMPLETE Column stats: NONE
-                              Select Operator [SEL_35]
+                              Select Operator [SEL_27]
                                  outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14"]
                                  Statistics:Num rows: 88388 Data size: 98907619 Basic stats: COMPLETE Column stats: NONE
-                                 Merge Join Operator [MERGEJOIN_67]
+                                 Merge Join Operator [MERGEJOIN_59]
                                  |  condition map:[{"":"Inner Join 0 to 1"}]
                                  |  keys:{"0":"_col5 (type: int)","1":"_col0 (type: int)"}
                                  |  outputColumnNames:["_col0","_col5","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col17","_col18","_col19"]
                                  |  Statistics:Num rows: 88388 Data size: 98907619 Basic stats: COMPLETE Column stats: NONE
                                  |<-Map 11 [SIMPLE_EDGE]
-                                 |  Reduce Output Operator [RS_33]
+                                 |  Reduce Output Operator [RS_25]
                                  |     key expressions:_col0 (type: int)
                                  |     Map-reduce partition columns:_col0 (type: int)
                                  |     sort order:+
@@ -179,26 +179,26 @@ Stage-0
                                  |     Select Operator [SEL_14]
                                  |        outputColumnNames:["_col0"]
                                  |        Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
-                                 |        Filter Operator [FIL_63]
+                                 |        Filter Operator [FIL_55]
                                  |           predicate:(((d_year = 2000) and d_date_sk is not null) and (d_moy = 9)) (type: boolean)
                                  |           Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
                                  |           TableScan [TS_12]
                                  |              alias:d1
                                  |              Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
                                  |<-Reducer 4 [SIMPLE_EDGE]
-                                    Reduce Output Operator [RS_31]
+                                    Reduce Output Operator [RS_24]
                                        key expressions:_col5 (type: int)
                                        Map-reduce partition columns:_col5 (type: int)
                                        sort order:+
                                        Statistics:Num rows: 80353 Data size: 89916016 Basic stats: COMPLETE Column stats: NONE
                                        value expressions:_col0 (type: int), _col10 (type: string), _col11 (type: int), _col12 (type: string), _col13 (type: string), _col14 (type: string), _col15 (type: string), _col16 (type: string), _col17 (type: string), _col18 (type: string), _col19 (type: string)
-                                       Merge Join Operator [MERGEJOIN_66]
+                                       Merge Join Operator [MERGEJOIN_58]
                                        |  condition map:[{"":"Inner Join 0 to 1"}]
                                        |  keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
                                        |  outputColumnNames:["_col0","_col5","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col17","_col18","_col19"]
                                        |  Statistics:Num rows: 80353 Data size: 89916016 Basic stats: COMPLETE Column stats: NONE
                                        |<-Map 10 [SIMPLE_EDGE]
-                                       |  Reduce Output Operator [RS_28]
+                                       |  Reduce Output Operator [RS_22]
                                        |     key expressions:_col0 (type: int)
                                        |     Map-reduce partition columns:_col0 (type: int)
                                        |     sort order:+
@@ -206,26 +206,26 @@ Stage-0
                                        |     Select Operator [SEL_11]
                                        |        outputColumnNames:["_col0"]
                                        |        Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
-                                       |        Filter Operator [FIL_62]
+                                       |        Filter Operator [FIL_54]
                                        |           predicate:d_date_sk is not null (type: boolean)
                                        |           Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
                                        |           TableScan [TS_9]
                                        |              alias:d1
                                        |              Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
                                        |<-Reducer 3 [SIMPLE_EDGE]
-                                          Reduce Output Operator [RS_26]
+                                          Reduce Output Operator [RS_21]
                                              key expressions:_col0 (type: int)
                                              Map-reduce partition columns:_col0 (type: int)
                                              sort order:+
                                              Statistics:Num rows: 1874 Data size: 3581903 Basic stats: COMPLETE Column stats: NONE
                                              value expressions:_col5 (type: int), _col10 (type: string), _col11 (type: int), _col12 (type: string), _col13 (type: string), _col14 (type: string), _col15 (type: string), _col16 (type: string), _col17 (type: string), _col18 (type: string), _col19 (type: string)
-                                             Merge Join Operator [MERGEJOIN_65]
+                                             Merge Join Operator [MERGEJOIN_57]
                                              |  condition map:[{"":"Inner Join 0 to 1"}]
                                              |  keys:{"0":"_col3 (type: int)","1":"_col0 (type: int)"}
                                              |  outputColumnNames:["_col0","_col5","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col17","_col18","_col19"]
                                              |  Statistics:Num rows: 1874 Data size: 3581903 Basic stats: COMPLETE Column stats: NONE
                                              |<-Map 9 [SIMPLE_EDGE]
-                                             |  Reduce Output Operator [RS_23]
+                                             |  Reduce Output Operator [RS_19]
                                              |     key expressions:_col0 (type: int)
                                              |     Map-reduce partition columns:_col0 (type: int)
                                              |     sort order:+
@@ -234,26 +234,26 @@ Stage-0
                                              |     Select Operator [SEL_8]
                                              |        outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10"]
                                              |        Statistics:Num rows: 1704 Data size: 3256276 Basic stats: COMPLETE Column stats: NONE
-                                             |        Filter Operator [FIL_61]
+                                             |        Filter Operator [FIL_53]
                                              |           predicate:s_store_sk is not null (type: boolean)
                                              |           Statistics:Num rows: 1704 Data size: 3256276 Basic stats: COMPLETE Column stats: NONE
                                              |           TableScan [TS_6]
                                              |              alias:store
                                              |              Statistics:Num rows: 1704 Data size: 3256276 Basic stats: COMPLETE Column stats: NONE
                                              |<-Reducer 2 [SIMPLE_EDGE]
-                                                Reduce Output Operator [RS_21]
+                                                Reduce Output Operator [RS_18]
                                                    key expressions:_col3 (type: int)
                                                    Map-reduce partition columns:_col3 (type: int)
                                                    sort order:+
                                                    Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
                                                    value expressions:_col0 (type: int), _col5 (type: int)
-                                                   Merge Join Operator [MERGEJOIN_64]
+                                                   Merge Join Operator [MERGEJOIN_56]
                                                    |  condition map:[{"":"Inner Join 0 to 1"}]
                                                    |  keys:{"0":"_col4 (type: int), _col1 (type: int), _col2 (type: int)","1":"_col3 (type: int), _col1 (type: int), _col2 (type: int)"}
                                                    |  outputColumnNames:["_col0","_col3","_col5"]
                                                    |  Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
                                                    |<-Map 1 [SIMPLE_EDGE]
-                                                   |  Reduce Output Operator [RS_16]
+                                                   |  Reduce Output Operator [RS_15]
                                                    |     key expressions:_col4 (type: int), _col1 (type: int), _col2 (type: int)
                                                    |     Map-reduce partition columns:_col4 (type: int), _col1 (type: int), _col2 (type: int)
                                                    |     sort order:+++
@@ -262,14 +262,14 @@ Stage-0
                                                    |     Select Operator [SEL_2]
                                                    |        outputColumnNames:["_col0","_col1","_col2","_col3","_col4"]
                                                    |        Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
-                                                   |        Filter Operator [FIL_59]
+                                                   |        Filter Operator [FIL_51]
                                                    |           predicate:((((ss_ticket_number is not null and ss_customer_sk is not null) and ss_item_sk is not null) and ss_store_sk is not null) and ss_sold_date_sk is not null) (type: boolean)
                                                    |           Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
                                                    |           TableScan [TS_0]
                                                    |              alias:store_sales
                                                    |              Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
                                                    |<-Map 8 [SIMPLE_EDGE]
-                                                      Reduce Output Operator [RS_18]
+                                                      Reduce Output Operator [RS_16]
                                                          key expressions:_col3 (type: int), _col1 (type: int), _col2 (type: int)
                                                          Map-reduce partition columns:_col3 (type: int), _col1 (type: int), _col2 (type: int)
                                                          sort order:+++
@@ -278,7 +278,7 @@ Stage-0
                                                          Select Operator [SEL_5]
                                                             outputColumnNames:["_col0","_col1","_col2","_col3"]
                                                             Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
-                                                            Filter Operator [FIL_60]
+                                                            Filter Operator [FIL_52]
                                                                predicate:(((sr_ticket_number is not null and sr_customer_sk is not null) and sr_item_sk is not null) and sr_returned_date_sk is not null) (type: boolean)
                                                                Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
                                                                TableScan [TS_3]