hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From omal...@apache.org
Subject [27/55] [partial] hive git commit: HIVE-12017: Do not disable CBO by default when number of joins in a query is equal or less than 1 (Jesus Camacho Rodriguez, reviewed by Ashutosh Chauhan)
Date Mon, 23 Nov 2015 17:23:50 GMT
http://git-wip-us.apache.org/repos/asf/hive/blob/855e43df/ql/src/test/results/clientpositive/llap/explainuser_1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/explainuser_1.q.out b/ql/src/test/results/clientpositive/llap/explainuser_1.q.out
index 4b8ec3f..a9b439e 100644
--- a/ql/src/test/results/clientpositive/llap/explainuser_1.q.out
+++ b/ql/src/test/results/clientpositive/llap/explainuser_1.q.out
@@ -3396,7 +3396,7 @@ Stage-0
                Merge Join Operator [MERGEJOIN_37]
                |  condition map:[{"":"Inner Join 0 to 1"}]
                |  keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
-               |  outputColumnNames:["_col1","_col2"]
+               |  outputColumnNames:["_col2","_col4"]
                |  Statistics:Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: COMPLETE
                |<-Reducer 2 [SIMPLE_EDGE]
                |  Reduce Output Operator [RS_22]
@@ -3977,112 +3977,115 @@ Stage-0
       limit:-1
       Stage-1
          Reducer 4
-         File Output Operator [FS_38]
+         File Output Operator [FS_37]
             compressed:false
-            Statistics:Num rows: 1 Data size: 146 Basic stats: COMPLETE Column stats: NONE
+            Statistics:Num rows: 15 Data size: 1966 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"}
-            Select Operator [SEL_37]
+            Select Operator [SEL_36]
             |  outputColumnNames:["_col0","_col1"]
-            |  Statistics:Num rows: 1 Data size: 146 Basic stats: COMPLETE Column stats: NONE
+            |  Statistics:Num rows: 15 Data size: 1966 Basic stats: COMPLETE Column stats: NONE
             |<-Reducer 3 [SIMPLE_EDGE]
-               Reduce Output Operator [RS_36]
+               Reduce Output Operator [RS_35]
                   key expressions:_col0 (type: string)
                   sort order:+
-                  Statistics:Num rows: 1 Data size: 146 Basic stats: COMPLETE Column stats: NONE
+                  Statistics:Num rows: 15 Data size: 1966 Basic stats: COMPLETE Column stats: NONE
                   value expressions:_col1 (type: int)
-                  Merge Join Operator [MERGEJOIN_48]
-                  |  condition map:[{"":"Inner Join 0 to 1"}]
-                  |  keys:{}
-                  |  outputColumnNames:["_col0","_col1"]
-                  |  Statistics:Num rows: 1 Data size: 146 Basic stats: COMPLETE Column stats: NONE
-                  |<-Reducer 2 [SIMPLE_EDGE]
-                  |  Reduce Output Operator [RS_30]
-                  |     sort order:
-                  |     Statistics:Num rows: 1 Data size: 133 Basic stats: COMPLETE Column stats: COMPLETE
-                  |     value expressions:_col0 (type: string), _col1 (type: int)
-                  |     Filter Operator [FIL_41]
-                  |        predicate:_col2 is null (type: boolean)
-                  |        Statistics:Num rows: 1 Data size: 133 Basic stats: COMPLETE Column stats: COMPLETE
-                  |        Merge Join Operator [MERGEJOIN_47]
-                  |        |  condition map:[{"":"Left Outer Join0 to 1"}]
-                  |        |  keys:{"0":"UDFToDouble(_col1) (type: double)","1":"_col0 (type: double)"}
-                  |        |  outputColumnNames:["_col0","_col1","_col2"]
-                  |        |  Statistics:Num rows: 1 Data size: 133 Basic stats: COMPLETE Column stats: COMPLETE
-                  |        |<-Map 1 [SIMPLE_EDGE]
-                  |        |  Reduce Output Operator [RS_27]
-                  |        |     key expressions:UDFToDouble(_col1) (type: double)
-                  |        |     Map-reduce partition columns:UDFToDouble(_col1) (type: double)
-                  |        |     sort order:+
-                  |        |     Statistics:Num rows: 26 Data size: 3250 Basic stats: COMPLETE Column stats: COMPLETE
-                  |        |     value expressions:_col0 (type: string), _col1 (type: int)
-                  |        |     Select Operator [SEL_2]
-                  |        |        outputColumnNames:["_col0","_col1"]
-                  |        |        Statistics:Num rows: 26 Data size: 3250 Basic stats: COMPLETE Column stats: COMPLETE
-                  |        |        TableScan [TS_0]
-                  |        |           alias:part
-                  |        |           Statistics:Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats: COMPLETE
-                  |        |<-Reducer 6 [SIMPLE_EDGE]
-                  |           Reduce Output Operator [RS_28]
-                  |              key expressions:_col0 (type: double)
-                  |              Map-reduce partition columns:_col0 (type: double)
-                  |              sort order:+
-                  |              Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
-                  |              Group By Operator [GBY_8]
-                  |              |  aggregations:["avg(VALUE._col0)"]
-                  |              |  outputColumnNames:["_col0"]
-                  |              |  Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
-                  |              |<-Map 5 [SIMPLE_EDGE]
-                  |                 Reduce Output Operator [RS_7]
-                  |                    sort order:
-                  |                    Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: COMPLETE
-                  |                    value expressions:_col0 (type: struct<count:bigint,sum:double,input:int>)
-                  |                    Group By Operator [GBY_6]
-                  |                       aggregations:["avg(p_size)"]
-                  |                       outputColumnNames:["_col0"]
-                  |                       Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: COMPLETE
-                  |                       Filter Operator [FIL_43]
-                  |                          predicate:(p_size < 10) (type: boolean)
-                  |                          Statistics:Num rows: 8 Data size: 32 Basic stats: COMPLETE Column stats: COMPLETE
-                  |                          TableScan [TS_3]
-                  |                             alias:part
-                  |                             Statistics:Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats: COMPLETE
-                  |<-Reducer 8 [SIMPLE_EDGE]
-                     Reduce Output Operator [RS_31]
-                        sort order:
-                        Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: COMPLETE
-                        Select Operator [SEL_23]
-                           Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: COMPLETE
-                           Filter Operator [FIL_44]
-                              predicate:(_col0 = 0) (type: boolean)
+                  Select Operator [SEL_34]
+                     outputColumnNames:["_col0","_col1"]
+                     Statistics:Num rows: 15 Data size: 1966 Basic stats: COMPLETE Column stats: NONE
+                     Filter Operator [FIL_40]
+                        predicate:_col3 is null (type: boolean)
+                        Statistics:Num rows: 15 Data size: 1966 Basic stats: COMPLETE Column stats: NONE
+                        Merge Join Operator [MERGEJOIN_47]
+                        |  condition map:[{"":"Left Outer Join0 to 1"}]
+                        |  keys:{"0":"UDFToDouble(_col1) (type: double)","1":"_col0 (type: double)"}
+                        |  outputColumnNames:["_col0","_col1","_col3"]
+                        |  Statistics:Num rows: 30 Data size: 3932 Basic stats: COMPLETE Column stats: NONE
+                        |<-Reducer 2 [SIMPLE_EDGE]
+                        |  Reduce Output Operator [RS_30]
+                        |     key expressions:UDFToDouble(_col1) (type: double)
+                        |     Map-reduce partition columns:UDFToDouble(_col1) (type: double)
+                        |     sort order:+
+                        |     Statistics:Num rows: 28 Data size: 3575 Basic stats: COMPLETE Column stats: NONE
+                        |     value expressions:_col0 (type: string), _col1 (type: int)
+                        |     Merge Join Operator [MERGEJOIN_46]
+                        |     |  condition map:[{"":"Inner Join 0 to 1"}]
+                        |     |  keys:{}
+                        |     |  outputColumnNames:["_col0","_col1"]
+                        |     |  Statistics:Num rows: 28 Data size: 3575 Basic stats: COMPLETE Column stats: NONE
+                        |     |<-Map 1 [SIMPLE_EDGE]
+                        |     |  Reduce Output Operator [RS_27]
+                        |     |     sort order:
+                        |     |     Statistics:Num rows: 26 Data size: 3250 Basic stats: COMPLETE Column stats: COMPLETE
+                        |     |     value expressions:_col0 (type: string), _col1 (type: int)
+                        |     |     Select Operator [SEL_2]
+                        |     |        outputColumnNames:["_col0","_col1"]
+                        |     |        Statistics:Num rows: 26 Data size: 3250 Basic stats: COMPLETE Column stats: COMPLETE
+                        |     |        TableScan [TS_0]
+                        |     |           alias:part
+                        |     |           Statistics:Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats: COMPLETE
+                        |     |<-Reducer 6 [SIMPLE_EDGE]
+                        |        Reduce Output Operator [RS_28]
+                        |           sort order:
+                        |           Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: COMPLETE
+                        |           Select Operator [SEL_16]
+                        |              Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: COMPLETE
+                        |              Filter Operator [FIL_41]
+                        |                 predicate:(_col0 = 0) (type: boolean)
+                        |                 Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
+                        |                 Group By Operator [GBY_15]
+                        |                    aggregations:["count()"]
+                        |                    outputColumnNames:["_col0"]
+                        |                    Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
+                        |                    Select Operator [SEL_9]
+                        |                       Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
+                        |                       Filter Operator [FIL_42]
+                        |                          predicate:_col0 is null (type: boolean)
+                        |                          Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
+                        |                          Group By Operator [GBY_8]
+                        |                          |  aggregations:["avg(VALUE._col0)"]
+                        |                          |  outputColumnNames:["_col0"]
+                        |                          |  Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
+                        |                          |<-Map 5 [SIMPLE_EDGE]
+                        |                             Reduce Output Operator [RS_7]
+                        |                                sort order:
+                        |                                Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: COMPLETE
+                        |                                value expressions:_col0 (type: struct<count:bigint,sum:double,input:int>)
+                        |                                Group By Operator [GBY_6]
+                        |                                   aggregations:["avg(p_size)"]
+                        |                                   outputColumnNames:["_col0"]
+                        |                                   Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: COMPLETE
+                        |                                   Filter Operator [FIL_43]
+                        |                                      predicate:(p_size < 10) (type: boolean)
+                        |                                      Statistics:Num rows: 8 Data size: 32 Basic stats: COMPLETE Column stats: COMPLETE
+                        |                                      TableScan [TS_3]
+                        |                                         alias:part
+                        |                                         Statistics:Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats: COMPLETE
+                        |<-Reducer 8 [SIMPLE_EDGE]
+                           Reduce Output Operator [RS_31]
+                              key expressions:_col0 (type: double)
+                              Map-reduce partition columns:_col0 (type: double)
+                              sort order:+
                               Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
