http://git-wip-us.apache.org/repos/asf/hive/blob/55887646/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 067a43c..c86450a 100644
--- a/ql/src/test/results/clientpositive/llap/explainuser_1.q.out
+++ b/ql/src/test/results/clientpositive/llap/explainuser_1.q.out
@@ -457,16 +457,16 @@ Stage-0
                 SHUFFLE [RS_23]
                   PartitionCols:_col0, _col1
                   Group By Operator [GBY_22] (rows=1 width=20)
-                    
Output:["_col0","_col1","_col2"],aggregations:["count()"],keys:_col4, _col1
-                    Select Operator [SEL_21] (rows=2 width=20)
-                      Output:["_col1","_col4"]
-                      Merge Join Operator [MERGEJOIN_57] (rows=2 width=20)
-                        
Conds:RS_17._col0=RS_18._col0(Inner),RS_18._col0=RS_19._col0(Inner),Output:["_col1","_col3","_col4","_col6"],residual
 filter predicates:{((_col3 > 0) or (_col1 >= 0))} {((_col3 + _col6) >= 0)}
+                    
Output:["_col0","_col1","_col2"],aggregations:["count()"],keys:_col5, _col1
+                    Select Operator [SEL_21] (rows=1 width=24)
+                      Output:["_col1","_col5"]
+                      Merge Join Operator [MERGEJOIN_57] (rows=1 width=24)
+                        
Conds:RS_17._col0=RS_18._col0(Inner),RS_18._col0=RS_19._col0(Inner),Output:["_col1","_col2","_col4","_col5","_col7"],residual
 filter predicates:{((_col4 > 0) or _col2)} {((_col4 + _col7) >= 0)}
                       <-Map 1 [SIMPLE_EDGE] llap
                         SHUFFLE [RS_17]
                           PartitionCols:_col0
-                          Select Operator [SEL_2] (rows=18 width=84)
-                            Output:["_col0","_col1"]
+                          Select Operator [SEL_2] (rows=18 width=88)
+                            Output:["_col0","_col1","_col2"]
                             Filter Operator [FIL_36] (rows=18 width=84)
                               predicate:key is not null
                               TableScan [TS_0] (rows=20 width=84)
@@ -547,16 +547,16 @@ Stage-0
                 SHUFFLE [RS_23]
                   PartitionCols:_col0, _col1
                   Group By Operator [GBY_22] (rows=1 width=20)
-                    
Output:["_col0","_col1","_col2"],aggregations:["count()"],keys:_col1, _col4
-                    Select Operator [SEL_21] (rows=1 width=20)
-                      Output:["_col1","_col4"]
-                      Merge Join Operator [MERGEJOIN_57] (rows=1 width=20)
-                        
Conds:RS_17._col0=RS_18._col0(Inner),RS_18._col0=RS_19._col0(Inner),Output:["_col1","_col3","_col4","_col6"],residual
 filter predicates:{((_col3 > 0) or _col1 is not null)} {((_col1 >= 1) or 
(_col4 >= 1L))} {((UDFToLong(_col1) + _col4) >= 0)} {((_col3 + _col6) >= 0)}
+                    
Output:["_col0","_col1","_col2"],aggregations:["count()"],keys:_col1, _col7
+                    Select Operator [SEL_21] (rows=1 width=36)
+                      Output:["_col1","_col7"]
+                      Merge Join Operator [MERGEJOIN_57] (rows=1 width=36)
+                        
Conds:RS_17._col0=RS_18._col0(Inner),RS_18._col0=RS_19._col0(Inner),Output:["_col1","_col2","_col3","_col4","_col6","_col7","_col9"],residual
 filter predicates:{((_col6 > 0) or _col2)} {(_col3 or (_col7 >= 1L))} {((_col4 
+ _col7) >= 0)} {((_col6 + _col9) >= 0)}
                       <-Map 1 [SIMPLE_EDGE] llap
                         SHUFFLE [RS_17]
                           PartitionCols:_col0
-                          Select Operator [SEL_2] (rows=18 width=84)
-                            Output:["_col0","_col1"]
+                          Select Operator [SEL_2] (rows=18 width=99)
+                            Output:["_col0","_col1","_col2","_col3","_col4"]
                             Filter Operator [FIL_36] (rows=18 width=84)
                               predicate:((c_int > 0) and key is not null)
                               TableScan [TS_0] (rows=20 width=84)
@@ -630,16 +630,16 @@ Stage-0
           SHUFFLE [RS_23]
             PartitionCols:_col0, _col1
             Group By Operator [GBY_22] (rows=1 width=20)
-              
Output:["_col0","_col1","_col2"],aggregations:["count()"],keys:_col1, _col4
-              Select Operator [SEL_21] (rows=1 width=20)
-                Output:["_col1","_col4"]
-                Merge Join Operator [MERGEJOIN_54] (rows=1 width=20)
-                  
Conds:RS_17._col0=RS_18._col0(Inner),RS_18._col0=RS_19._col0(Inner),Output:["_col1","_col3","_col4","_col6"],residual
 filter predicates:{((_col3 > 0) or (_col1 >= 0))} {((_col3 + _col6) >= 2)}
+              
Output:["_col0","_col1","_col2"],aggregations:["count()"],keys:_col1, _col5
+              Select Operator [SEL_21] (rows=1 width=24)
+                Output:["_col1","_col5"]
+                Merge Join Operator [MERGEJOIN_54] (rows=1 width=24)
+                  
Conds:RS_17._col0=RS_18._col0(Inner),RS_18._col0=RS_19._col0(Inner),Output:["_col1","_col2","_col4","_col5","_col7"],residual
 filter predicates:{((_col4 > 0) or _col2)} {((_col4 + _col7) >= 2)}
                 <-Map 1 [SIMPLE_EDGE] llap
                   SHUFFLE [RS_17]
                     PartitionCols:_col0
-                    Select Operator [SEL_2] (rows=18 width=84)
-                      Output:["_col0","_col1"]
+                    Select Operator [SEL_2] (rows=18 width=88)
+                      Output:["_col0","_col1","_col2"]
                       Filter Operator [FIL_33] (rows=18 width=84)
                         predicate:key is not null
                         TableScan [TS_0] (rows=20 width=84)
@@ -718,16 +718,16 @@ Stage-0
               SHUFFLE [RS_23]
                 PartitionCols:_col0, _col1
                 Group By Operator [GBY_22] (rows=1 width=20)
-                  
Output:["_col0","_col1","_col2"],aggregations:["count()"],keys:_col1, _col4
-                  Select Operator [SEL_21] (rows=1 width=20)
-                    Output:["_col1","_col4"]
-                    Merge Join Operator [MERGEJOIN_56] (rows=1 width=20)
-                      
Conds:RS_17._col0=RS_18._col0(Inner),RS_18._col0=RS_19._col0(Inner),Output:["_col1","_col3","_col4","_col6"],residual
 filter predicates:{((_col3 > 0) or _col1 is not null)} {((_col1 >= 1) or 
(_col4 >= 1L))} {((UDFToLong(_col1) + _col4) >= 0)} {((_col3 + _col6) >= 0)}
+                  
Output:["_col0","_col1","_col2"],aggregations:["count()"],keys:_col1, _col7
+                  Select Operator [SEL_21] (rows=1 width=36)
+                    Output:["_col1","_col7"]
+                    Merge Join Operator [MERGEJOIN_56] (rows=1 width=36)
+                      
Conds:RS_17._col0=RS_18._col0(Inner),RS_18._col0=RS_19._col0(Inner),Output:["_col1","_col2","_col3","_col4","_col6","_col7","_col9"],residual
 filter predicates:{((_col6 > 0) or _col2)} {(_col3 or (_col7 >= 1L))} {((_col4 
+ _col7) >= 0)} {((_col6 + _col9) >= 0)}
                     <-Map 1 [SIMPLE_EDGE] llap
                       SHUFFLE [RS_17]
                         PartitionCols:_col0
-                        Select Operator [SEL_2] (rows=18 width=84)
-                          Output:["_col0","_col1"]
+                        Select Operator [SEL_2] (rows=18 width=99)
+                          Output:["_col0","_col1","_col2","_col3","_col4"]
                           Filter Operator [FIL_35] (rows=18 width=84)
                             predicate:((c_int > 0) and key is not null)
                             TableScan [TS_0] (rows=20 width=84)
@@ -801,16 +801,16 @@ Stage-0
           SHUFFLE [RS_23]
             PartitionCols:_col0, _col1
             Group By Operator [GBY_22] (rows=1 width=20)
-              
Output:["_col0","_col1","_col2"],aggregations:["count()"],keys:_col1, _col4
-              Select Operator [SEL_21] (rows=1 width=20)
-                Output:["_col1","_col4"]
-                Merge Join Operator [MERGEJOIN_54] (rows=1 width=20)
-                  
Conds:RS_17._col0=RS_18._col0(Inner),RS_18._col0=RS_19._col0(Inner),Output:["_col1","_col3","_col4","_col6"],residual
 filter predicates:{((_col3 > 0) or (_col1 >= 0))} {((_col3 + _col6) >= 0)}
+              
Output:["_col0","_col1","_col2"],aggregations:["count()"],keys:_col1, _col5
+              Select Operator [SEL_21] (rows=1 width=24)
+                Output:["_col1","_col5"]
+                Merge Join Operator [MERGEJOIN_54] (rows=1 width=24)
+                  
Conds:RS_17._col0=RS_18._col0(Inner),RS_18._col0=RS_19._col0(Inner),Output:["_col1","_col2","_col4","_col5","_col7"],residual
 filter predicates:{((_col4 > 0) or _col2)} {((_col4 + _col7) >= 0)}
                 <-Map 1 [SIMPLE_EDGE] llap
                   SHUFFLE [RS_17]
                     PartitionCols:_col0
-                    Select Operator [SEL_2] (rows=18 width=84)
-                      Output:["_col0","_col1"]
+                    Select Operator [SEL_2] (rows=18 width=88)
+                      Output:["_col0","_col1","_col2"]
                       Filter Operator [FIL_33] (rows=18 width=84)
                         predicate:key is not null
                         TableScan [TS_0] (rows=20 width=84)
@@ -1307,8 +1307,8 @@ Stage-0
       File Output Operator [FS_14]
         Select Operator [SEL_13] (rows=24 width=101)
           Output:["_col0","_col1","_col2","_col3","_col4"]
-          Merge Join Operator [MERGEJOIN_42] (rows=24 width=101)
-            
Conds:RS_9._col0=RS_10._col0(Inner),RS_9._col0=RS_11._col0(Inner),Output:["_col1","_col2","_col3","_col4","_col6"],residual
 filter predicates:{((_col1 + _col4) = 2)} {((_col1 > 0) or (_col6 >= 0))}