-                              Group By Operator [GBY_22]
-                                 aggregations:["count()"]
-                                 outputColumnNames:["_col0"]
-                                 Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
-                                 Select Operator [SEL_16]
-                                    Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
-                                    Filter Operator [FIL_45]
-                                       predicate:_col0 is null (type: boolean)
-                                       Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
-                                       Group By Operator [GBY_15]
-                                       |  aggregations:["avg(VALUE._col0)"]
-                                       |  outputColumnNames:["_col0"]
-                                       |  Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
-                                       |<-Map 7 [SIMPLE_EDGE]
-                                          Reduce Output Operator [RS_14]
-                                             sort order:
-                                             Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: COMPLETE
-                                             value expressions:_col0 (type: struct<count:bigint,sum:double,input:int>)
-                                             Group By Operator [GBY_13]
-                                                aggregations:["avg(p_size)"]
-                                                outputColumnNames:["_col0"]
-                                                Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: COMPLETE
-                                                Filter Operator [FIL_46]
-                                                   predicate:(p_size < 10) (type: boolean)
-                                                   Statistics:Num rows: 8 Data size: 32 Basic stats: COMPLETE Column stats: COMPLETE
-                                                   TableScan [TS_10]
-                                                      alias:part
-                                                      Statistics:Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats: COMPLETE
+                              Group By Operator [GBY_24]
+                              |  aggregations:["avg(VALUE._col0)"]
+                              |  outputColumnNames:["_col0"]
+                              |  Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
+                              |<-Map 7 [SIMPLE_EDGE]
+                                 Reduce Output Operator [RS_23]
+                                    sort order:
+                                    Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: COMPLETE
+                                    value expressions:_col0 (type: struct<count:bigint,sum:double,input:int>)
+                                    Group By Operator [GBY_22]
+                                       aggregations:["avg(p_size)"]
+                                       outputColumnNames:["_col0"]
+                                       Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: COMPLETE
+                                       Filter Operator [FIL_45]
+                                          predicate:(p_size < 10) (type: boolean)
+                                          Statistics:Num rows: 8 Data size: 32 Basic stats: COMPLETE Column stats: COMPLETE
+                                          TableScan [TS_19]
+                                             alias:part
+                                             Statistics:Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats: COMPLETE
 
 PREHOOK: query: explain select b.p_mfgr, min(p_retailprice) 
 from part b 
@@ -4478,44 +4481,41 @@ Stage-0
                                  keys:_col0 (type: string)
                                  outputColumnNames:["_col0","_col1"]
                                  Statistics:Num rows: 14 Data size: 1316 Basic stats: COMPLETE Column stats: COMPLETE
-                                 Select Operator [SEL_9]
-                                    outputColumnNames:["_col0"]
-                                    Statistics:Num rows: 60 Data size: 5160 Basic stats: COMPLETE Column stats: COMPLETE
-                                    Merge Join Operator [MERGEJOIN_25]
-                                    |  condition map:[{"":"Inner Join 0 to 1"}]
-                                    |  keys:{"0":"_col0 (type: string)","1":"_col0 (type: string)"}
-                                    |  outputColumnNames:["_col1"]
-                                    |  Statistics:Num rows: 60 Data size: 5160 Basic stats: COMPLETE Column stats: COMPLETE
-                                    |<-Map 1 [SIMPLE_EDGE]
-                                    |  Reduce Output Operator [RS_5]
-                                    |     key expressions:_col0 (type: string)
-                                    |     Map-reduce partition columns:_col0 (type: string)
-                                    |     sort order:+
-                                    |     Statistics:Num rows: 500 Data size: 43500 Basic stats: COMPLETE Column stats: COMPLETE
-                                    |     Select Operator [SEL_1]
-                                    |        outputColumnNames:["_col0"]
-                                    |        Statistics:Num rows: 500 Data size: 43500 Basic stats: COMPLETE Column stats: COMPLETE
-                                    |        Filter Operator [FIL_23]
-                                    |           predicate:key is not null (type: boolean)
-                                    |           Statistics:Num rows: 500 Data size: 43500 Basic stats: COMPLETE Column stats: COMPLETE
-                                    |           TableScan [TS_0]
-                                    |              alias:y
-                                    |              Statistics:Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: COMPLETE
-                                    |<-Map 5 [SIMPLE_EDGE]
-                                       Reduce Output Operator [RS_7]
-                                          key expressions:_col0 (type: string)
-                                          Map-reduce partition columns:_col0 (type: string)
-                                          sort order:+
-                                          Statistics:Num rows: 25 Data size: 2150 Basic stats: COMPLETE Column stats: COMPLETE
-                                          Select Operator [SEL_3]
-                                             outputColumnNames:["_col0"]
-                                             Statistics:Num rows: 25 Data size: 2150 Basic stats: COMPLETE Column stats: COMPLETE
-                                             Filter Operator [FIL_24]
-                                                predicate:key is not null (type: boolean)
-                                                Statistics:Num rows: 25 Data size: 2150 Basic stats: COMPLETE Column stats: COMPLETE
-                                                TableScan [TS_2]
-                                                   alias:x
-                                                   Statistics:Num rows: 25 Data size: 191 Basic stats: COMPLETE Column stats: COMPLETE
+                                 Merge Join Operator [MERGEJOIN_25]
+                                 |  condition map:[{"":"Inner Join 0 to 1"}]
+                                 |  keys:{"0":"_col0 (type: string)","1":"_col0 (type: string)"}
+                                 |  outputColumnNames:["_col0"]
+                                 |  Statistics:Num rows: 60 Data size: 5160 Basic stats: COMPLETE Column stats: COMPLETE
+                                 |<-Map 1 [SIMPLE_EDGE]
+                                 |  Reduce Output Operator [RS_5]
+                                 |     key expressions:_col0 (type: string)
+                                 |     Map-reduce partition columns:_col0 (type: string)
+                                 |     sort order:+
+                                 |     Statistics:Num rows: 25 Data size: 2150 Basic stats: COMPLETE Column stats: COMPLETE
+                                 |     Select Operator [SEL_1]
+                                 |        outputColumnNames:["_col0"]
+                                 |        Statistics:Num rows: 25 Data size: 2150 Basic stats: COMPLETE Column stats: COMPLETE
+                                 |        Filter Operator [FIL_23]
+                                 |           predicate:key is not null (type: boolean)
+                                 |           Statistics:Num rows: 25 Data size: 2150 Basic stats: COMPLETE Column stats: COMPLETE
+                                 |           TableScan [TS_0]
+                                 |              alias:x
+                                 |              Statistics:Num rows: 25 Data size: 191 Basic stats: COMPLETE Column stats: COMPLETE
+                                 |<-Map 5 [SIMPLE_EDGE]
+                                    Reduce Output Operator [RS_7]
+                                       key expressions:_col0 (type: string)
+                                       Map-reduce partition columns:_col0 (type: string)
+                                       sort order:+
+                                       Statistics:Num rows: 500 Data size: 43500 Basic stats: COMPLETE Column stats: COMPLETE
+                                       Select Operator [SEL_3]
+                                          outputColumnNames:["_col0"]
+                                          Statistics:Num rows: 500 Data size: 43500 Basic stats: COMPLETE Column stats: COMPLETE
+                                          Filter Operator [FIL_24]
+                                             predicate:key is not null (type: boolean)
+                                             Statistics:Num rows: 500 Data size: 43500 Basic stats: COMPLETE Column stats: COMPLETE
+                                             TableScan [TS_2]
+                                                alias:y
+                                                Statistics:Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: COMPLETE
 
 PREHOOK: query: explain
 select SUM(HASH(tmp.key)), SUM(HASH(tmp.cnt))
@@ -4578,44 +4578,41 @@ Stage-0
                                  keys:_col0 (type: string)
                                  outputColumnNames:["_col0","_col1"]
                                  Statistics:Num rows: 14 Data size: 1316 Basic stats: COMPLETE Column stats: COMPLETE