+          Merge Join Operator [MERGEJOIN_42] (rows=24 width=105)
+            
Conds:RS_9._col0=RS_10._col0(Inner),RS_9._col0=RS_11._col0(Inner),Output:["_col1","_col2","_col3","_col4","_col6","_col7"],residual
 filter predicates:{((_col1 + _col4) = 2)} {((_col1 > 0) or _col7)} {((_col1 > 
0) or (_col6 >= 0))}
           <-Map 1 [SIMPLE_EDGE] llap
             SHUFFLE [RS_9]
               PartitionCols:_col0
@@ -1330,8 +1330,8 @@ Stage-0
           <-Map 4 [SIMPLE_EDGE] llap
             SHUFFLE [RS_11]
               PartitionCols:_col0
-              Select Operator [SEL_8] (rows=18 width=84)
-                Output:["_col0","_col1"]
+              Select Operator [SEL_8] (rows=18 width=88)
+                Output:["_col0","_col1","_col2"]
                 Filter Operator [FIL_23] (rows=18 width=84)
                   predicate:key is not null
                   TableScan [TS_6] (rows=20 width=84)
@@ -1366,8 +1366,8 @@ Stage-0
       File Output Operator [FS_14]
         Select Operator [SEL_13] (rows=24 width=101)
           Output:["_col0","_col1","_col2","_col3","_col4"]
-          Merge Join Operator [MERGEJOIN_42] (rows=24 width=101)
-            
Conds:RS_9._col0=RS_10._col0(Inner),RS_9._col0=RS_11._col0(Inner),Output:["_col1","_col2","_col3","_col4","_col6"],residual
 filter predicates:{((_col1 + _col4) = 2)} {((_col1 > 0) or (_col6 >= 0))}
+          Merge Join Operator [MERGEJOIN_42] (rows=24 width=105)
+            
Conds:RS_9._col0=RS_10._col0(Inner),RS_9._col0=RS_11._col0(Inner),Output:["_col1","_col2","_col3","_col4","_col6","_col7"],residual
 filter predicates:{((_col1 + _col4) = 2)} {((_col1 > 0) or _col7)} {((_col1 > 
0) or (_col6 >= 0))}
           <-Map 1 [SIMPLE_EDGE] llap
             SHUFFLE [RS_9]
               PartitionCols:_col0
@@ -1389,8 +1389,8 @@ Stage-0
           <-Map 4 [SIMPLE_EDGE] llap
             SHUFFLE [RS_11]
               PartitionCols:_col0
-              Select Operator [SEL_8] (rows=18 width=84)
-                Output:["_col0","_col1"]
+              Select Operator [SEL_8] (rows=18 width=88)
+                Output:["_col0","_col1","_col2"]
                 Filter Operator [FIL_23] (rows=18 width=84)
                   predicate:key is not null
                   TableScan [TS_6] (rows=20 width=84)
@@ -1605,16 +1605,16 @@ Stage-0
                   SHUFFLE [RS_35]
                     PartitionCols:_col0, _col1
                     Group By Operator [GBY_34] (rows=1 width=20)
-                      
Output:["_col0","_col1","_col2"],aggregations:["count()"],keys:_col4, _col6
-                      Select Operator [SEL_33] (rows=2 width=20)
-                        Output:["_col4","_col6"]
-                        Merge Join Operator [MERGEJOIN_64] (rows=2 width=20)
-                          
Conds:RS_29._col0=RS_30._col0(Inner),RS_30._col0=RS_31._col0(Inner),Output:["_col1","_col3","_col4","_col6"],residual
 filter predicates:{((_col3 + _col1) >= 0)} {((_col3 > 0) or (_col6 >= 0))}
+                      
Output:["_col0","_col1","_col2"],aggregations:["count()"],keys:_col4, _col7
+                      Select Operator [SEL_33] (rows=2 width=28)
+                        Output:["_col4","_col7"]
+                        Merge Join Operator [MERGEJOIN_64] (rows=2 width=28)
+                          
Conds:RS_29._col0=RS_30._col0(Inner),RS_30._col0=RS_31._col0(Inner),Output:["_col1","_col3","_col4","_col5","_col7","_col8"],residual
 filter predicates:{((_col3 + _col1) >= 0)} {(_col5 or _col8)}
                         <-Map 10 [SIMPLE_EDGE] llap
                           SHUFFLE [RS_31]
                             PartitionCols:_col0
-                            Select Operator [SEL_28] (rows=18 width=84)
-                              Output:["_col0","_col1"]
+                            Select Operator [SEL_28] (rows=18 width=88)
+                              Output:["_col0","_col1","_col2"]
                               Filter Operator [FIL_53] (rows=18 width=84)
                                 predicate:key is not null
                                 TableScan [TS_26] (rows=20 width=84)
@@ -1646,27 +1646,29 @@ Stage-0
                         <-Reducer 9 [SIMPLE_EDGE] llap
                           SHUFFLE [RS_30]
                             PartitionCols:_col0