-                                 Select Operator [SEL_9]
-                                    outputColumnNames:["_col0"]
-                                    Statistics:Num rows: 60 Data size: 5160 Basic stats: COMPLETE Column stats: COMPLETE
-                                    Merge Join Operator [MERGEJOIN_25]
-                                    |  condition map:[{"":"Inner Join 0 to 1"}]
-                                    |  keys:{"0":"_col0 (type: string)","1":"_col0 (type: string)"}
-                                    |  outputColumnNames:["_col1"]
-                                    |  Statistics:Num rows: 60 Data size: 5160 Basic stats: COMPLETE Column stats: COMPLETE
-                                    |<-Map 1 [SIMPLE_EDGE]
-                                    |  Reduce Output Operator [RS_5]
-                                    |     key expressions:_col0 (type: string)
-                                    |     Map-reduce partition columns:_col0 (type: string)
-                                    |     sort order:+
-                                    |     Statistics:Num rows: 500 Data size: 43500 Basic stats: COMPLETE Column stats: COMPLETE
-                                    |     Select Operator [SEL_1]
-                                    |        outputColumnNames:["_col0"]
-                                    |        Statistics:Num rows: 500 Data size: 43500 Basic stats: COMPLETE Column stats: COMPLETE
-                                    |        Filter Operator [FIL_23]
-                                    |           predicate:key is not null (type: boolean)
-                                    |           Statistics:Num rows: 500 Data size: 43500 Basic stats: COMPLETE Column stats: COMPLETE
-                                    |           TableScan [TS_0]
-                                    |              alias:y
-                                    |              Statistics:Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: COMPLETE
-                                    |<-Map 5 [SIMPLE_EDGE]
-                                       Reduce Output Operator [RS_7]
-                                          key expressions:_col0 (type: string)
-                                          Map-reduce partition columns:_col0 (type: string)
-                                          sort order:+
-                                          Statistics:Num rows: 25 Data size: 2150 Basic stats: COMPLETE Column stats: COMPLETE
-                                          Select Operator [SEL_3]
-                                             outputColumnNames:["_col0"]
-                                             Statistics:Num rows: 25 Data size: 2150 Basic stats: COMPLETE Column stats: COMPLETE
-                                             Filter Operator [FIL_24]
-                                                predicate:key is not null (type: boolean)
-                                                Statistics:Num rows: 25 Data size: 2150 Basic stats: COMPLETE Column stats: COMPLETE
-                                                TableScan [TS_2]
-                                                   alias:x
-                                                   Statistics:Num rows: 25 Data size: 191 Basic stats: COMPLETE Column stats: COMPLETE
+                                 Merge Join Operator [MERGEJOIN_25]
+                                 |  condition map:[{"":"Inner Join 0 to 1"}]
+                                 |  keys:{"0":"_col0 (type: string)","1":"_col0 (type: string)"}
+                                 |  outputColumnNames:["_col0"]
+                                 |  Statistics:Num rows: 60 Data size: 5160 Basic stats: COMPLETE Column stats: COMPLETE
+                                 |<-Map 1 [SIMPLE_EDGE]
+                                 |  Reduce Output Operator [RS_5]
+                                 |     key expressions:_col0 (type: string)
+                                 |     Map-reduce partition columns:_col0 (type: string)
+                                 |     sort order:+
+                                 |     Statistics:Num rows: 25 Data size: 2150 Basic stats: COMPLETE Column stats: COMPLETE
+                                 |     Select Operator [SEL_1]
+                                 |        outputColumnNames:["_col0"]
+                                 |        Statistics:Num rows: 25 Data size: 2150 Basic stats: COMPLETE Column stats: COMPLETE
+                                 |        Filter Operator [FIL_23]
+                                 |           predicate:key is not null (type: boolean)
+                                 |           Statistics:Num rows: 25 Data size: 2150 Basic stats: COMPLETE Column stats: COMPLETE
+                                 |           TableScan [TS_0]
+                                 |              alias:x
+                                 |              Statistics:Num rows: 25 Data size: 191 Basic stats: COMPLETE Column stats: COMPLETE
+                                 |<-Map 5 [SIMPLE_EDGE]
+                                    Reduce Output Operator [RS_7]
+                                       key expressions:_col0 (type: string)
+                                       Map-reduce partition columns:_col0 (type: string)
+                                       sort order:+
+                                       Statistics:Num rows: 500 Data size: 43500 Basic stats: COMPLETE Column stats: COMPLETE
+                                       Select Operator [SEL_3]
+                                          outputColumnNames:["_col0"]
+                                          Statistics:Num rows: 500 Data size: 43500 Basic stats: COMPLETE Column stats: COMPLETE
+                                          Filter Operator [FIL_24]
+                                             predicate:key is not null (type: boolean)
+                                             Statistics:Num rows: 500 Data size: 43500 Basic stats: COMPLETE Column stats: COMPLETE
+                                             TableScan [TS_2]
+                                                alias:y
+                                                Statistics:Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: COMPLETE
 
 PREHOOK: query: explain
 select SUM(HASH(tmp.key)), SUM(HASH(tmp.cnt))
@@ -4632,15 +4629,15 @@ POSTHOOK: type: QUERY
 Plan optimized by CBO.
 
 Vertex dependency in root stage
-Map 1 <- Map 4 (BROADCAST_EDGE)
-Reducer 2 <- Map 1 (SIMPLE_EDGE)
-Reducer 3 <- Reducer 2 (SIMPLE_EDGE)
+Map 2 <- Map 1 (BROADCAST_EDGE)
+Reducer 3 <- Map 2 (SIMPLE_EDGE)
+Reducer 4 <- Reducer 3 (SIMPLE_EDGE)
 
 Stage-0
    Fetch Operator
       limit:-1
       Stage-1
-         Reducer 3
+         Reducer 4
          File Output Operator [FS_20]
             compressed:false
             Statistics:Num rows: 1 Data size: 16 Basic stats: COMPLETE Column stats: COMPLETE
@@ -4649,7 +4646,7 @@ Stage-0
             |  aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"]
             |  outputColumnNames:["_col0","_col1"]
             |  Statistics:Num rows: 1 Data size: 16 Basic stats: COMPLETE Column stats: COMPLETE
-            |<-Reducer 2 [SIMPLE_EDGE]
+            |<-Reducer 3 [SIMPLE_EDGE]
                Reduce Output Operator [RS_17]
                   sort order:
                   Statistics:Num rows: 1 Data size: 16 Basic stats: COMPLETE Column stats: COMPLETE
@@ -4666,7 +4663,7 @@ Stage-0
                         |  keys:KEY._col0 (type: string)
                         |  outputColumnNames:["_col0","_col1"]
                         |  Statistics:Num rows: 14 Data size: 1316 Basic stats: COMPLETE Column stats: COMPLETE
-                        |<-Map 1 [SIMPLE_EDGE]
+                        |<-Map 2 [SIMPLE_EDGE]
                            Reduce Output Operator [RS_12]
                               key expressions:_col0 (type: string)
                               Map-reduce partition columns:_col0 (type: string)
@@ -4678,38 +4675,35 @@ Stage-0
                                  keys:_col0 (type: string)
                                  outputColumnNames:["_col0","_col1"]
                                  Statistics:Num rows: 14 Data size: 1316 Basic stats: COMPLETE Column stats: COMPLETE
-                                 Select Operator [SEL_9]
-                                    outputColumnNames:["_col0"]
-                                    Statistics:Num rows: 60 Data size: 5160 Basic stats: COMPLETE Column stats: COMPLETE
-                                    Map Join Operator [MAPJOIN_25]
-                                    |  condition map:[{"":"Inner Join 0 to 1"}]
-                                    |  keys:{"Map 1":"_col0 (type: string)","Map 4":"_col0 (type: string)"}
-                                    |  outputColumnNames:["_col1"]
-                                    |  Statistics:Num rows: 60 Data size: 5160 Basic stats: COMPLETE Column stats: COMPLETE
-                                    |<-Map 4 [BROADCAST_EDGE]
-                                    |  Reduce Output Operator [RS_7]
-                                    |     key expressions:_col0 (type: string)
-                                    |     Map-reduce partition columns:_col0 (type: string)
-                                    |     sort order:+
-                                    |     Statistics:Num rows: 25 Data size: 2150 Basic stats: COMPLETE Column stats: COMPLETE
-                                    |     Select Operator [SEL_3]
-                                    |        outputColumnNames:["_col0"]
-                                    |        Statistics:Num rows: 25 Data size: 2150 Basic stats: COMPLETE Column stats: COMPLETE
-                                    |        Filter Operator [FIL_24]
-                                    |           predicate:key is not null (type: boolean)
-                                    |           Statistics:Num rows: 25 Data size: 2150 Basic stats: COMPLETE Column stats: COMPLETE
-                                    |           TableScan [TS_2]
-                                    |              alias:x
-                                    |              Statistics:Num rows: 25 Data size: 191 Basic stats: COMPLETE Column stats: COMPLETE
-                                    |<-Select Operator [SEL_1]
-                                          outputColumnNames:["_col0"]
+                                 Map Join Operator [MAPJOIN_25]
+                                 |  condition map:[{"":"Inner Join 0 to 1"}]
+                                 |  keys:{"Map 1":"_col0 (type: string)","Map 2":"_col0 (type: string)"}
+                                 |  outputColumnNames:["_col0"]
+                                 |  Statistics:Num rows: 60 Data size: 5160 Basic stats: COMPLETE Column stats: COMPLETE
+                                 |<-Map 1 [BROADCAST_EDGE]
+                                 |  Reduce Output Operator [RS_5]
+                                 |     key expressions:_col0 (type: string)
+                                 |     Map-reduce partition columns:_col0 (type: string)
+                                 |     sort order:+
+                                 |     Statistics:Num rows: 25 Data size: 2150 Basic stats: COMPLETE Column stats: COMPLETE
+                                 |     Select Operator [SEL_1]
+                                 |        outputColumnNames:["_col0"]
+                                 |        Statistics:Num rows: 25 Data size: 2150 Basic stats: COMPLETE Column stats: COMPLETE
+                                 |        Filter Operator [FIL_23]
+                                 |           predicate:key is not null (type: boolean)
+                                 |           Statistics:Num rows: 25 Data size: 2150 Basic stats: COMPLETE Column stats: COMPLETE
+                                 |           TableScan [TS_0]
+                                 |              alias:x
+                                 |              Statistics:Num rows: 25 Data size: 191 Basic stats: COMPLETE Column stats: COMPLETE
+                                 |<-Select Operator [SEL_3]
+                                       outputColumnNames:["_col0"]
+                                       Statistics:Num rows: 500 Data size: 43500 Basic stats: COMPLETE Column stats: COMPLETE
+                                       Filter Operator [FIL_24]
+                                          predicate:key is not null (type: boolean)
                                           Statistics:Num rows: 500 Data size: 43500 Basic stats: COMPLETE Column stats: COMPLETE
-                                          Filter Operator [FIL_23]
-                                             predicate:key is not null (type: boolean)
-                                             Statistics:Num rows: 500 Data size: 43500 Basic stats: COMPLETE Column stats: COMPLETE
-                                             TableScan [TS_0]
-                                                alias:y
-                                                Statistics:Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: COMPLETE
+                                          TableScan [TS_2]
+                                             alias:y
+                                             Statistics:Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: COMPLETE
 
 PREHOOK: query: explain
 select SUM(HASH(tmp.key)), SUM(HASH(tmp.cnt))
@@ -8161,21 +8155,20 @@ Stage-3
                            Merge Join Operator [MERGEJOIN_16]
                            |  condition map:[{"":"Inner Join 0 to 1"}]
                            |  keys:{"0":"_col0 (type: string)","1":"_col0 (type: string)"}
-                           |  outputColumnNames:["_col1","_col2"]
+                           |  outputColumnNames:["_col0","_col2"]
                            |  Statistics:Num rows: 1219 Data size: 216982 Basic stats: COMPLETE Column stats: COMPLETE
                            |<-Map 1 [SIMPLE_EDGE]
                            |  Reduce Output Operator [RS_5]
                            |     key expressions:_col0 (type: string)
                            |     Map-reduce partition columns:_col0 (type: string)
                            |     sort order:+
-                           |     Statistics:Num rows: 500 Data size: 89000 Basic stats: COMPLETE Column stats: COMPLETE
-                           |     value expressions:_col1 (type: string)
+                           |     Statistics:Num rows: 500 Data size: 43500 Basic stats: COMPLETE Column stats: COMPLETE
                            |     Select Operator [SEL_1]
-                           |        outputColumnNames:["_col0","_col1"]
-                           |        Statistics:Num rows: 500 Data size: 89000 Basic stats: COMPLETE Column stats: COMPLETE
+                           |        outputColumnNames:["_col0"]
+                           |        Statistics:Num rows: 500 Data size: 43500 Basic stats: COMPLETE Column stats: COMPLETE
                            |        Filter Operator [FIL_14]
                            |           predicate:key is not null (type: boolean)
-                           |           Statistics:Num rows: 500 Data size: 89000 Basic stats: COMPLETE Column stats: COMPLETE
+                           |           Statistics:Num rows: 500 Data size: 43500 Basic stats: COMPLETE Column stats: COMPLETE
                            |           TableScan [TS_0]
                            |              alias:src1
                            |              Statistics:Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: COMPLETE
@@ -8184,13 +8177,14 @@ Stage-3
                                  key expressions:_col0 (type: string)
                                  Map-reduce partition columns:_col0 (type: string)
                                  sort order:+
-                                 Statistics:Num rows: 500 Data size: 43500 Basic stats: COMPLETE Column stats: COMPLETE
+                                 Statistics:Num rows: 500 Data size: 89000 Basic stats: COMPLETE Column stats: COMPLETE
+                                 value expressions:_col1 (type: string)
                                  Select Operator [SEL_3]
-                                    outputColumnNames:["_col0"]
-                                    Statistics:Num rows: 500 Data size: 43500 Basic stats: COMPLETE Column stats: COMPLETE
+                                    outputColumnNames:["_col0","_col1"]
+                                    Statistics:Num rows: 500 Data size: 89000 Basic stats: COMPLETE Column stats: COMPLETE
                                     Filter Operator [FIL_15]
                                        predicate:key is not null (type: boolean)
-                                       Statistics:Num rows: 500 Data size: 43500 Basic stats: COMPLETE Column stats: COMPLETE
+                                       Statistics:Num rows: 500 Data size: 89000 Basic stats: COMPLETE Column stats: COMPLETE
                                        TableScan [TS_2]
                                           alias:src1
                                           Statistics:Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: COMPLETE