-                            Filter Operator [FIL_24] (rows=2 width=97)
-                              predicate:_col0 is not null
-                              Limit [LIM_22] (rows=3 width=97)
-                                Number of rows:5
-                                Select Operator [SEL_21] (rows=3 width=97)
-                                  Output:["_col0","_col1","_col2"]
-                                <-Reducer 8 [SIMPLE_EDGE] llap
-                                  SHUFFLE [RS_20]
-                                    Select Operator [SEL_19] (rows=3 width=97)
-                                      Output:["_col0","_col1","_col2"]
-                                      Group By Operator [GBY_18] (rows=3 
width=101)
-                                        
Output:["_col0","_col1","_col2","_col3"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0,
 KEY._col1, KEY._col2
-                                      <-Map 7 [SIMPLE_EDGE] llap
-                                        SHUFFLE [RS_17]
-                                          PartitionCols:_col0, _col1, _col2
-                                          Group By Operator [GBY_16] (rows=3 
width=101)
-                                            
Output:["_col0","_col1","_col2","_col3"],aggregations:["sum(c_int)"],keys:key, 
c_int, c_float
-                                            Filter Operator [FIL_52] (rows=6 
width=93)
-                                              predicate:(((c_int + 1) >= 0) 
and ((c_int > 0) or (c_float >= 0.0)))
-                                              TableScan [TS_13] (rows=20 
width=88)
-                                                
default@cbo_t1,cbo_t1,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int","c_float"]
+                            Select Operator [SEL_25] (rows=2 width=101)
+                              Output:["_col0","_col1","_col2","_col3"]
+                              Filter Operator [FIL_24] (rows=2 width=97)
+                                predicate:_col0 is not null
+                                Limit [LIM_22] (rows=3 width=97)
+                                  Number of rows:5
+                                  Select Operator [SEL_21] (rows=3 width=97)
+                                    Output:["_col0","_col1","_col2"]
+                                  <-Reducer 8 [SIMPLE_EDGE] llap
+                                    SHUFFLE [RS_20]
+                                      Select Operator [SEL_19] (rows=3 
width=97)
+                                        Output:["_col0","_col1","_col2"]
+                                        Group By Operator [GBY_18] (rows=3 
width=101)
+                                          
Output:["_col0","_col1","_col2","_col3"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0,
 KEY._col1, KEY._col2
+                                        <-Map 7 [SIMPLE_EDGE] llap
+                                          SHUFFLE [RS_17]
+                                            PartitionCols:_col0, _col1, _col2
+                                            Group By Operator [GBY_16] (rows=3 
width=101)
+                                              
Output:["_col0","_col1","_col2","_col3"],aggregations:["sum(c_int)"],keys:key, 
c_int, c_float
+                                              Filter Operator [FIL_52] (rows=6 
width=93)
+                                                predicate:(((c_int + 1) >= 0) 
and ((c_int > 0) or (c_float >= 0.0)))
+                                                TableScan [TS_13] (rows=20 
width=88)
+                                                  
default@cbo_t1,cbo_t1,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int","c_float"]
 
 PREHOOK: query: explain select cbo_t1.c_int           from cbo_t1 left semi 
join   cbo_t2 on cbo_t1.key=cbo_t2.key where (cbo_t1.c_int + 1 == 2) and 
(cbo_t1.c_int > 0 or cbo_t1.c_float >= 0)
 PREHOOK: type: QUERY
@@ -6134,35 +6136,33 @@ Stage-0
     limit:-1
     Stage-1
       Reducer 4 llap
-      File Output Operator [FS_16]
-        Group By Operator [GBY_14] (rows=1 width=24)
+      File Output Operator [FS_15]
+        Group By Operator [GBY_13] (rows=1 width=24)
           
Output:["_col0","_col1","_col2"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)"]
         <-Reducer 3 [CUSTOM_SIMPLE_EDGE] llap
-          PARTITION_ONLY_SHUFFLE [RS_13]
-            Group By Operator [GBY_12] (rows=1 width=24)
+          PARTITION_ONLY_SHUFFLE [RS_12]
+            Group By Operator [GBY_11] (rows=1 width=24)
               
Output:["_col0","_col1","_col2"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)"]
             <-Map 2 [CUSTOM_SIMPLE_EDGE] llap
-              PARTITION_ONLY_SHUFFLE [RS_11]
+              PARTITION_ONLY_SHUFFLE [RS_10]
                 PartitionCols:rand()
-                Select Operator [SEL_9] (rows=550 width=87)
-                  Output:["_col0","_col1","_col2"]
-                  Map Join Operator [MAPJOIN_26] (rows=550 width=87)
-                    Conds:RS_6.UDFToDouble(_col0)=SEL_5.(UDFToDouble(_col0) + 
1.0D)(Inner),Output:["_col0","_col1","_col2"]
-                  <-Map 1 [BROADCAST_EDGE] llap
-                    BROADCAST [RS_6]
-                      PartitionCols:UDFToDouble(_col0)
-                      Select Operator [SEL_2] (rows=1 width=368)
-                        Output:["_col0","_col1"]
-                        Filter Operator [FIL_19] (rows=1 width=368)
-                          predicate:key is not null
-                          TableScan [TS_0] (rows=1 width=368)
-                            
default@t1_n119,a,Tbl:COMPLETE,Col:NONE,Output:["key","val"]
-                  <-Select Operator [SEL_5] (rows=500 width=87)
-                      Output:["_col0"]
-                      Filter Operator [FIL_20] (rows=500 width=87)
+                Map Join Operator [MAPJOIN_25] (rows=550 width=12)
+                  
Conds:RS_6._col2=SEL_5._col1(Inner),Output:["_col0","_col1","_col3"]
+                <-Map 1 [BROADCAST_EDGE] llap
+                  BROADCAST [RS_6]
+                    PartitionCols:_col2
+                    Select Operator [SEL_2] (rows=1 width=368)
+                      Output:["_col0","_col1","_col2"]
+                      Filter Operator [FIL_18] (rows=1 width=368)
                         predicate:key is not null
-                        TableScan [TS_3] (rows=500 width=87)
-                          
default@src,c,Tbl:COMPLETE,Col:COMPLETE,Output:["key"]
+                        TableScan [TS_0] (rows=1 width=368)
+                          
default@t1_n119,a,Tbl:COMPLETE,Col:NONE,Output:["key","val"]
+                <-Select Operator [SEL_5] (rows=500 width=12)
+                    Output:["_col0","_col1"]
+                    Filter Operator [FIL_19] (rows=500 width=87)
+                      predicate:key is not null
+                      TableScan [TS_3] (rows=500 width=87)
+                        default@src,c,Tbl:COMPLETE,Col:COMPLETE,Output:["key"]
 
 PREHOOK: query: FROM T1_n119 a JOIN src 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
@@ -6245,35 +6245,33 @@ Stage-0
     limit:-1
     Stage-1
       Reducer 3 llap
-      File Output Operator [FS_16]
-        Group By Operator [GBY_14] (rows=1 width=16)
+      File Output Operator [FS_15]
+        Group By Operator [GBY_13] (rows=1 width=16)
           
Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"]
         <-Reducer 2 [CUSTOM_SIMPLE_EDGE] llap
-          PARTITION_ONLY_SHUFFLE [RS_13]
-            Group By Operator [GBY_12] (rows=1 width=16)
+          PARTITION_ONLY_SHUFFLE [RS_12]
+            Group By Operator [GBY_11] (rows=1 width=16)
               
Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"]
             <-Map 1 [CUSTOM_SIMPLE_EDGE] llap
-              PARTITION_ONLY_SHUFFLE [RS_11]
+              PARTITION_ONLY_SHUFFLE [RS_10]
                 PartitionCols:rand()
-                Select Operator [SEL_9] (rows=1 width=202)
-                  Output:["_col0","_col1"]
-                  Map Join Operator [MAPJOIN_31] (rows=1 width=202)
-                    
Conds:SEL_2._col0=RS_7._col0(Inner),Output:["_col0","_col1"]
-                  <-Map 4 [BROADCAST_EDGE] llap
-                    BROADCAST [RS_7]
-                      PartitionCols:_col0
-                      Select Operator [SEL_5] (rows=1 width=184)
-                        Output:["_col0"]
-                        Filter Operator [FIL_20] (rows=1 width=184)
-                          predicate:val is not null
-                          TableScan [TS_3] (rows=1 width=184)
-                            
default@t1_n119,v,Tbl:COMPLETE,Col:NONE,Output:["val"]
-                  <-Select Operator [SEL_2] (rows=1 width=184)
-                      Output:["_col0"]
+                Map Join Operator [MAPJOIN_30] (rows=1 width=202)
+                  Conds:SEL_2._col0=RS_7._col0(Inner),Output:["_col1","_col3"]
+                <-Map 4 [BROADCAST_EDGE] llap
+                  BROADCAST [RS_7]
+                    PartitionCols:_col0
+                    Select Operator [SEL_5] (rows=1 width=184)
+                      Output:["_col0","_col1"]
                       Filter Operator [FIL_19] (rows=1 width=184)
-                        predicate:key is not null
-                        TableScan [TS_0] (rows=1 width=184)
-                          
default@t1_n119,k,Tbl:COMPLETE,Col:NONE,Output:["key"]
+                        predicate:val is not null
+                        TableScan [TS_3] (rows=1 width=184)
+                          
default@t1_n119,v,Tbl:COMPLETE,Col:NONE,Output:["val"]
+                <-Select Operator [SEL_2] (rows=1 width=184)
+                    Output:["_col0","_col1"]
+                    Filter Operator [FIL_18] (rows=1 width=184)
+                      predicate:key is not null
+                      TableScan [TS_0] (rows=1 width=184)
+                        default@t1_n119,k,Tbl:COMPLETE,Col:NONE,Output:["key"]
 
 PREHOOK: query: explain select sum(hash(k.key)), sum(hash(v.val)) from T1_n119 
k join T1_n119 v on k.key=v.key
 PREHOOK: type: QUERY
@@ -6295,35 +6293,33 @@ Stage-0
     limit:-1
     Stage-1
       Reducer 4 llap
-      File Output Operator [FS_16]
-        Group By Operator [GBY_14] (rows=1 width=16)
+      File Output Operator [FS_15]
+        Group By Operator [GBY_13] (rows=1 width=16)
           
Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"]
         <-Reducer 3 [CUSTOM_SIMPLE_EDGE] llap
-          PARTITION_ONLY_SHUFFLE [RS_13]
-            Group By Operator [GBY_12] (rows=1 width=16)
+          PARTITION_ONLY_SHUFFLE [RS_12]
+            Group By Operator [GBY_11] (rows=1 width=16)
               
Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"]
             <-Map 2 [CUSTOM_SIMPLE_EDGE] llap
-              PARTITION_ONLY_SHUFFLE [RS_11]
+              PARTITION_ONLY_SHUFFLE [RS_10]
                 PartitionCols:rand()
-                Select Operator [SEL_9] (rows=1 width=202)
-                  Output:["_col0","_col1"]
-                  Map Join Operator [MAPJOIN_31] (rows=1 width=202)
-                    
Conds:RS_6._col0=SEL_5._col0(Inner),Output:["_col0","_col2"]
-                  <-Map 1 [BROADCAST_EDGE] llap
-                    BROADCAST [RS_6]
-                      PartitionCols:_col0
-                      Select Operator [SEL_2] (rows=1 width=184)
-                        Output:["_col0"]
-                        Filter Operator [FIL_19] (rows=1 width=184)
-                          predicate:key is not null
-                          TableScan [TS_0] (rows=1 width=184)
-                            
default@t1_n119,k,Tbl:COMPLETE,Col:NONE,Output:["key"]
-                  <-Select Operator [SEL_5] (rows=1 width=368)
+                Map Join Operator [MAPJOIN_30] (rows=1 width=202)
+                  Conds:RS_6._col0=SEL_5._col0(Inner),Output:["_col1","_col3"]
+                <-Map 1 [BROADCAST_EDGE] llap
+                  BROADCAST [RS_6]
+                    PartitionCols:_col0
+                    Select Operator [SEL_2] (rows=1 width=184)
                       Output:["_col0","_col1"]
-                      Filter Operator [FIL_20] (rows=1 width=368)
+                      Filter Operator [FIL_18] (rows=1 width=184)
                         predicate:key is not null
-                        TableScan [TS_3] (rows=1 width=368)
-                          
default@t1_n119,v,Tbl:COMPLETE,Col:NONE,Output:["key","val"]
+                        TableScan [TS_0] (rows=1 width=184)
+                          
default@t1_n119,k,Tbl:COMPLETE,Col:NONE,Output:["key"]
+                <-Select Operator [SEL_5] (rows=1 width=368)
+                    Output:["_col0","_col1"]
+                    Filter Operator [FIL_19] (rows=1 width=368)
+                      predicate:key is not null
+                      TableScan [TS_3] (rows=1 width=368)
+                        
default@t1_n119,v,Tbl:COMPLETE,Col:NONE,Output:["key","val"]
 
 PREHOOK: query: explain select count(1) from  T1_n119 a join T1_n119 b on 
a.key = b.key
 PREHOOK: type: QUERY
@@ -6408,16 +6404,16 @@ Stage-0
                 Select Operator [SEL_7] (rows=1 width=404)
                   Output:["_col0","_col1","_col2"]
                   Map Join Operator [MAPJOIN_22] (rows=1 width=404)
-                    Conds:SEL_1.UDFToDouble(_col0)=RS_5.(UDFToDouble(_col0) + 
1.0D)(Left Outer),Output:["_col0","_col1","_col2"]
+                    Conds:SEL_1._col2=RS_5._col1(Left 
Outer),Output:["_col0","_col1","_col3"]
                   <-Map 4 [BROADCAST_EDGE] llap
                     BROADCAST [RS_5]
-                      PartitionCols:(UDFToDouble(_col0) + 1.0D)
+                      PartitionCols:_col1
                       Select Operator [SEL_3] (rows=1 width=184)
-                        Output:["_col0"]
+                        Output:["_col0","_col1"]
                         TableScan [TS_2] (rows=1 width=184)
                           default@t2_n70,c,Tbl:COMPLETE,Col:NONE,Output:["key"]
                   <-Select Operator [SEL_1] (rows=1 width=368)
-                      Output:["_col0","_col1"]
+                      Output:["_col0","_col1","_col2"]
                       TableScan [TS_0] (rows=1 width=368)
                         
default@t1_n119,a,Tbl:COMPLETE,Col:NONE,Output:["key","val"]
 
@@ -6456,16 +6452,16 @@ Stage-0
                 Select Operator [SEL_7] (rows=1 width=404)
                   Output:["_col0","_col1","_col2"]
                   Map Join Operator [MAPJOIN_17] (rows=1 width=404)
-                    Conds:RS_4.UDFToDouble(_col0)=SEL_3.(UDFToDouble(_col0) + 
1.0D)(Right Outer),Output:["_col0","_col1","_col2"]
+                    Conds:RS_4._col2=SEL_3._col1(Right 
Outer),Output:["_col0","_col1","_col3"]
                   <-Map 1 [BROADCAST_EDGE] llap
                     BROADCAST [RS_4]
-                      PartitionCols:UDFToDouble(_col0)
+                      PartitionCols:_col2
                       Select Operator [SEL_1] (rows=1 width=368)
-                        Output:["_col0","_col1"]
+                        Output:["_col0","_col1","_col2"]
                         TableScan [TS_0] (rows=1 width=368)
                           
default@t1_n119,a,Tbl:COMPLETE,Col:NONE,Output:["key","val"]
                   <-Select Operator [SEL_3] (rows=1 width=184)
-                      Output:["_col0"]
+                      Output:["_col0","_col1"]
                       TableScan [TS_2] (rows=1 width=184)
                         default@t2_n70,c,Tbl:COMPLETE,Col:NONE,Output:["key"]
 
@@ -6504,19 +6500,19 @@ Stage-0
                 Select Operator [SEL_7] (rows=1 width=404)
                   Output:["_col0","_col1","_col2"]
                   Merge Join Operator [MERGEJOIN_15] (rows=1 width=404)
-                    Conds:RS_4.UDFToDouble(_col0)=RS_5.(UDFToDouble(_col0) + 
1.0D)(Outer),Output:["_col0","_col1","_col2"]
+                    
Conds:RS_4._col2=RS_5._col1(Outer),Output:["_col0","_col1","_col3"]
                   <-Map 1 [SIMPLE_EDGE] llap
                     SHUFFLE [RS_4]
-                      PartitionCols:UDFToDouble(_col0)
+                      PartitionCols:_col2
                       Select Operator [SEL_1] (rows=1 width=368)
-                        Output:["_col0","_col1"]
+                        Output:["_col0","_col1","_col2"]
                         TableScan [TS_0] (rows=1 width=368)
                           
default@t1_n119,a,Tbl:COMPLETE,Col:NONE,Output:["key","val"]
                   <-Map 5 [SIMPLE_EDGE] llap
                     SHUFFLE [RS_5]
-                      PartitionCols:(UDFToDouble(_col0) + 1.0D)
+                      PartitionCols:_col1
                       Select Operator [SEL_3] (rows=1 width=184)
-                        Output:["_col0"]
+                        Output:["_col0","_col1"]
                         TableScan [TS_2] (rows=1 width=184)
                           default@t2_n70,c,Tbl:COMPLETE,Col:NONE,Output:["key"]
 
@@ -6553,16 +6549,16 @@ Stage-0
                 Select Operator [SEL_7] (rows=1 width=202)
                   Output:["_col0","_col1"]
                   Map Join Operator [MAPJOIN_17] (rows=1 width=202)
-                    Conds:SEL_1.(UDFToDouble(_col0) + 
1.0D)=RS_5.UDFToDouble(_col0)(Left Outer),Output:["_col0","_col2"]
+                    Conds:SEL_1._col1=RS_5._col1(Left 
Outer),Output:["_col0","_col2"]
                   <-Map 4 [BROADCAST_EDGE] llap
                     BROADCAST [RS_5]
-                      PartitionCols:UDFToDouble(_col0)
+                      PartitionCols:_col1
                       Select Operator [SEL_3] (rows=1 width=368)
                         Output:["_col0","_col1"]
                         TableScan [TS_2] (rows=1 width=368)
                           
default@t1_n119,v,Tbl:COMPLETE,Col:NONE,Output:["key","val"]
                   <-Select Operator [SEL_1] (rows=1 width=184)
-                      Output:["_col0"]
+                      Output:["_col0","_col1"]
                       TableScan [TS_0] (rows=1 width=184)
                         default@t1_n119,k,Tbl:COMPLETE,Col:NONE,Output:["key"]
 

http://git-wip-us.apache.org/repos/asf/hive/blob/55887646/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 fd89f4a..1dd9a0f 100644
--- a/ql/src/test/results/clientpositive/llap/explainuser_2.q.out
+++ b/ql/src/test/results/clientpositive/llap/explainuser_2.q.out
@@ -209,7 +209,7 @@ Stage-0
           <-Map 5 [SIMPLE_EDGE] vectorized, llap
             SHUFFLE [RS_55]
               PartitionCols:_col0
-              Select Operator [SEL_54] (rows=500 width=369)
+              Select Operator [SEL_54] (rows=500 width=91)
                 Output:["_col0"]
                 Filter Operator [FIL_53] (rows=500 width=91)
                   predicate:value is not null
@@ -348,27 +348,27 @@ Stage-0
                 SHUFFLE [RS_49]
                   PartitionCols:_col0, _col1, _col2
                   Group By Operator [GBY_48] (rows=2 width=285)
-                    
Output:["_col0","_col1","_col2","_col3","_col4","_col5"],aggregations:["count(_col11)","count(_col21)","count(_col3)"],keys:_col10,
 _col20, _col2
+                    
Output:["_col0","_col1","_col2","_col3","_col4","_col5"],aggregations:["count(_col8)","count(_col15)","count(_col3)"],keys:_col7,
 _col14, _col2
                     Top N Key Operator [TNK_91] (rows=28 width=534)
-                      keys:_col10, _col20, _col2,sort order:+++,top n:100
+                      keys:_col7, _col14, _col2,sort order:+++,top n:100
                       Merge Join Operator [MERGEJOIN_188] (rows=28 width=534)
-                        Conds:RS_44._col1, _col3=RS_45._col15, 
_col17(Inner),Output:["_col2","_col3","_col10","_col11","_col20","_col21"]
+                        Conds:RS_44._col1, _col3=RS_45._col10, 
_col12(Inner),Output:["_col2","_col3","_col7","_col8","_col14","_col15"]
                       <-Reducer 10 [SIMPLE_EDGE] llap
                         SHUFFLE [RS_45]
-                          PartitionCols:_col15, _col17
+                          PartitionCols:_col10, _col12
                           Select Operator [SEL_40] (rows=2 width=447)
-                            Output:["_col4","_col5","_col14","_col15","_col17"]
+                            Output:["_col2","_col3","_col9","_col10","_col12"]
                             Merge Join Operator [MERGEJOIN_187] (rows=2 
width=447)
-                              Conds:RS_37._col4, _col2=RS_38._col4, 
_col2(Inner),Output:["_col0","_col1","_col14","_col15","_col17"]
+                              Conds:RS_37._col2, _col4=RS_38._col1, 
_col3(Inner),Output:["_col0","_col1","_col9","_col10","_col12"]
                             <-Reducer 11 [SIMPLE_EDGE] llap
                               SHUFFLE [RS_38]
-                                PartitionCols:_col4, _col2
+                                PartitionCols:_col1, _col3
                                 Merge Join Operator [MERGEJOIN_186] (rows=5 
width=356)
-                                  
Conds:RS_212._col0=RS_200._col0(Inner),Output:["_col2","_col3","_col4","_col5"]
+                                  
Conds:RS_212._col0=RS_200._col0(Inner),Output:["_col1","_col2","_col3","_col4"]
                                 <-Map 6 [SIMPLE_EDGE] vectorized, llap
                                   SHUFFLE [RS_200]
                                     PartitionCols:_col0
-                                    Select Operator [SEL_197] (rows=5 
width=178)
+                                    Select Operator [SEL_197] (rows=5 width=87)
                                       Output:["_col0"]
                                       Filter Operator [FIL_194] (rows=5 
width=178)
                                         predicate:((value) IN ('2000Q1', 
'2000Q2', '2000Q3') and key is not null)
@@ -377,22 +377,22 @@ Stage-0
                                 <-Map 15 [SIMPLE_EDGE] vectorized, llap
                                   SHUFFLE [RS_212]
                                     PartitionCols:_col0
-                                    Select Operator [SEL_211] (rows=7 
width=531)
-                                      
Output:["_col0","_col2","_col3","_col4","_col5"]
+                                    Select Operator [SEL_211] (rows=7 
width=443)
+                                      
Output:["_col0","_col1","_col2","_col3","_col4"]
                                       Filter Operator [FIL_210] (rows=7 
width=534)
                                         predicate:((v1 = 'srv1') and k1 is not 
null and k2 is not null and k3 is not null and v2 is not null and v3 is not 
null)
                                         TableScan [TS_18] (rows=85 width=534)
                                           
default@sr,sr,Tbl:COMPLETE,Col:COMPLETE,Output:["k1","v1","k2","v2","k3","v3"]
                             <-Reducer 9 [SIMPLE_EDGE] llap
                               SHUFFLE [RS_37]
-                                PartitionCols:_col4, _col2
+                                PartitionCols:_col2, _col4
                                 Merge Join Operator [MERGEJOIN_185] (rows=2 
width=352)
-                                  
Conds:RS_34._col1=RS_209._col1(Inner),Output:["_col0","_col1","_col2","_col4"]
+                                  
Conds:RS_34._col1=RS_209._col0(Inner),Output:["_col0","_col1","_col2","_col4"]
                                 <-Map 14 [SIMPLE_EDGE] vectorized, llap
                                   SHUFFLE [RS_209]
-                                    PartitionCols:_col1
-                                    Select Operator [SEL_208] (rows=2 
width=180)
-                                      Output:["_col1"]
+                                    PartitionCols:_col0
+                                    Select Operator [SEL_208] (rows=2 width=89)
+                                      Output:["_col0"]
                                       Filter Operator [FIL_207] (rows=2 
width=175)
                                         predicate:((key = 'src1key') and value 
is not null)
                                         TableScan [TS_15] (rows=25 width=175)
@@ -401,12 +401,12 @@ Stage-0
                                   SHUFFLE [RS_34]
                                     PartitionCols:_col1
                                     Merge Join Operator [MERGEJOIN_184] 
(rows=2 width=352)
-                                      
Conds:RS_31._col3=RS_206._col1(Inner),Output:["_col0","_col1","_col2","_col4"]
+                                      
Conds:RS_31._col3=RS_206._col0(Inner),Output:["_col0","_col1","_col2","_col4"]
                                     <-Map 13 [SIMPLE_EDGE] vectorized, llap
                                       SHUFFLE [RS_206]
-                                        PartitionCols:_col1
-                                        Select Operator [SEL_205] (rows=6 
width=185)
-                                          Output:["_col1"]
+                                        PartitionCols:_col0
+                                        Select Operator [SEL_205] (rows=6 
width=91)
+                                          Output:["_col0"]
                                           Filter Operator [FIL_204] (rows=6 
width=178)
                                             predicate:((key = 'srcpartkey') 
and value is not null)
                                             TableScan [TS_12] (rows=2000 
width=178)
@@ -419,7 +419,7 @@ Stage-0
                                         <-Map 6 [SIMPLE_EDGE] vectorized, llap
                                           SHUFFLE [RS_199]
                                             PartitionCols:_col0
-                                            Select Operator [SEL_196] (rows=2 
width=178)
+                                            Select Operator [SEL_196] (rows=2 
width=87)
                                               Output:["_col0"]
                                               Filter Operator [FIL_193] 
(rows=2 width=178)
                                                 predicate:((value = 'd1value') 
and key is not null)
@@ -427,7 +427,7 @@ Stage-0
                                         <-Map 12 [SIMPLE_EDGE] vectorized, llap
                                           SHUFFLE [RS_203]
                                             PartitionCols:_col0
-                                            Select Operator [SEL_202] (rows=7 
width=531)
+                                            Select Operator [SEL_202] (rows=7 
width=443)
                                               
Output:["_col0","_col1","_col2","_col3","_col4"]
                                               Filter Operator [FIL_201] 
(rows=7 width=534)
                                                 predicate:((v3 = 'ssv3') and 
k1 is not null and k2 is not null and k3 is not null and v1 is not null and v2 
is not null)
@@ -441,7 +441,7 @@ Stage-0
                           <-Map 6 [SIMPLE_EDGE] vectorized, llap
                             SHUFFLE [RS_198]
                               PartitionCols:_col0
-                              Select Operator [SEL_195] (rows=5 width=178)
+                              Select Operator [SEL_195] (rows=5 width=87)
                                 Output:["_col0"]
                                 Filter Operator [FIL_192] (rows=5 width=178)
                                   predicate:((value) IN ('2000Q1', '2000Q2', 
'2000Q3') and key is not null)
@@ -512,12 +512,12 @@ Stage-0
                 Select Operator [SEL_127] (rows=39 width=268)
                   Output:["_col0","_col1","_col2"]
                   Merge Join Operator [MERGEJOIN_126] (rows=39 width=268)
-                    
Conds:RS_22._col3=RS_170._col1(Inner),Output:["_col1","_col2","_col5"]
+                    
Conds:RS_22._col3=RS_170._col0(Inner),Output:["_col1","_col2","_col4"]
                   <-Reducer 11 [SIMPLE_EDGE] vectorized, llap
                     SHUFFLE [RS_170]
-                      PartitionCols:_col1
-                      Select Operator [SEL_169] (rows=262 width=178)
-                        Output:["_col1"]
+                      PartitionCols:_col0
+                      Select Operator [SEL_169] (rows=262 width=91)
+                        Output:["_col0"]
                         Group By Operator [GBY_168] (rows=262 width=178)
                           Output:["_col0","_col1"],keys:KEY._col0, KEY._col1
                         <-Union 10 [SIMPLE_EDGE]
@@ -574,12 +574,12 @@ Stage-0
                 Select Operator [SEL_132] (rows=39 width=268)
                   Output:["_col0","_col1","_col2"]
                   Merge Join Operator [MERGEJOIN_131] (rows=39 width=268)
-                    
Conds:RS_48._col3=RS_175._col1(Inner),Output:["_col1","_col2","_col5"]
+                    
Conds:RS_48._col3=RS_175._col0(Inner),Output:["_col1","_col2","_col4"]
                   <-Reducer 15 [SIMPLE_EDGE] vectorized, llap
                     SHUFFLE [RS_175]
-                      PartitionCols:_col1
-                      Select Operator [SEL_174] (rows=262 width=178)
-                        Output:["_col1"]
+                      PartitionCols:_col0
+                      Select Operator [SEL_174] (rows=262 width=91)
+                        Output:["_col0"]
                         Group By Operator [GBY_173] (rows=262 width=178)
                           Output:["_col0","_col1"],keys:KEY._col0, KEY._col1
                         <-Union 14 [SIMPLE_EDGE]
@@ -702,12 +702,12 @@ Stage-0
                         Select Operator [SEL_246] (rows=48 width=177)
                           Output:["_col0","_col1"]
                           Merge Join Operator [MERGEJOIN_245] (rows=48 
width=177)
-                            
Conds:RS_58._col3=RS_340._col1(Inner),Output:["_col1","_col2"]
+                            
Conds:RS_58._col3=RS_340._col0(Inner),Output:["_col1","_col2"]
                           <-Reducer 20 [SIMPLE_EDGE] vectorized, llap
                             SHUFFLE [RS_340]
-                              PartitionCols:_col1
-                              Select Operator [SEL_339] (rows=381 width=178)
-                                Output:["_col1"]
+                              PartitionCols:_col0
+                              Select Operator [SEL_339] (rows=381 width=91)
+                                Output:["_col0"]
                                 Group By Operator [GBY_338] (rows=381 
width=178)
                                   Output:["_col0","_col1"],keys:KEY._col0, 
KEY._col1
                                 <-Union 19 [SIMPLE_EDGE]
@@ -785,7 +785,7 @@ Stage-0
                         Select Operator [SEL_232] (rows=39 width=177)
                           Output:["_col0","_col1"]
                           Merge Join Operator [MERGEJOIN_231] (rows=39 
width=177)
-                            
Conds:RS_22._col3=RS_329._col1(Inner),Output:["_col1","_col2"]
+                            
Conds:RS_22._col3=RS_329._col0(Inner),Output:["_col1","_col2"]
                           <-Reducer 2 [SIMPLE_EDGE] llap
                             SHUFFLE [RS_22]
                               PartitionCols:_col3
@@ -801,9 +801,9 @@ Stage-0
                                    Please refer to the previous Select 
Operator [SEL_324]
                           <-Reducer 14 [SIMPLE_EDGE] vectorized, llap
                             SHUFFLE [RS_329]
-                              PartitionCols:_col1
-                              Select Operator [SEL_328] (rows=262 width=178)
-                                Output:["_col1"]
+                              PartitionCols:_col0
+                              Select Operator [SEL_328] (rows=262 width=91)
+                                Output:["_col0"]
                                 Group By Operator [GBY_327] (rows=262 
width=178)
                                   Output:["_col0","_col1"],keys:KEY._col0, 
KEY._col1
                                 <-Union 13 [SIMPLE_EDGE]
@@ -837,16 +837,16 @@ Stage-0
                 Select Operator [SEL_241] (rows=55 width=177)
                   Output:["_col0","_col1"]
                   Merge Join Operator [MERGEJOIN_240] (rows=55 width=177)
-                    
Conds:RS_111._col3=RS_337._col1(Inner),Output:["_col1","_col2"]
+                    
Conds:RS_111._col3=RS_337._col0(Inner),Output:["_col1","_col2"]
                   <-Reducer 2 [SIMPLE_EDGE] llap
                     SHUFFLE [RS_111]
                       PartitionCols:_col3
                        Please refer to the previous Merge Join Operator 
[MERGEJOIN_225]
                   <-Reducer 29 [SIMPLE_EDGE] vectorized, llap
                     SHUFFLE [RS_337]
-                      PartitionCols:_col1
-                      Select Operator [SEL_336] (rows=440 width=178)
-                        Output:["_col1"]
+                      PartitionCols:_col0
+                      Select Operator [SEL_336] (rows=440 width=91)
+                        Output:["_col0"]
                         Group By Operator [GBY_335] (rows=440 width=178)
                           Output:["_col0","_col1"],keys:KEY._col0, KEY._col1
                         <-Union 28 [SIMPLE_EDGE]
@@ -1083,11 +1083,11 @@ Stage-0
                 SHUFFLE [RS_229]
                   PartitionCols:_col0, _col1, _col2
                   Group By Operator [GBY_228] (rows=1464 width=10)
-                    
Output:["_col0","_col1","_col2","_col3","_col4","_col5"],aggregations:["count(_col11)","count(_col21)","count(_col3)"],keys:_col10,
 _col20, _col2
+                    
Output:["_col0","_col1","_col2","_col3","_col4","_col5"],aggregations:["count(_col8)","count(_col15)","count(_col3)"],keys:_col7,
 _col14, _col2
                     Top N Key Operator [TNK_227] (rows=1464 width=10)
-                      keys:_col10, _col20, _col2,sort order:+++,top n:100
+                      keys:_col7, _col14, _col2,sort order:+++,top n:100
                       Map Join Operator [MAPJOIN_226] (rows=1464 width=10)
-                        Conds:RS_209._col1, _col3=SEL_225._col15, 
_col17(Inner),Output:["_col2","_col3","_col10","_col11","_col20","_col21"]
+                        Conds:RS_209._col1, _col3=SEL_225._col10, 
_col12(Inner),Output:["_col2","_col3","_col7","_col8","_col14","_col15"]
                       <-Map 2 [BROADCAST_EDGE] vectorized, llap
                         BROADCAST [RS_209]
                           PartitionCols:_col1, _col3
@@ -1109,19 +1109,19 @@ Stage-0
                                 TableScan [TS_3] (rows=500 width=10)
                                   
default@src,d3,Tbl:COMPLETE,Col:NONE,Output:["key","value"]
                       <-Select Operator [SEL_225] (rows=1331 width=10)
-                          Output:["_col4","_col5","_col14","_col15","_col17"]
+                          Output:["_col2","_col3","_col9","_col10","_col12"]
                           Map Join Operator [MAPJOIN_224] (rows=1331 width=10)
-                            Conds:MAPJOIN_223._col4, _col2=RS_219._col4, 
_col2(Inner),Output:["_col0","_col1","_col14","_col15","_col17"]
+                            Conds:MAPJOIN_223._col2, _col4=RS_219._col1, 
_col3(Inner),Output:["_col0","_col1","_col9","_col10","_col12"]
                           <-Map 10 [BROADCAST_EDGE] vectorized, llap
                             BROADCAST [RS_219]
-                              PartitionCols:_col4, _col2
+                              PartitionCols:_col1, _col3
                               Map Join Operator [MAPJOIN_218] (rows=550 
width=10)
-                                
Conds:RS_215._col0=SEL_217._col0(Inner),Output:["_col2","_col3","_col4","_col5"]
+                                
Conds:RS_215._col0=SEL_217._col0(Inner),Output:["_col1","_col2","_col3","_col4"]
                               <-Map 9 [BROADCAST_EDGE] vectorized, llap
                                 BROADCAST [RS_215]
                                   PartitionCols:_col0
                                   Select Operator [SEL_214] (rows=42 width=34)
-                                    
Output:["_col0","_col2","_col3","_col4","_col5"]
+                                    
Output:["_col0","_col1","_col2","_col3","_col4"]
                                     Filter Operator [FIL_213] (rows=42 
width=34)
                                       predicate:((v1 = 'srv1') and k1 is not 
null and k2 is not null and k3 is not null and v2 is not null and v3 is not 
null)
                                       TableScan [TS_18] (rows=85 width=34)
@@ -1133,18 +1133,18 @@ Stage-0
                                     TableScan [TS_21] (rows=500 width=10)
                                       
default@src,d2,Tbl:COMPLETE,Col:NONE,Output:["key","value"]
                           <-Map Join Operator [MAPJOIN_223] (rows=1210 
width=10)
-                              
Conds:MAPJOIN_222._col1=RS_212._col1(Inner),Output:["_col0","_col1","_col2","_col4"]
+                              
Conds:MAPJOIN_222._col1=RS_212._col0(Inner),Output:["_col0","_col1","_col2","_col4"]
                             <-Map 8 [BROADCAST_EDGE] vectorized, llap
                               BROADCAST [RS_212]
-                                PartitionCols:_col1
+                                PartitionCols:_col0
                                 Select Operator [SEL_211] (rows=12 width=7)
-                                  Output:["_col1"]
+                                  Output:["_col0"]
                                   Filter Operator [FIL_210] (rows=12 width=7)
                                     predicate:((key = 'src1key') and value is 
not null)
                                     TableScan [TS_15] (rows=25 width=7)
                                       
default@src1,src1,Tbl:COMPLETE,Col:NONE,Output:["key","value"]
                             <-Map Join Operator [MAPJOIN_222] (rows=1100 
width=10)
-                                
Conds:RS_202._col3=SEL_221._col1(Inner),Output:["_col0","_col1","_col2","_col4"]
+                                
Conds:RS_202._col3=SEL_221._col0(Inner),Output:["_col0","_col1","_col2","_col4"]
                               <-Map 4 [BROADCAST_EDGE] vectorized, llap
                                 BROADCAST [RS_202]
                                   PartitionCols:_col3
@@ -1166,7 +1166,7 @@ Stage-0
                                         TableScan [TS_9] (rows=500 width=10)
                                           
default@src,d1,Tbl:COMPLETE,Col:NONE,Output:["key","value"]
                               <-Select Operator [SEL_221] (rows=1000 width=10)
-                                  Output:["_col1"]
+                                  Output:["_col0"]
                                   Filter Operator [FIL_220] (rows=1000 
width=10)
                                     predicate:((key = 'srcpartkey') and value 
is not null)
                                     TableScan [TS_12] (rows=2000 width=10)
@@ -1226,7 +1226,7 @@ Stage-0
                 Select Operator [SEL_205] (rows=605 width=10)
                   Output:["_col0","_col1","_col2"]
                   Map Join Operator [MAPJOIN_204] (rows=605 width=10)
-                    
Conds:RS_201._col3=SEL_203._col1(Inner),Output:["_col1","_col2","_col5"]
+                    
Conds:RS_201._col3=SEL_203._col0(Inner),Output:["_col1","_col2","_col4"]
                   <-Map 9 [BROADCAST_EDGE] vectorized, llap
                     BROADCAST [RS_201]
                       PartitionCols:_col3
@@ -1248,7 +1248,7 @@ Stage-0
                             TableScan [TS_26] (rows=500 width=10)
                               
default@src,y,Tbl:COMPLETE,Col:NONE,Output:["key","value"]
                   <-Select Operator [SEL_203] (rows=262 width=10)
-                      Output:["_col1"]
+                      Output:["_col0"]
                       Group By Operator [GBY_202] (rows=262 width=10)
                         Output:["_col0","_col1"],keys:KEY._col0, KEY._col1
                       <-Union 11 [SIMPLE_EDGE]
@@ -1282,7 +1282,7 @@ Stage-0
                 Select Operator [SEL_185] (rows=605 width=10)
                   Output:["_col0","_col1","_col2"]
                   Map Join Operator [MAPJOIN_184] (rows=605 width=10)
-                    
Conds:RS_181._col3=SEL_183._col1(Inner),Output:["_col1","_col2","_col5"]
+                    
Conds:RS_181._col3=SEL_183._col0(Inner),Output:["_col1","_col2","_col4"]
                   <-Map 1 [BROADCAST_EDGE] vectorized, llap
                     BROADCAST [RS_181]
                       PartitionCols:_col3
@@ -1299,7 +1299,7 @@ Stage-0
                             TableScan [TS_0] (rows=500 width=10)
                               
default@src,y,Tbl:COMPLETE,Col:NONE,Output:["key","value"]
                   <-Select Operator [SEL_183] (rows=262 width=10)
-                      Output:["_col1"]
+                      Output:["_col0"]
                       Group By Operator [GBY_182] (rows=262 width=10)
                         Output:["_col0","_col1"],keys:KEY._col0, KEY._col1
                       <-Union 4 [SIMPLE_EDGE]
@@ -1398,7 +1398,7 @@ Stage-0
                 Select Operator [SEL_402] (rows=605 width=10)
                   Output:["_col0","_col1"]
                   Map Join Operator [MAPJOIN_401] (rows=605 width=10)
-                    
Conds:RS_345._col3=SEL_400._col1(Inner),Output:["_col1","_col2"]
+                    
Conds:RS_345._col3=SEL_400._col0(Inner),Output:["_col1","_col2"]
                   <-Map 1 [BROADCAST_EDGE] vectorized, llap
                     BROADCAST [RS_345]
                       PartitionCols:_col3
@@ -1420,7 +1420,7 @@ Stage-0
                             TableScan [TS_0] (rows=500 width=10)
                               
default@src,y,Tbl:COMPLETE,Col:NONE,Output:["key","value"]
                   <-Select Operator [SEL_400] (rows=440 width=10)
-                      Output:["_col1"]
+                      Output:["_col0"]
                       Group By Operator [GBY_399] (rows=440 width=10)
                         Output:["_col0","_col1"],keys:KEY._col0, KEY._col1
                       <-Union 24 [SIMPLE_EDGE]
@@ -1504,7 +1504,7 @@ Stage-0
                         Select Operator [SEL_376] (rows=605 width=10)
                           Output:["_col0","_col1"]
                           Map Join Operator [MAPJOIN_375] (rows=605 width=10)
-                            
Conds:RS_372._col3=SEL_374._col1(Inner),Output:["_col1","_col2"]
+                            
Conds:RS_372._col3=SEL_374._col0(Inner),Output:["_col1","_col2"]
                           <-Map 11 [BROADCAST_EDGE] vectorized, llap
                             BROADCAST [RS_372]
                               PartitionCols:_col3
@@ -1521,7 +1521,7 @@ Stage-0
                                     TableScan [TS_26] (rows=500 width=10)
                                       
default@src,y,Tbl:COMPLETE,Col:NONE,Output:["key","value"]
                           <-Select Operator [SEL_374] (rows=381 width=10)
-                              Output:["_col1"]
+                              Output:["_col0"]
                               Group By Operator [GBY_373] (rows=381 width=10)
                                 Output:["_col0","_col1"],keys:KEY._col0, 
KEY._col1
                               <-Union 15 [SIMPLE_EDGE]
@@ -1576,13 +1576,13 @@ Stage-0
                         Select Operator [SEL_349] (rows=605 width=10)
                           Output:["_col0","_col1"]
                           Map Join Operator [MAPJOIN_348] (rows=605 width=10)
-                            
Conds:RS_344._col3=SEL_347._col1(Inner),Output:["_col1","_col2"]
+                            
Conds:RS_344._col3=SEL_347._col0(Inner),Output:["_col1","_col2"]
                           <-Map 1 [BROADCAST_EDGE] vectorized, llap
                             BROADCAST [RS_344]
                               PartitionCols:_col3
                                Please refer to the previous Map Join Operator 
[MAPJOIN_343]
                           <-Select Operator [SEL_347] (rows=262 width=10)
-                              Output:["_col1"]
+                              Output:["_col0"]
                               Group By Operator [GBY_346] (rows=262 width=10)
                                 Output:["_col0","_col1"],keys:KEY._col0, 
KEY._col1
                               <-Union 4 [SIMPLE_EDGE]
@@ -2406,7 +2406,7 @@ Stage-0
                 Select Operator [SEL_393] (rows=484 width=10)
                   Output:["_col0","_col1"]
                   Map Join Operator [MAPJOIN_392] (rows=484 width=10)
-                    
Conds:RS_332._col1=SEL_391._col1(Inner),Output:["_col0","_col3"]
+                    
Conds:RS_332._col1=SEL_391._col0(Inner),Output:["_col0","_col3"]
                   <-Map 9 [BROADCAST_EDGE] vectorized, llap
                     BROADCAST [RS_332]
                       PartitionCols:_col1
@@ -2428,7 +2428,7 @@ Stage-0
                             TableScan [TS_3] (rows=25 width=7)
                               
default@src1,x,Tbl:COMPLETE,Col:NONE,Output:["key","value"]
                   <-Select Operator [SEL_391] (rows=440 width=10)
-                      Output:["_col1"]
+                      Output:["_col0"]
                       Group By Operator [GBY_390] (rows=440 width=10)
                         Output:["_col0","_col1"],keys:KEY._col0, KEY._col1
                       <-Union 28 [SIMPLE_EDGE]
@@ -2512,7 +2512,7 @@ Stage-0
                         Select Operator [SEL_235] (rows=605 width=10)
                           Output:["_col0","_col1"]
                           Merge Join Operator [MERGEJOIN_234] (rows=605 
width=10)
-                            
Conds:RS_339._col3=RS_342._col1(Inner),Output:["_col1","_col2"]
+                            
Conds:RS_339._col3=RS_342._col0(Inner),Output:["_col1","_col2"]
                           <-Map 1 [SIMPLE_EDGE] vectorized, llap
                             SHUFFLE [RS_339]
                               PartitionCols:_col3
@@ -2530,9 +2530,9 @@ Stage-0
                                       
default@src,y,Tbl:COMPLETE,Col:NONE,Output:["key","value"]
                           <-Reducer 12 [SIMPLE_EDGE] vectorized, llap
                             SHUFFLE [RS_342]
-                              PartitionCols:_col1
+                              PartitionCols:_col0
                               Select Operator [SEL_341] (rows=262 width=10)
-                                Output:["_col1"]
+                                Output:["_col0"]
                                 Group By Operator [GBY_340] (rows=262 width=10)
                                   Output:["_col0","_col1"],keys:KEY._col0, 
KEY._col1
                                 <-Union 11 [SIMPLE_EDGE]
@@ -2566,12 +2566,12 @@ Stage-0
                         Select Operator [SEL_244] (rows=605 width=10)
                           Output:["_col0","_col1"]
                           Merge Join Operator [MERGEJOIN_243] (rows=605 
width=10)
-                            
Conds:RS_58._col1=RS_353._col1(Inner),Output:["_col0","_col3"]
+                            
Conds:RS_58._col1=RS_353._col0(Inner),Output:["_col0","_col3"]
                           <-Reducer 19 [SIMPLE_EDGE] vectorized, llap
                             SHUFFLE [RS_353]
-                              PartitionCols:_col1
+                              PartitionCols:_col0
                               Select Operator [SEL_352] (rows=381 width=10)
-                                Output:["_col1"]
+                                Output:["_col0"]
                                 Group By Operator [GBY_351] (rows=381 width=10)
                                   Output:["_col0","_col1"],keys:KEY._col0, 
KEY._col1
                                 <-Union 18 [SIMPLE_EDGE]
@@ -3196,7 +3196,7 @@ Stage-5
                                 Select Operator [SEL_424] (rows=484 width=10)
                                   Output:["_col0","_col1"]
                                   Map Join Operator [MAPJOIN_423] (rows=484 
width=10)
-                                    
Conds:RS_358._col1=SEL_422._col1(Inner),Output:["_col0","_col3"]
+                                    
Conds:RS_358._col1=SEL_422._col0(Inner),Output:["_col0","_col3"]
                                   <-Map 12 [BROADCAST_EDGE] vectorized, llap
                                     BROADCAST [RS_358]
                                       PartitionCols:_col1
@@ -3218,7 +3218,7 @@ Stage-5
                                             TableScan [TS_3] (rows=25 width=7)
                                               
default@src1,x,Tbl:COMPLETE,Col:NONE,Output:["key","value"]
                                   <-Select Operator [SEL_422] (rows=440 
width=10)
-                                      Output:["_col1"]
+                                      Output:["_col0"]
                                       Group By Operator [GBY_421] (rows=440 
width=10)
                                         
Output:["_col0","_col1"],keys:KEY._col0, KEY._col1
                                       <-Union 31 [SIMPLE_EDGE]
@@ -3302,7 +3302,7 @@ Stage-5
                                         Select Operator [SEL_270] (rows=605 
width=10)
                                           Output:["_col0","_col1"]
                                           Merge Join Operator [MERGEJOIN_269] 
(rows=605 width=10)
-                                            
Conds:RS_58._col1=RS_384._col1(Inner),Output:["_col0","_col3"]
+                                            
Conds:RS_58._col1=RS_384._col0(Inner),Output:["_col0","_col3"]
                                           <-Reducer 10 [SIMPLE_EDGE] llap
                                             SHUFFLE [RS_58]
                                               PartitionCols:_col1
@@ -3328,9 +3328,9 @@ Stage-5
                                                         
default@src,y,Tbl:COMPLETE,Col:NONE,Output:["key","value"]
                                           <-Reducer 22 [SIMPLE_EDGE] 
vectorized, llap
                                             SHUFFLE [RS_384]
-                                              PartitionCols:_col1
+                                              PartitionCols:_col0
                                               Select Operator [SEL_383] 
(rows=381 width=10)
-                                                Output:["_col1"]
+                                                Output:["_col0"]
                                                 Group By Operator [GBY_382] 
(rows=381 width=10)
                                                   
Output:["_col0","_col1"],keys:KEY._col0, KEY._col1
                                                 <-Union 21 [SIMPLE_EDGE]
@@ -3385,7 +3385,7 @@ Stage-5
                                         Select Operator [SEL_261] (rows=605 
width=10)
                                           Output:["_col0","_col1"]
                                           Merge Join Operator [MERGEJOIN_260] 
(rows=605 width=10)
-                                            
Conds:RS_365._col3=RS_368._col1(Inner),Output:["_col1","_col2"]
+                                            
Conds:RS_365._col3=RS_368._col0(Inner),Output:["_col1","_col2"]
                                           <-Map 1 [SIMPLE_EDGE] vectorized, 
llap
                                             SHUFFLE [RS_365]
                                               PartitionCols:_col3
@@ -3402,9 +3402,9 @@ Stage-5
                                                      Please refer to the 
previous TableScan [TS_0]
                                           <-Reducer 15 [SIMPLE_EDGE] 
vectorized, llap
                                             SHUFFLE [RS_368]
-                                              PartitionCols:_col1
+                                              PartitionCols:_col0
                                               Select Operator [SEL_367] 
(rows=262 width=10)
-                                                Output:["_col1"]
+                                                Output:["_col0"]
                                                 Group By Operator [GBY_366] 
(rows=262 width=10)
                                                   
Output:["_col0","_col1"],keys:KEY._col0, KEY._col1
                                                 <-Union 14 [SIMPLE_EDGE]

http://git-wip-us.apache.org/repos/asf/hive/blob/55887646/ql/src/test/results/clientpositive/llap/explainuser_4.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/explainuser_4.q.out 
b/ql/src/test/results/clientpositive/llap/explainuser_4.q.out
index bf20c3d..8de8379 100644
--- a/ql/src/test/results/clientpositive/llap/explainuser_4.q.out
+++ b/ql/src/test/results/clientpositive/llap/explainuser_4.q.out
@@ -133,7 +133,7 @@ Stage-0
               <-Map 4 [SIMPLE_EDGE] vectorized, llap
                 SHUFFLE [RS_35]
                   PartitionCols:_col0
-                  Select Operator [SEL_34] (rows=1019 width=8)
+                  Select Operator [SEL_34] (rows=1019 width=2)
                     Output:["_col0"]
                     Filter Operator [FIL_33] (rows=1019 width=8)
                       predicate:(cbigint is not null and cint BETWEEN 1000000 
AND 3000000)
@@ -217,7 +217,7 @@ Stage-0
                   <-Map 5 [SIMPLE_EDGE] vectorized, llap
                     SHUFFLE [RS_37]
                       PartitionCols:_col0
-                      Select Operator [SEL_36] (rows=1019 width=8)
+                      Select Operator [SEL_36] (rows=1019 width=2)
                         Output:["_col0"]
                         Filter Operator [FIL_35] (rows=1019 width=8)
                           predicate:(cbigint is not null and cint BETWEEN 
1000000 AND 3000000)
@@ -526,18 +526,20 @@ Stage-0
     Stage-1
       Reducer 2 llap
       File Output Operator [FS_8]
-        Merge Join Operator [MERGEJOIN_9] (rows=150994944 width=474)
-          Conds:(Left 
Outer),Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col17","_col18","_col19","_col20","_col21","_col22","_col23"],residual
 filter predicates:{((_col2 = _col14) or UDFToInteger(_col1) BETWEEN 1 AND 10)}
-        <-Map 1 [CUSTOM_SIMPLE_EDGE] vectorized, llap
-          PARTITION_ONLY_SHUFFLE [RS_11]
-            Select Operator [SEL_10] (rows=12288 width=236)
-              
Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11"]
-              TableScan [TS_0] (rows=12288 width=236)
-                
default@alltypesorc,a,Tbl:COMPLETE,Col:NONE,Output:["ctinyint","csmallint","cint","cbigint","cfloat","cdouble","cstring1","cstring2","ctimestamp1","ctimestamp2","cboolean1","cboolean2"]
-        <-Map 3 [CUSTOM_SIMPLE_EDGE] vectorized, llap
-          PARTITION_ONLY_SHUFFLE [RS_13]
-            Select Operator [SEL_12] (rows=12288 width=236)
-              
Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11"]
-              TableScan [TS_2] (rows=12288 width=236)
-                
default@alltypesorc,b,Tbl:COMPLETE,Col:NONE,Output:["ctinyint","csmallint","cint","cbigint","cfloat","cdouble","cstring1","cstring2","ctimestamp1","ctimestamp2","cboolean1","cboolean2"]
+        Select Operator [SEL_7] (rows=150994944 width=474)
+          
Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col17","_col18","_col19","_col20","_col21","_col22","_col23"]
+          Merge Join Operator [MERGEJOIN_9] (rows=150994944 width=474)
+            Conds:(Left 
Outer),Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col17","_col18","_col19","_col20","_col21","_col22","_col23","_col24"],residual
 filter predicates:{((_col2 = _col15) or _col12)}
+          <-Map 1 [CUSTOM_SIMPLE_EDGE] vectorized, llap
+            PARTITION_ONLY_SHUFFLE [RS_11]
+              Select Operator [SEL_10] (rows=12288 width=236)
+                
Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12"]
+                TableScan [TS_0] (rows=12288 width=236)
+                  
default@alltypesorc,a,Tbl:COMPLETE,Col:NONE,Output:["ctinyint","csmallint","cint","cbigint","cfloat","cdouble","cstring1","cstring2","ctimestamp1","ctimestamp2","cboolean1","cboolean2"]
+          <-Map 3 [CUSTOM_SIMPLE_EDGE] vectorized, llap
+            PARTITION_ONLY_SHUFFLE [RS_13]
+              Select Operator [SEL_12] (rows=12288 width=236)
+                
Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11"]
+                TableScan [TS_2] (rows=12288 width=236)
+                  
default@alltypesorc,b,Tbl:COMPLETE,Col:NONE,Output:["ctinyint","csmallint","cint","cbigint","cfloat","cdouble","cstring1","cstring2","ctimestamp1","ctimestamp2","cboolean1","cboolean2"]
 

http://git-wip-us.apache.org/repos/asf/hive/blob/55887646/ql/src/test/results/clientpositive/llap/external_jdbc_table.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/external_jdbc_table.q.out 
b/ql/src/test/results/clientpositive/llap/external_jdbc_table.q.out
index 1bb41dd..8db779c 100644
--- a/ql/src/test/results/clientpositive/llap/external_jdbc_table.q.out
+++ b/ql/src/test/results/clientpositive/llap/external_jdbc_table.q.out
@@ -381,13 +381,13 @@ STAGE PLANS:
         TableScan
           alias: ext_simple_derby_table1
           properties:
-            hive.sql.query SELECT "t"."fkey", "t0"."dkey"
-FROM (SELECT *
+            hive.sql.query SELECT "t0"."fkey", "t2"."dkey"
+FROM (SELECT "ikey", "fkey"
 FROM "SIMPLE_DERBY_TABLE1"
-WHERE "ikey" IS NOT NULL) AS "t"
-INNER JOIN (SELECT *
+WHERE "ikey" IS NOT NULL) AS "t0"
+INNER JOIN (SELECT "ikey", "dkey"
 FROM "SIMPLE_DERBY_TABLE2"
-WHERE "ikey" IS NOT NULL) AS "t0" ON "t"."ikey" = "t0"."ikey"
+WHERE "ikey" IS NOT NULL) AS "t2" ON "t0"."ikey" = "t2"."ikey"
             hive.sql.query.fieldNames fkey,dkey
             hive.sql.query.fieldTypes float,double
             hive.sql.query.split false
@@ -460,11 +460,11 @@ STAGE PLANS:
                 TableScan
                   alias: ext_simple_derby_table2
                   properties:
-                    hive.sql.query SELECT "ikey", "bkey", "fkey", "dkey"
+                    hive.sql.query SELECT "ikey", "dkey"
 FROM "SIMPLE_DERBY_TABLE2"
 WHERE "ikey" IS NOT NULL
-                    hive.sql.query.fieldNames ikey,bkey,fkey,dkey
-                    hive.sql.query.fieldTypes int,bigint,float,double
+                    hive.sql.query.fieldNames ikey,dkey
+                    hive.sql.query.fieldTypes int,double
                     hive.sql.query.split true
                   Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE 
Column stats: NONE
                   Reduce Output Operator
@@ -484,10 +484,10 @@ WHERE "ikey" IS NOT NULL
                 keys:
                   0 _col0 (type: int)
                   1 ikey (type: int)
-                outputColumnNames: _col1, _col5
+                outputColumnNames: _col1, _col3
                 Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE 
Column stats: NONE
                 Select Operator
-                  expressions: _col1 (type: float), _col5 (type: double)
+                  expressions: _col1 (type: float), _col3 (type: double)
                   outputColumnNames: _col0, _col1
                   Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE 
Column stats: NONE
                   File Output Operator

http://git-wip-us.apache.org/repos/asf/hive/blob/55887646/ql/src/test/results/clientpositive/llap/filter_join_breaktask.q.out
----------------------------------------------------------------------
diff --git 
a/ql/src/test/results/clientpositive/llap/filter_join_breaktask.q.out 
b/ql/src/test/results/clientpositive/llap/filter_join_breaktask.q.out
index c8afea6..78ef416 100644
--- a/ql/src/test/results/clientpositive/llap/filter_join_breaktask.q.out
+++ b/ql/src/test/results/clientpositive/llap/filter_join_breaktask.q.out
@@ -35,13 +35,13 @@ POSTHOOK: Input: default@filter_join_breaktask
 POSTHOOK: Input: default@filter_join_breaktask@ds=2008-04-08
 #### A masked pattern was here ####
 OPTIMIZED SQL: SELECT `t2`.`key`, `t0`.`value`
-FROM (SELECT `value`, CAST('2008-04-08' AS STRING) AS `ds`
+FROM (SELECT `value`
 FROM `default`.`filter_join_breaktask`
 WHERE `ds` = '2008-04-08' AND `value` <> '') AS `t0`
-INNER JOIN ((SELECT `key`, CAST('2008-04-08' AS STRING) AS `ds`
+INNER JOIN ((SELECT `key`
 FROM `default`.`filter_join_breaktask`
 WHERE `ds` = '2008-04-08' AND `key` IS NOT NULL) AS `t2`
-INNER JOIN (SELECT `key`, `value`, CAST('2008-04-08' AS STRING) AS `ds`
+INNER JOIN (SELECT `key`, `value`
 FROM `default`.`filter_join_breaktask`
 WHERE `ds` = '2008-04-08' AND `value` <> '' AND `key` IS NOT NULL) AS `t4` ON 
`t2`.`key` = `t4`.`key`) ON `t0`.`value` = `t4`.`value`
 STAGE DEPENDENCIES:
@@ -71,13 +71,13 @@ STAGE PLANS:
                     Select Operator
                       expressions: key (type: int)
                       outputColumnNames: _col0
-                      Statistics: Num rows: 15 Data size: 1450 Basic stats: 
COMPLETE Column stats: COMPLETE
+                      Statistics: Num rows: 15 Data size: 40 Basic stats: 
COMPLETE Column stats: COMPLETE
                       Reduce Output Operator
                         key expressions: _col0 (type: int)
                         null sort order: a
                         sort order: +
                         Map-reduce partition columns: _col0 (type: int)
-                        Statistics: Num rows: 15 Data size: 1450 Basic stats: 
COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 15 Data size: 40 Basic stats: 
COMPLETE Column stats: COMPLETE
                         tag: 0
                         auto parallelism: true
             Execution mode: vectorized, llap
@@ -149,13 +149,13 @@ STAGE PLANS:
                     Select Operator
                       expressions: key (type: int), value (type: string)
                       outputColumnNames: _col0, _col1
-                      Statistics: Num rows: 15 Data size: 2785 Basic stats: 
COMPLETE Column stats: COMPLETE
+                      Statistics: Num rows: 15 Data size: 1375 Basic stats: 
COMPLETE Column stats: COMPLETE
                       Reduce Output Operator
                         key expressions: _col0 (type: int)
                         null sort order: a
                         sort order: +
                         Map-reduce partition columns: _col0 (type: int)
-                        Statistics: Num rows: 15 Data size: 2785 Basic stats: 
COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 15 Data size: 1375 Basic stats: 
COMPLETE Column stats: COMPLETE
                         tag: 1
                         value expressions: _col1 (type: string)
                         auto parallelism: true
@@ -228,13 +228,13 @@ STAGE PLANS:
                     Select Operator
                       expressions: value (type: string)
                       outputColumnNames: _col0
-                      Statistics: Num rows: 25 Data size: 4575 Basic stats: 
COMPLETE Column stats: COMPLETE
+                      Statistics: Num rows: 25 Data size: 2225 Basic stats: 
COMPLETE Column stats: COMPLETE
                       Reduce Output Operator
                         key expressions: _col0 (type: string)
                         null sort order: a
                         sort order: +
                         Map-reduce partition columns: _col0 (type: string)
-                        Statistics: Num rows: 25 Data size: 4575 Basic stats: 
COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 25 Data size: 2225 Basic stats: 
COMPLETE Column stats: COMPLETE
                         tag: 1
                         auto parallelism: true
             Execution mode: vectorized, llap
@@ -302,14 +302,14 @@ STAGE PLANS:
                 keys:
                   0 _col0 (type: int)
                   1 _col0 (type: int)
-                outputColumnNames: _col0, _col3
+                outputColumnNames: _col0, _col2
                 Position of Big Table: 1
                 Statistics: Num rows: 15 Data size: 1375 Basic stats: COMPLETE 
Column stats: COMPLETE
                 Reduce Output Operator
-                  key expressions: _col3 (type: string)
+                  key expressions: _col2 (type: string)
                   null sort order: a
                   sort order: +
-                  Map-reduce partition columns: _col3 (type: string)
+                  Map-reduce partition columns: _col2 (type: string)
                   Statistics: Num rows: 15 Data size: 1375 Basic stats: 
COMPLETE Column stats: COMPLETE
                   tag: 0
                   value expressions: _col0 (type: int)
@@ -322,13 +322,13 @@ STAGE PLANS:
                 condition map:
                      Inner Join 0 to 1
                 keys:
-                  0 _col3 (type: string)
+                  0 _col2 (type: string)
                   1 _col0 (type: string)
-                outputColumnNames: _col0, _col5
+                outputColumnNames: _col0, _col3
                 Position of Big Table: 1
                 Statistics: Num rows: 19 Data size: 1747 Basic stats: COMPLETE 
Column stats: COMPLETE
                 Select Operator
-                  expressions: _col0 (type: int), _col5 (type: string)
+                  expressions: _col0 (type: int), _col3 (type: string)
                   outputColumnNames: _col0, _col1
                   Statistics: Num rows: 19 Data size: 1747 Basic stats: 
COMPLETE Column stats: COMPLETE
                   File Output Operator

http://git-wip-us.apache.org/repos/asf/hive/blob/55887646/ql/src/test/results/clientpositive/llap/hybridgrace_hashjoin_1.q.out
----------------------------------------------------------------------
diff --git 
a/ql/src/test/results/clientpositive/llap/hybridgrace_hashjoin_1.q.out 
b/ql/src/test/results/clientpositive/llap/hybridgrace_hashjoin_1.q.out
index 7a603e4..4247205 100644
--- a/ql/src/test/results/clientpositive/llap/hybridgrace_hashjoin_1.q.out
+++ b/ql/src/test/results/clientpositive/llap/hybridgrace_hashjoin_1.q.out
@@ -1410,10 +1410,10 @@ STAGE PLANS:
                 keys:
                   0 
                   1 
-                outputColumnNames: _col0, _col2
+                outputColumnNames: _col0, _col1
                 Statistics: Num rows: 25 Data size: 5535 Basic stats: COMPLETE 
Column stats: NONE
                 Select Operator
-                  expressions: 6981 (type: int), 6981 (type: int), _col0 
(type: decimal(20,10)), _col2 (type: decimal(23,14))
+                  expressions: 6981 (type: int), 6981 (type: int), _col0 
(type: decimal(20,10)), _col1 (type: decimal(23,14))
                   outputColumnNames: _col0, _col1, _col2, _col3
                   Statistics: Num rows: 25 Data size: 5535 Basic stats: 
COMPLETE Column stats: NONE
                   File Output Operator
@@ -1619,10 +1619,10 @@ STAGE PLANS:
                 keys:
                   0 
                   1 
-                outputColumnNames: _col0, _col2
+                outputColumnNames: _col0, _col1
                 Statistics: Num rows: 25 Data size: 5535 Basic stats: COMPLETE 
Column stats: NONE
                 Select Operator
-                  expressions: 6981 (type: int), 6981 (type: int), _col0 
(type: decimal(20,10)), _col2 (type: decimal(23,14))
+                  expressions: 6981 (type: int), 6981 (type: int), _col0 
(type: decimal(20,10)), _col1 (type: decimal(23,14))
                   outputColumnNames: _col0, _col1, _col2, _col3
                   Statistics: Num rows: 25 Data size: 5535 Basic stats: 
COMPLETE Column stats: NONE
                   File Output Operator

http://git-wip-us.apache.org/repos/asf/hive/blob/55887646/ql/src/test/results/clientpositive/llap/join32_lessSize.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/join32_lessSize.q.out 
b/ql/src/test/results/clientpositive/llap/join32_lessSize.q.out
index 16274f3..3bd60fd 100644
--- a/ql/src/test/results/clientpositive/llap/join32_lessSize.q.out
+++ b/ql/src/test/results/clientpositive/llap/join32_lessSize.q.out
@@ -37,7 +37,7 @@ POSTHOOK: Input: default@srcpart
 POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=11
 POSTHOOK: Output: default@dest_j1_n21
 OPTIMIZED SQL: SELECT `t4`.`key`, `t0`.`value`, `t2`.`value` AS `value1`
-FROM (SELECT `value`, CAST('2008-04-08' AS STRING) AS `ds`, `hr`
+FROM (SELECT `value`
 FROM `default`.`srcpart`
 WHERE `ds` = '2008-04-08' AND `hr` = 11 AND `value` IS NOT NULL) AS `t0`
 INNER JOIN ((SELECT `key`, `value`
@@ -246,7 +246,7 @@ STAGE PLANS:
                     Select Operator
                       expressions: value (type: string)
                       outputColumnNames: _col0
-                      Statistics: Num rows: 500 Data size: 184500 Basic stats: 
COMPLETE Column stats: COMPLETE
+                      Statistics: Num rows: 500 Data size: 45500 Basic stats: 
COMPLETE Column stats: COMPLETE
                       Map Join Operator
                         condition map:
                              Inner Join 0 to 1
@@ -1205,7 +1205,7 @@ POSTHOOK: Input: default@srcpart
 POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=11
 POSTHOOK: Output: default@dest_j2_n1
 OPTIMIZED SQL: SELECT `t4`.`key`, `t0`.`value`, `t4`.`value` AS `value1`
-FROM (SELECT `value`, CAST('2008-04-08' AS STRING) AS `ds`, `hr`
+FROM (SELECT `value`
 FROM `default`.`srcpart`
 WHERE `ds` = '2008-04-08' AND `hr` = 11 AND `value` IS NOT NULL) AS `t0`
 INNER JOIN ((SELECT `key`
@@ -1414,7 +1414,7 @@ STAGE PLANS:
                     Select Operator
                       expressions: value (type: string)
                       outputColumnNames: _col0
-                      Statistics: Num rows: 500 Data size: 184500 Basic stats: 
COMPLETE Column stats: COMPLETE
+                      Statistics: Num rows: 500 Data size: 45500 Basic stats: 
COMPLETE Column stats: COMPLETE
                       Map Join Operator
                         condition map:
                              Inner Join 0 to 1
@@ -1749,7 +1749,7 @@ POSTHOOK: Input: default@srcpart
 POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=11
 POSTHOOK: Output: default@dest_j2_n1
 OPTIMIZED SQL: SELECT `t2`.`key`, `t0`.`value`, `t2`.`value` AS `value1`
-FROM (SELECT `value`, CAST('2008-04-08' AS STRING) AS `ds`, `hr`
+FROM (SELECT `value`
 FROM `default`.`srcpart`
 WHERE `ds` = '2008-04-08' AND `hr` = 11 AND `value` IS NOT NULL) AS `t0`
 INNER JOIN ((SELECT `key`, `value`
@@ -1939,7 +1939,7 @@ STAGE PLANS:
                     Select Operator
                       expressions: value (type: string)
                       outputColumnNames: _col0
-                      Statistics: Num rows: 500 Data size: 184500 Basic stats: 
COMPLETE Column stats: COMPLETE
+                      Statistics: Num rows: 500 Data size: 45500 Basic stats: 
COMPLETE Column stats: COMPLETE
                       Map Join Operator
                         condition map:
                              Inner Join 0 to 1
@@ -2387,7 +2387,7 @@ STAGE PLANS:
                     Select Operator
                       expressions: value (type: string)
                       outputColumnNames: _col0
-                      Statistics: Num rows: 500 Data size: 184500 Basic stats: 
COMPLETE Column stats: COMPLETE
+                      Statistics: Num rows: 500 Data size: 45500 Basic stats: 
COMPLETE Column stats: COMPLETE
                       Map Join Operator
                         condition map:
                              Inner Join 0 to 1
@@ -2680,7 +2680,7 @@ STAGE PLANS:
                     Select Operator
                       expressions: value (type: string)
                       outputColumnNames: _col0
-                      Statistics: Num rows: 500 Data size: 184500 Basic stats: 
COMPLETE Column stats: COMPLETE
+                      Statistics: Num rows: 500 Data size: 45500 Basic stats: 
COMPLETE Column stats: COMPLETE
                       Map Join Operator
                         condition map:
                              Inner Join 0 to 1

Reply via email to