@@ -8575,7 +8569,7 @@ PREHOOK: query: explain select sum(hash(k.key)), sum(hash(v.val)) from T1 k join
 PREHOOK: type: QUERY
 POSTHOOK: query: explain select sum(hash(k.key)), sum(hash(v.val)) from T1 k join T1 v on k.key=v.key
 POSTHOOK: type: QUERY
-Plan not optimized by CBO due to missing statistics. Please check log for more details.
+Plan optimized by CBO.
 
 Vertex dependency in root stage
 Map 1 <- Map 4 (BROADCAST_EDGE)
@@ -8587,59 +8581,68 @@ Stage-0
       limit:-1
       Stage-1
          Reducer 3
-         File Output Operator [FS_13]
+         File Output Operator [FS_16]
             compressed:true
             Statistics:Num rows: 1 Data size: 16 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_11]
+            Group By Operator [GBY_14]
             |  aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"]
             |  outputColumnNames:["_col0","_col1"]
             |  Statistics:Num rows: 1 Data size: 16 Basic stats: COMPLETE Column stats: NONE
             |<-Reducer 2 [SIMPLE_EDGE]
-               Reduce Output Operator [RS_10]
+               Reduce Output Operator [RS_13]
                   sort order:
                   Statistics:Num rows: 1 Data size: 16 Basic stats: COMPLETE Column stats: NONE
                   value expressions:_col0 (type: bigint), _col1 (type: bigint)
-                  Group By Operator [GBY_9]
+                  Group By Operator [GBY_12]
                   |  aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"]
                   |  outputColumnNames:["_col0","_col1"]
                   |  Statistics:Num rows: 1 Data size: 16 Basic stats: COMPLETE Column stats: NONE
                   |<-Map 1 [SIMPLE_EDGE]
-                     Reduce Output Operator [RS_8]
+                     Reduce Output Operator [RS_11]
                         Map-reduce partition columns:rand() (type: double)
                         sort order:
                         Statistics:Num rows: 1 Data size: 33 Basic stats: COMPLETE Column stats: NONE
-                        value expressions:hash(_col0) (type: int), hash(_col6) (type: int)
-                        Map Join Operator [MAPJOIN_18]
-                        |  condition map:[{"":"Inner Join 0 to 1"}]
-                        |  keys:{"Map 1":"key (type: string)","Map 4":"key (type: string)"}
-                        |  outputColumnNames:["_col0","_col6"]
-                        |  Statistics:Num rows: 1 Data size: 33 Basic stats: COMPLETE Column stats: NONE
-                        |<-Map 4 [BROADCAST_EDGE]
-                        |  Reduce Output Operator [RS_5]
-                        |     key expressions:key (type: string)
-                        |     Map-reduce partition columns:key (type: string)
-                        |     sort order:+
-                        |     Statistics:Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
-                        |     value expressions:val (type: string)
-                        |     Filter Operator [FIL_17]
-                        |        predicate:key is not null (type: boolean)
-                        |        Statistics:Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
-                        |        TableScan [TS_1]
-                        |           alias:v
-                        |           Statistics:Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
-                        |<-Filter Operator [FIL_16]
-                              predicate:key is not null (type: boolean)
-                              Statistics:Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
-                              TableScan [TS_0]
-                                 alias:k
+                        value expressions:_col0 (type: int), _col1 (type: int)
+                        Select Operator [SEL_9]
+                           outputColumnNames:["_col0","_col1"]
+                           Statistics:Num rows: 1 Data size: 33 Basic stats: COMPLETE Column stats: NONE
+                           Map Join Operator [MAPJOIN_21]
+                           |  condition map:[{"":"Inner Join 0 to 1"}]
+                           |  keys:{"Map 1":"_col0 (type: string)","Map 4":"_col0 (type: string)"}
+                           |  outputColumnNames:["_col0","_col2"]
+                           |  Statistics:Num rows: 1 Data size: 33 Basic stats: COMPLETE Column stats: NONE
+                           |<-Map 4 [BROADCAST_EDGE]
+                           |  Reduce Output Operator [RS_7]
+                           |     key expressions:_col0 (type: string)
+                           |     Map-reduce partition columns:_col0 (type: string)
+                           |     sort order:+
+                           |     Statistics:Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
+                           |     value expressions:_col1 (type: string)
+                           |     Select Operator [SEL_3]
+                           |        outputColumnNames:["_col0","_col1"]
+                           |        Statistics:Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
+                           |        Filter Operator [FIL_20]
+                           |           predicate:key is not null (type: boolean)
+                           |           Statistics:Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
+                           |           TableScan [TS_2]
+                           |              alias:k
+                           |              Statistics:Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
+                           |<-Select Operator [SEL_1]
+                                 outputColumnNames:["_col0"]
                                  Statistics:Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
+                                 Filter Operator [FIL_19]
+                                    predicate:key is not null (type: boolean)
+                                    Statistics:Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
+                                    TableScan [TS_0]
+                                       alias:k
+                                       Statistics:Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
 
 PREHOOK: query: explain select count(1) from  T1 a join T1 b on a.key = b.key
 PREHOOK: type: QUERY
 POSTHOOK: query: explain select count(1) from  T1 a join T1 b on a.key = b.key
 POSTHOOK: type: QUERY
-Plan not optimized by CBO due to missing statistics. Please check log for more details.
+Plan optimized by CBO.
 
 Vertex dependency in root stage
 Map 1 <- Map 4 (BROADCAST_EDGE)
@@ -8651,56 +8654,62 @@ Stage-0
       limit:-1
       Stage-1
          Reducer 3
-         File Output Operator [FS_13]
+         File Output Operator [FS_16]
             compressed:true
             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_11]
+            Group By Operator [GBY_14]
             |  aggregations:["count(VALUE._col0)"]
             |  outputColumnNames:["_col0"]
             |  Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
             |<-Reducer 2 [SIMPLE_EDGE]
-               Reduce Output Operator [RS_10]
+               Reduce Output Operator [RS_13]
                   sort order:
                   Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
                   value expressions:_col0 (type: bigint)
-                  Group By Operator [GBY_9]
+                  Group By Operator [GBY_12]
                   |  aggregations:["count(1)"]
                   |  outputColumnNames:["_col0"]
                   |  Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
                   |<-Map 1 [SIMPLE_EDGE]
-                     Reduce Output Operator [RS_8]
+                     Reduce Output Operator [RS_11]
                         Map-reduce partition columns:rand() (type: double)
                         sort order:
                         Statistics:Num rows: 1 Data size: 33 Basic stats: COMPLETE Column stats: NONE
-                        Map Join Operator [MAPJOIN_18]
+                        Map Join Operator [MAPJOIN_21]
                         |  condition map:[{"":"Inner Join 0 to 1"}]
-                        |  keys:{"Map 1":"key (type: string)","Map 4":"key (type: string)"}
+                        |  keys:{"Map 1":"_col0 (type: string)","Map 4":"_col0 (type: string)"}
                         |  Statistics:Num rows: 1 Data size: 33 Basic stats: COMPLETE Column stats: NONE
                         |<-Map 4 [BROADCAST_EDGE]
-                        |  Reduce Output Operator [RS_5]
-                        |     key expressions:key (type: string)
-                        |     Map-reduce partition columns:key (type: string)
+                        |  Reduce Output Operator [RS_7]
+                        |     key expressions:_col0 (type: string)
+                        |     Map-reduce partition columns:_col0 (type: string)
                         |     sort order:+
                         |     Statistics:Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
-                        |     Filter Operator [FIL_17]
-                        |        predicate:key is not null (type: boolean)
+                        |     Select Operator [SEL_3]
+                        |        outputColumnNames:["_col0"]
                         |        Statistics:Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
-                        |        TableScan [TS_1]
-                        |           alias:b
+                        |        Filter Operator [FIL_20]
+                        |           predicate:key is not null (type: boolean)
                         |           Statistics:Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
-                        |<-Filter Operator [FIL_16]
-                              predicate:key is not null (type: boolean)
+                        |           TableScan [TS_2]
+                        |              alias:a
+                        |              Statistics:Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
+                        |<-Select Operator [SEL_1]
+                              outputColumnNames:["_col0"]
                               Statistics:Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
-                              TableScan [TS_0]
-                                 alias:a
+                              Filter Operator [FIL_19]
+                                 predicate:key is not null (type: boolean)
                                  Statistics:Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
+                                 TableScan [TS_0]
+                                    alias:a
+                                    Statistics:Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
 
 PREHOOK: query: explain FROM T1 a LEFT OUTER JOIN T2 c ON c.key+1=a.key select sum(hash(a.key)), sum(hash(a.val)), sum(hash(c.key))
 PREHOOK: type: QUERY
 POSTHOOK: query: explain FROM T1 a LEFT OUTER JOIN T2 c ON c.key+1=a.key select sum(hash(a.key)), sum(hash(a.val)), sum(hash(c.key))
 POSTHOOK: type: QUERY
-Plan not optimized by CBO due to missing statistics. Please check log for more details.
+Plan optimized by CBO.
 
 Vertex dependency in root stage
 Map 1 <- Map 4 (BROADCAST_EDGE)
@@ -8712,47 +8721,56 @@ Stage-0
       limit:-1
       Stage-1
          Reducer 3
-         File Output Operator [FS_11]
+         File Output Operator [FS_14]
             compressed:true
             Statistics:Num rows: 1 Data size: 24 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_9]
+            Group By Operator [GBY_12]
             |  aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)"]
             |  outputColumnNames:["_col0","_col1","_col2"]
             |  Statistics:Num rows: 1 Data size: 24 Basic stats: COMPLETE Column stats: NONE
             |<-Reducer 2 [SIMPLE_EDGE]
-               Reduce Output Operator [RS_8]
+               Reduce Output Operator [RS_11]
                   sort order:
                   Statistics:Num rows: 1 Data size: 24 Basic stats: COMPLETE Column stats: NONE
                   value expressions:_col0 (type: bigint), _col1 (type: bigint), _col2 (type: bigint)
-                  Group By Operator [GBY_7]
+                  Group By Operator [GBY_10]
                   |  aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)"]
                   |  outputColumnNames:["_col0","_col1","_col2"]
                   |  Statistics:Num rows: 1 Data size: 24 Basic stats: COMPLETE Column stats: NONE
                   |<-Map 1 [SIMPLE_EDGE]
-                     Reduce Output Operator [RS_6]
+                     Reduce Output Operator [RS_9]
                         Map-reduce partition columns:rand() (type: double)
                         sort order:
                         Statistics:Num rows: 1 Data size: 33 Basic stats: COMPLETE Column stats: NONE
-                        value expressions:hash(_col0) (type: int), hash(_col1) (type: int), hash(_col5) (type: int)
-                        Map Join Operator [MAPJOIN_14]
-                        |  condition map:[{"":"Left Outer Join0 to 1"}]
-                        |  keys:{"Map 1":"UDFToDouble(key) (type: double)","Map 4":"(key + 1) (type: double)"}
-                        |  outputColumnNames:["_col0","_col1","_col5"]
-                        |  Statistics:Num rows: 1 Data size: 33 Basic stats: COMPLETE Column stats: NONE
-                        |<-Map 4 [BROADCAST_EDGE]
-                        |  Reduce Output Operator [RS_3]
-                        |     key expressions:(key + 1) (type: double)
-                        |     Map-reduce partition columns:(key + 1) (type: double)
-                        |     sort order:+
-                        |     Statistics:Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
-                        |     value expressions:key (type: string)
-                        |     TableScan [TS_1]
-                        |        alias:c
-                        |        Statistics:Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
-                        |<-TableScan [TS_0]
-                              alias:a
-                              Statistics:Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
+                        value expressions:_col0 (type: int), _col1 (type: int), _col2 (type: int)
+                        Select Operator [SEL_7]
+                           outputColumnNames:["_col0","_col1","_col2"]
+                           Statistics:Num rows: 1 Data size: 33 Basic stats: COMPLETE Column stats: NONE
+                           Map Join Operator [MAPJOIN_17]
+                           |  condition map:[{"":"Left Outer Join0 to 1"}]
+                           |  keys:{"Map 1":"UDFToDouble(_col0) (type: double)","Map 4":"(UDFToDouble(_col0) + UDFToDouble(1)) (type: double)"}
+                           |  outputColumnNames:["_col0","_col1","_col2"]
+                           |  Statistics:Num rows: 1 Data size: 33 Basic stats: COMPLETE Column stats: NONE
+                           |<-Map 4 [BROADCAST_EDGE]
+                           |  Reduce Output Operator [RS_5]
+                           |     key expressions:(UDFToDouble(_col0) + UDFToDouble(1)) (type: double)
+                           |     Map-reduce partition columns:(UDFToDouble(_col0) + UDFToDouble(1)) (type: double)
+                           |     sort order:+
+                           |     Statistics:Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
+                           |     value expressions:_col0 (type: string)
+                           |     Select Operator [SEL_3]
+                           |        outputColumnNames:["_col0"]
+                           |        Statistics:Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
+                           |        TableScan [TS_2]
+                           |           alias:c
+                           |           Statistics:Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
+                           |<-Select Operator [SEL_1]
+                                 outputColumnNames:["_col0","_col1"]
+                                 Statistics:Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
+                                 TableScan [TS_0]
+                                    alias:a
+                                    Statistics:Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
 
 PREHOOK: query: explain FROM T1 a RIGHT OUTER JOIN T2 c ON c.key+1=a.key select /*+ STREAMTABLE(a) */ sum(hash(a.key)), sum(hash(a.val)), sum(hash(c.key))
 PREHOOK: type: QUERY

http://git-wip-us.apache.org/repos/asf/hive/blob/855e43df/ql/src/test/results/clientpositive/llap/explainuser_2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/explainuser_2.q.out b/ql/src/test/results/clientpositive/llap/explainuser_2.q.out
index 7b361ac..57cd8ec 100644
--- a/ql/src/test/results/clientpositive/llap/explainuser_2.q.out
+++ b/ql/src/test/results/clientpositive/llap/explainuser_2.q.out
@@ -2586,35 +2586,41 @@ PREHOOK: type: QUERY
 POSTHOOK: query: explain 
 select s1.key as key, s1.value as value from tab s1 join tab s3 on s1.key=s3.key
 POSTHOOK: type: QUERY
-Plan not optimized by CBO due to missing statistics. Please check log for more details.
+Plan optimized by CBO.
 
 Stage-0
    Fetch Operator
       limit:-1
       Stage-1
          Map 1
-         File Output Operator [FS_8]
+         File Output Operator [FS_10]
             compressed:false
             Statistics:Num rows: 133 Data size: 1411 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"}
-            Merge Join Operator [MERGEJOIN_13]
+            Merge Join Operator [MERGEJOIN_15]
             |  condition map:[{"":"Inner Join 0 to 1"}]
-            |  keys:{"0":"key (type: int)","1":"key (type: int)"}
+            |  keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
             |  outputColumnNames:["_col0","_col1"]
             |  Statistics:Num rows: 133 Data size: 1411 Basic stats: COMPLETE Column stats: NONE
             |  
-            |<-Filter Operator [FIL_12]
-            |     predicate:key is not null (type: boolean)
+            |<-Select Operator [SEL_3]
+            |     outputColumnNames:["_col0"]
             |     Statistics:Num rows: 121 Data size: 1283 Basic stats: COMPLETE Column stats: NONE
-            |     TableScan [TS_1]
-            |        alias:s3
-            |        Statistics:Num rows: 242 Data size: 2566 Basic stats: COMPLETE Column stats: NONE
-            |<-Filter Operator [FIL_11]
-                  predicate:key is not null (type: boolean)
+            |     Filter Operator [FIL_14]
+            |        predicate:key is not null (type: boolean)
+            |        Statistics:Num rows: 121 Data size: 1283 Basic stats: COMPLETE Column stats: NONE
+            |        TableScan [TS_2]
+            |           alias:s1
+            |           Statistics:Num rows: 242 Data size: 2566 Basic stats: COMPLETE Column stats: NONE
+            |<-Select Operator [SEL_1]
+                  outputColumnNames:["_col0","_col1"]
                   Statistics:Num rows: 121 Data size: 1283 Basic stats: COMPLETE Column stats: NONE
-                  TableScan [TS_0]
-                     alias:s1
-                     Statistics:Num rows: 242 Data size: 2566 Basic stats: COMPLETE Column stats: NONE
+                  Filter Operator [FIL_13]
+                     predicate:key is not null (type: boolean)
+                     Statistics:Num rows: 121 Data size: 1283 Basic stats: COMPLETE Column stats: NONE
+                     TableScan [TS_0]
+                        alias:s1
+                        Statistics:Num rows: 242 Data size: 2566 Basic stats: COMPLETE Column stats: NONE
 
 PREHOOK: query: explain 
 select s1.key as key, s1.value as value from tab s1 join tab s3 on s1.key=s3.key join tab s2 on s1.value=s2.value
@@ -2685,35 +2691,41 @@ PREHOOK: type: QUERY
 POSTHOOK: query: explain 
 select s1.key as key, s1.value as value from tab s1 join tab2 s3 on s1.key=s3.key
 POSTHOOK: type: QUERY
-Plan not optimized by CBO due to missing statistics. Please check log for more details.
+Plan optimized by CBO.
 
 Stage-0
    Fetch Operator
       limit:-1
       Stage-1
          Map 1
-         File Output Operator [FS_8]
+         File Output Operator [FS_10]
             compressed:false
             Statistics:Num rows: 133 Data size: 1411 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"}
-            Merge Join Operator [MERGEJOIN_13]
+            Merge Join Operator [MERGEJOIN_15]
             |  condition map:[{"":"Inner Join 0 to 1"}]
-            |  keys:{"0":"key (type: int)","1":"key (type: int)"}
+            |  keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
             |  outputColumnNames:["_col0","_col1"]
             |  Statistics:Num rows: 133 Data size: 1411 Basic stats: COMPLETE Column stats: NONE
             |  
-            |<-Filter Operator [FIL_12]
-            |     predicate:key is not null (type: boolean)
+            |<-Select Operator [SEL_3]
+            |     outputColumnNames:["_col0"]
             |     Statistics:Num rows: 121 Data size: 1283 Basic stats: COMPLETE Column stats: NONE
-            |     TableScan [TS_1]
-            |        alias:s3
-            |        Statistics:Num rows: 242 Data size: 2566 Basic stats: COMPLETE Column stats: NONE
-            |<-Filter Operator [FIL_11]
-                  predicate:key is not null (type: boolean)
+            |     Filter Operator [FIL_14]
+            |        predicate:key is not null (type: boolean)
+            |        Statistics:Num rows: 121 Data size: 1283 Basic stats: COMPLETE Column stats: NONE
+            |        TableScan [TS_2]
+            |           alias:s3
+            |           Statistics:Num rows: 242 Data size: 2566 Basic stats: COMPLETE Column stats: NONE
+            |<-Select Operator [SEL_1]
+                  outputColumnNames:["_col0","_col1"]
                   Statistics:Num rows: 121 Data size: 1283 Basic stats: COMPLETE Column stats: NONE
-                  TableScan [TS_0]
-                     alias:s1
-                     Statistics:Num rows: 242 Data size: 2566 Basic stats: COMPLETE Column stats: NONE
+                  Filter Operator [FIL_13]
+                     predicate:key is not null (type: boolean)
+                     Statistics:Num rows: 121 Data size: 1283 Basic stats: COMPLETE Column stats: NONE
+                     TableScan [TS_0]
+                        alias:s1
+                        Statistics:Num rows: 242 Data size: 2566 Basic stats: COMPLETE Column stats: NONE
 
 PREHOOK: query: explain 
 select s1.key as key, s1.value as value from tab s1 join tab2 s3 on s1.key=s3.key join tab2 s2 on s1.value=s2.value


Mime
View raw message