http://git-wip-us.apache.org/repos/asf/hive/blob/55887646/ql/src/test/results/clientpositive/join47.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/join47.q.out 
b/ql/src/test/results/clientpositive/join47.q.out
index 2892b8b..169244e 100644
--- a/ql/src/test/results/clientpositive/join47.q.out
+++ b/ql/src/test/results/clientpositive/join47.q.out
@@ -363,24 +363,24 @@ STAGE PLANS:
             alias: src1
             Statistics: Num rows: 25 Data size: 191 Basic stats: COMPLETE 
Column stats: NONE
             Select Operator
-              expressions: key (type: string), value (type: string)
-              outputColumnNames: _col0, _col1
+              expressions: key (type: string), value (type: string), 
UDFToDouble(value) BETWEEN 100.0D AND 102.0D (type: boolean)
+              outputColumnNames: _col0, _col1, _col2
               Statistics: Num rows: 25 Data size: 191 Basic stats: COMPLETE 
Column stats: NONE
               Reduce Output Operator
                 sort order: 
                 Statistics: Num rows: 25 Data size: 191 Basic stats: COMPLETE 
Column stats: NONE
-                value expressions: _col0 (type: string), _col1 (type: string)
+                value expressions: _col0 (type: string), _col1 (type: string), 
_col2 (type: boolean)
           TableScan
             alias: src
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
             Select Operator
-              expressions: key (type: string), value (type: string)
-              outputColumnNames: _col0, _col1
+              expressions: key (type: string), value (type: string), 
UDFToDouble(value) BETWEEN 100.0D AND 102.0D (type: boolean)
+              outputColumnNames: _col0, _col1, _col2
               Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
               Reduce Output Operator
                 sort order: 
                 Statistics: Num rows: 500 Data size: 5312 Basic stats: 
COMPLETE Column stats: NONE
-                value expressions: _col0 (type: string), _col1 (type: string)
+                value expressions: _col0 (type: string), _col1 (type: string), 
_col2 (type: boolean)
       Reduce Operator Tree:
         Join Operator
           condition map:
@@ -388,19 +388,23 @@ STAGE PLANS:
           keys:
             0 
             1 
-          outputColumnNames: _col0, _col1, _col2, _col3
-          residual filter predicates: {((_col0 = _col2) or UDFToDouble(_col1) 
BETWEEN 100.0D AND 102.0D or UDFToDouble(_col3) BETWEEN 100.0D AND 102.0D)}
-          Statistics: Num rows: 9026 Data size: 173876 Basic stats: COMPLETE 
Column stats: NONE
-          Limit
-            Number of rows: 10
-            Statistics: Num rows: 10 Data size: 190 Basic stats: COMPLETE 
Column stats: NONE
-            File Output Operator
-              compressed: false
+          outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
+          residual filter predicates: {((_col0 = _col3) or _col2 or _col5)}
+          Statistics: Num rows: 12500 Data size: 240800 Basic stats: COMPLETE 
Column stats: NONE
+          Select Operator
+            expressions: _col0 (type: string), _col1 (type: string), _col3 
(type: string), _col4 (type: string)
+            outputColumnNames: _col0, _col1, _col2, _col3
+            Statistics: Num rows: 12500 Data size: 240800 Basic stats: 
COMPLETE Column stats: NONE
+            Limit
+              Number of rows: 10
               Statistics: Num rows: 10 Data size: 190 Basic stats: COMPLETE 
Column stats: NONE
-              table:
-                  input format: 
org.apache.hadoop.mapred.SequenceFileInputFormat
-                  output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-                  serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+              File Output Operator
+                compressed: false
+                Statistics: Num rows: 10 Data size: 190 Basic stats: COMPLETE 
Column stats: NONE
+                table:
+                    input format: 
org.apache.hadoop.mapred.SequenceFileInputFormat
+                    output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                    serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
 
   Stage: Stage-0
     Fetch Operator
@@ -472,24 +476,24 @@ STAGE PLANS:
             alias: src1
             Statistics: Num rows: 25 Data size: 191 Basic stats: COMPLETE 
Column stats: NONE
             Select Operator
-              expressions: key (type: string), value (type: string)
-              outputColumnNames: _col0, _col1
+              expressions: key (type: string), value (type: string), 
UDFToDouble(key) (type: double)
+              outputColumnNames: _col0, _col1, _col2
               Statistics: Num rows: 25 Data size: 191 Basic stats: COMPLETE 
Column stats: NONE
               Reduce Output Operator
                 sort order: 
                 Statistics: Num rows: 25 Data size: 191 Basic stats: COMPLETE 
Column stats: NONE
-                value expressions: _col0 (type: string), _col1 (type: string)
+                value expressions: _col0 (type: string), _col1 (type: string), 
_col2 (type: double)
           TableScan
             alias: src
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
             Select Operator
-              expressions: key (type: string), value (type: string)
-              outputColumnNames: _col0, _col1
+              expressions: key (type: string), value (type: string), 
UDFToDouble(key) (type: double)
+              outputColumnNames: _col0, _col1, _col2
               Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
               Reduce Output Operator
                 sort order: 
                 Statistics: Num rows: 500 Data size: 5312 Basic stats: 
COMPLETE Column stats: NONE
-                value expressions: _col0 (type: string), _col1 (type: string)
+                value expressions: _col0 (type: string), _col1 (type: string), 
_col2 (type: double)
       Reduce Operator Tree:
         Join Operator
           condition map:
@@ -497,19 +501,23 @@ STAGE PLANS:
           keys:
             0 
             1 
-          outputColumnNames: _col0, _col1, _col2, _col3
-          residual filter predicates: {((UDFToDouble(_col0) + 
UDFToDouble(_col2)) >= 100.0D)} {((UDFToDouble(_col0) + UDFToDouble(_col2)) <= 
102.0D)}
+          outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
+          residual filter predicates: {((_col2 + _col5) >= 100.0D)} {((_col2 + 
_col5) <= 102.0D)}
           Statistics: Num rows: 1388 Data size: 26738 Basic stats: COMPLETE 
Column stats: NONE
-          Limit
-            Number of rows: 10
-            Statistics: Num rows: 10 Data size: 190 Basic stats: COMPLETE 
Column stats: NONE
-            File Output Operator
-              compressed: false
+          Select Operator
+            expressions: _col0 (type: string), _col1 (type: string), _col3 
(type: string), _col4 (type: string)
+            outputColumnNames: _col0, _col1, _col2, _col3
+            Statistics: Num rows: 1388 Data size: 26738 Basic stats: COMPLETE 
Column stats: NONE
+            Limit
+              Number of rows: 10
               Statistics: Num rows: 10 Data size: 190 Basic stats: COMPLETE 
Column stats: NONE
-              table:
-                  input format: 
org.apache.hadoop.mapred.SequenceFileInputFormat
-                  output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-                  serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+              File Output Operator
+                compressed: false
+                Statistics: Num rows: 10 Data size: 190 Basic stats: COMPLETE 
Column stats: NONE
+                table:
+                    input format: 
org.apache.hadoop.mapred.SequenceFileInputFormat
+                    output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                    serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
 
   Stage: Stage-0
     Fetch Operator
@@ -575,24 +583,24 @@ STAGE PLANS:
             alias: src1
             Statistics: Num rows: 25 Data size: 191 Basic stats: COMPLETE 
Column stats: NONE
             Select Operator
-              expressions: key (type: string), value (type: string)
-              outputColumnNames: _col0, _col1
+              expressions: key (type: string), value (type: string), 
UDFToDouble(key) (type: double)
+              outputColumnNames: _col0, _col1, _col2
               Statistics: Num rows: 25 Data size: 191 Basic stats: COMPLETE 
Column stats: NONE
               Reduce Output Operator
                 sort order: 
                 Statistics: Num rows: 25 Data size: 191 Basic stats: COMPLETE 
Column stats: NONE
-                value expressions: _col0 (type: string), _col1 (type: string)
+                value expressions: _col0 (type: string), _col1 (type: string), 
_col2 (type: double)
           TableScan
             alias: src
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
             Select Operator
-              expressions: key (type: string), value (type: string)
-              outputColumnNames: _col0, _col1
+              expressions: key (type: string), value (type: string), 
UDFToDouble(key) (type: double)
+              outputColumnNames: _col0, _col1, _col2
               Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
               Reduce Output Operator
                 sort order: 
                 Statistics: Num rows: 500 Data size: 5312 Basic stats: 
COMPLETE Column stats: NONE
-                value expressions: _col0 (type: string), _col1 (type: string)
+                value expressions: _col0 (type: string), _col1 (type: string), 
_col2 (type: double)
       Reduce Operator Tree:
         Join Operator
           condition map:
@@ -600,19 +608,23 @@ STAGE PLANS:
           keys:
             0 
             1 
-          outputColumnNames: _col0, _col1, _col2, _col3
-          residual filter predicates: {(((UDFToDouble(_col0) + 
UDFToDouble(_col2)) >= 100.0D) or ((UDFToDouble(_col0) + UDFToDouble(_col2)) <= 
102.0D))}
+          outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
+          residual filter predicates: {(((_col2 + _col5) >= 100.0D) or ((_col2 
+ _col5) <= 102.0D))}
           Statistics: Num rows: 8332 Data size: 160507 Basic stats: COMPLETE 
Column stats: NONE
-          Limit
-            Number of rows: 10
-            Statistics: Num rows: 10 Data size: 190 Basic stats: COMPLETE 
Column stats: NONE
-            File Output Operator
-              compressed: false
+          Select Operator
+            expressions: _col0 (type: string), _col1 (type: string), _col3 
(type: string), _col4 (type: string)
+            outputColumnNames: _col0, _col1, _col2, _col3
+            Statistics: Num rows: 8332 Data size: 160507 Basic stats: COMPLETE 
Column stats: NONE
+            Limit
+              Number of rows: 10
               Statistics: Num rows: 10 Data size: 190 Basic stats: COMPLETE 
Column stats: NONE
-              table:
-                  input format: 
org.apache.hadoop.mapred.SequenceFileInputFormat
-                  output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-                  serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+              File Output Operator
+                compressed: false
+                Statistics: Num rows: 10 Data size: 190 Basic stats: COMPLETE 
Column stats: NONE
+                table:
+                    input format: 
org.apache.hadoop.mapred.SequenceFileInputFormat
+                    output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                    serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
 
   Stage: Stage-0
     Fetch Operator
@@ -680,24 +692,24 @@ STAGE PLANS:
             alias: src1
             Statistics: Num rows: 25 Data size: 191 Basic stats: COMPLETE 
Column stats: NONE
             Select Operator
-              expressions: key (type: string), value (type: string)
-              outputColumnNames: _col0, _col1
+              expressions: key (type: string), value (type: string), 
UDFToDouble(key) (type: double)
+              outputColumnNames: _col0, _col1, _col2
               Statistics: Num rows: 25 Data size: 191 Basic stats: COMPLETE 
Column stats: NONE
               Reduce Output Operator
                 sort order: 
                 Statistics: Num rows: 25 Data size: 191 Basic stats: COMPLETE 
Column stats: NONE
-                value expressions: _col0 (type: string), _col1 (type: string)
+                value expressions: _col0 (type: string), _col1 (type: string), 
_col2 (type: double)
           TableScan
             alias: src
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
             Select Operator
-              expressions: key (type: string), value (type: string)
-              outputColumnNames: _col0, _col1
+              expressions: key (type: string), value (type: string), 
UDFToDouble(key) (type: double)
+              outputColumnNames: _col0, _col1, _col2
               Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
               Reduce Output Operator
                 sort order: 
                 Statistics: Num rows: 500 Data size: 5312 Basic stats: 
COMPLETE Column stats: NONE
-                value expressions: _col0 (type: string), _col1 (type: string)
+                value expressions: _col0 (type: string), _col1 (type: string), 
_col2 (type: double)
       Reduce Operator Tree:
         Join Operator
           condition map:
@@ -705,19 +717,23 @@ STAGE PLANS:
           keys:
             0 
             1 
-          outputColumnNames: _col0, _col1, _col2, _col3
-          residual filter predicates: 
{(struct(UDFToDouble(_col0),UDFToDouble(_col2))) IN (const 
struct(100.0D,100.0D), const struct(101.0D,101.0D), const 
struct(102.0D,102.0D))}
-          Statistics: Num rows: 6250 Data size: 120400 Basic stats: COMPLETE 
Column stats: NONE
-          Limit
-            Number of rows: 10
-            Statistics: Num rows: 10 Data size: 190 Basic stats: COMPLETE 
Column stats: NONE
-            File Output Operator
-              compressed: false
+          outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
+          residual filter predicates: {(struct(_col2,_col5)) IN (const 
struct(100.0D,100.0D), const struct(101.0D,101.0D), const 
struct(102.0D,102.0D))}
+          Statistics: Num rows: 9375 Data size: 180600 Basic stats: COMPLETE 
Column stats: NONE
+          Select Operator
+            expressions: _col0 (type: string), _col1 (type: string), _col3 
(type: string), _col4 (type: string)
+            outputColumnNames: _col0, _col1, _col2, _col3
+            Statistics: Num rows: 9375 Data size: 180600 Basic stats: COMPLETE 
Column stats: NONE
+            Limit
+              Number of rows: 10
               Statistics: Num rows: 10 Data size: 190 Basic stats: COMPLETE 
Column stats: NONE
-              table:
-                  input format: 
org.apache.hadoop.mapred.SequenceFileInputFormat
-                  output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-                  serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+              File Output Operator
+                compressed: false
+                Statistics: Num rows: 10 Data size: 190 Basic stats: COMPLETE 
Column stats: NONE
+                table:
+                    input format: 
org.apache.hadoop.mapred.SequenceFileInputFormat
+                    output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                    serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
 
   Stage: Stage-0
     Fetch Operator
@@ -776,15 +792,15 @@ STAGE PLANS:
             alias: src
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
             Select Operator
-              expressions: key (type: string), value (type: string)
-              outputColumnNames: _col0, _col1
+              expressions: key (type: string), value (type: string), 
UDFToDouble(key) (type: double)
+              outputColumnNames: _col0, _col1, _col2
               Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
               Reduce Output Operator
                 key expressions: _col0 (type: string)
                 sort order: +
                 Map-reduce partition columns: _col0 (type: string)
                 Statistics: Num rows: 500 Data size: 5312 Basic stats: 
COMPLETE Column stats: NONE
-                value expressions: _col1 (type: string)
+                value expressions: _col1 (type: string), _col2 (type: double)
           TableScan
             alias: b
             Statistics: Num rows: 25 Data size: 191 Basic stats: COMPLETE 
Column stats: NONE
@@ -805,7 +821,7 @@ STAGE PLANS:
           keys:
             0 _col0 (type: string)
             1 _col0 (type: string)
-          outputColumnNames: _col0, _col1, _col2, _col3
+          outputColumnNames: _col0, _col1, _col2, _col3, _col4
           Statistics: Num rows: 550 Data size: 5843 Basic stats: COMPLETE 
Column stats: NONE
           File Output Operator
             compressed: false
@@ -821,18 +837,18 @@ STAGE PLANS:
             Reduce Output Operator
               sort order: 
               Statistics: Num rows: 550 Data size: 5843 Basic stats: COMPLETE 
Column stats: NONE
-              value expressions: _col0 (type: string), _col1 (type: string), 
_col2 (type: string), _col3 (type: string)
+              value expressions: _col0 (type: string), _col1 (type: string), 
_col2 (type: double), _col3 (type: string), _col4 (type: string)
           TableScan
             alias: a
             Statistics: Num rows: 25 Data size: 191 Basic stats: COMPLETE 
Column stats: NONE
             Select Operator
-              expressions: key (type: string), value (type: string)
-              outputColumnNames: _col0, _col1
+              expressions: key (type: string), value (type: string), 
UDFToDouble(key) (type: double)
+              outputColumnNames: _col0, _col1, _col2
               Statistics: Num rows: 25 Data size: 191 Basic stats: COMPLETE 
Column stats: NONE
               Reduce Output Operator
                 sort order: 
                 Statistics: Num rows: 25 Data size: 191 Basic stats: COMPLETE 
Column stats: NONE
-                value expressions: _col0 (type: string), _col1 (type: string)
+                value expressions: _col0 (type: string), _col1 (type: string), 
_col2 (type: double)
       Reduce Operator Tree:
         Join Operator
           condition map:
@@ -840,11 +856,11 @@ STAGE PLANS:
           keys:
             0 
             1 
-          outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
-          residual filter predicates: {((UDFToDouble(_col4) + 
UDFToDouble(_col0)) >= 100.0D)}
+          outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, 
_col7
+          residual filter predicates: {((_col7 + _col2) >= 100.0D)}
           Statistics: Num rows: 4583 Data size: 88285 Basic stats: COMPLETE 
Column stats: NONE
           Select Operator
-            expressions: _col0 (type: string), _col1 (type: string), _col4 
(type: string), _col5 (type: string), _col2 (type: string), _col3 (type: string)
+            expressions: _col0 (type: string), _col1 (type: string), _col5 
(type: string), _col6 (type: string), _col3 (type: string), _col4 (type: string)
             outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
             Statistics: Num rows: 4583 Data size: 88285 Basic stats: COMPLETE 
Column stats: NONE
             Limit
@@ -927,15 +943,15 @@ STAGE PLANS:
             alias: src
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
             Select Operator
-              expressions: key (type: string), value (type: string)
-              outputColumnNames: _col0, _col1
+              expressions: key (type: string), value (type: string), 
UDFToDouble(key) (type: double)
+              outputColumnNames: _col0, _col1, _col2
               Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
               Reduce Output Operator
                 key expressions: _col0 (type: string)
                 sort order: +
                 Map-reduce partition columns: _col0 (type: string)
                 Statistics: Num rows: 500 Data size: 5312 Basic stats: 
COMPLETE Column stats: NONE
-                value expressions: _col1 (type: string)
+                value expressions: _col1 (type: string), _col2 (type: double)
           TableScan
             alias: a
             Statistics: Num rows: 25 Data size: 191 Basic stats: COMPLETE 
Column stats: NONE
@@ -956,7 +972,7 @@ STAGE PLANS:
           keys:
             0 _col0 (type: string)
             1 _col0 (type: string)
-          outputColumnNames: _col0, _col1, _col2, _col3
+          outputColumnNames: _col0, _col1, _col2, _col3, _col4
           Statistics: Num rows: 550 Data size: 5843 Basic stats: COMPLETE 
Column stats: NONE
           File Output Operator
             compressed: false
@@ -972,18 +988,18 @@ STAGE PLANS:
             Reduce Output Operator
               sort order: 
               Statistics: Num rows: 550 Data size: 5843 Basic stats: COMPLETE 
Column stats: NONE
-              value expressions: _col0 (type: string), _col1 (type: string), 
_col2 (type: string), _col3 (type: string)
+              value expressions: _col0 (type: string), _col1 (type: string), 
_col2 (type: double), _col3 (type: string), _col4 (type: string)
           TableScan
             alias: b
             Statistics: Num rows: 25 Data size: 191 Basic stats: COMPLETE 
Column stats: NONE
             Select Operator
-              expressions: key (type: string), value (type: string)
-              outputColumnNames: _col0, _col1
+              expressions: key (type: string), value (type: string), 
UDFToDouble(key) (type: double)
+              outputColumnNames: _col0, _col1, _col2
               Statistics: Num rows: 25 Data size: 191 Basic stats: COMPLETE 
Column stats: NONE
               Reduce Output Operator
                 sort order: 
                 Statistics: Num rows: 25 Data size: 191 Basic stats: COMPLETE 
Column stats: NONE
-                value expressions: _col0 (type: string), _col1 (type: string)
+                value expressions: _col0 (type: string), _col1 (type: string), 
_col2 (type: double)
       Reduce Operator Tree:
         Join Operator
           condition map:
@@ -991,19 +1007,23 @@ STAGE PLANS:
           keys:
             0 
             1 
-          outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
-          residual filter predicates: {((UDFToDouble(_col4) + 
UDFToDouble(_col0)) <= 102.0D)}
+          outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, 
_col7
+          residual filter predicates: {((_col7 + _col2) <= 102.0D)}
           Statistics: Num rows: 4583 Data size: 88285 Basic stats: COMPLETE 
Column stats: NONE
-          Limit
-            Number of rows: 10
-            Statistics: Num rows: 10 Data size: 190 Basic stats: COMPLETE 
Column stats: NONE
-            File Output Operator
-              compressed: false
+          Select Operator
+            expressions: _col0 (type: string), _col1 (type: string), _col3 
(type: string), _col4 (type: string), _col5 (type: string), _col6 (type: string)
+            outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
+            Statistics: Num rows: 4583 Data size: 88285 Basic stats: COMPLETE 
Column stats: NONE
+            Limit
+              Number of rows: 10
               Statistics: Num rows: 10 Data size: 190 Basic stats: COMPLETE 
Column stats: NONE
-              table:
-                  input format: 
org.apache.hadoop.mapred.SequenceFileInputFormat
-                  output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-                  serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+              File Output Operator
+                compressed: false
+                Statistics: Num rows: 10 Data size: 190 Basic stats: COMPLETE 
Column stats: NONE
+                table:
+                    input format: 
org.apache.hadoop.mapred.SequenceFileInputFormat
+                    output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                    serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
 
   Stage: Stage-0
     Fetch Operator
@@ -1040,7 +1060,7 @@ POSTHOOK: Input: default@src1
 35     val_35  NULL    NULL    66      val_66
 35     val_35  NULL    NULL    66      val_66
 35     val_35  NULL    NULL    66      val_66
-Warning: Shuffle Join JOIN[8][tables = [$hdt$_0, $hdt$_1]] in Stage 
'Stage-1:MAPRED' is a cross product
+Warning: Shuffle Join JOIN[6][tables = [$hdt$_0, $hdt$_1]] in Stage 
'Stage-1:MAPRED' is a cross product
 PREHOOK: query: EXPLAIN
 SELECT *
 FROM src
@@ -1074,24 +1094,24 @@ STAGE PLANS:
             alias: src
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
             Select Operator
-              expressions: key (type: string), value (type: string)
-              outputColumnNames: _col0, _col1
+              expressions: key (type: string), value (type: string), 
UDFToDouble(key) (type: double)
+              outputColumnNames: _col0, _col1, _col2
               Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
               Reduce Output Operator
                 sort order: 
                 Statistics: Num rows: 500 Data size: 5312 Basic stats: 
COMPLETE Column stats: NONE
-                value expressions: _col0 (type: string), _col1 (type: string)
+                value expressions: _col0 (type: string), _col1 (type: string), 
_col2 (type: double)
           TableScan
             alias: a
             Statistics: Num rows: 25 Data size: 191 Basic stats: COMPLETE 
Column stats: NONE
             Select Operator
-              expressions: key (type: string), value (type: string)
-              outputColumnNames: _col0, _col1
+              expressions: key (type: string), value (type: string), 
UDFToDouble(key) (type: double)
+              outputColumnNames: _col0, _col1, _col2
               Statistics: Num rows: 25 Data size: 191 Basic stats: COMPLETE 
Column stats: NONE
               Reduce Output Operator
                 sort order: 
                 Statistics: Num rows: 25 Data size: 191 Basic stats: COMPLETE 
Column stats: NONE
-                value expressions: _col0 (type: string), _col1 (type: string)
+                value expressions: _col0 (type: string), _col1 (type: string), 
_col2 (type: double)
       Reduce Operator Tree:
         Join Operator
           condition map:
@@ -1099,15 +1119,19 @@ STAGE PLANS:
           keys:
             0 
             1 
-          outputColumnNames: _col0, _col1, _col2, _col3
-          residual filter predicates: {((UDFToDouble(_col2) + 
UDFToDouble(_col0)) >= 100.0D)}
+          outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
+          residual filter predicates: {((_col5 + _col2) >= 100.0D)}
           Statistics: Num rows: 4166 Data size: 80253 Basic stats: COMPLETE 
Column stats: NONE
-          File Output Operator
-            compressed: false
-            table:
-                input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-                serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe
+          Select Operator
+            expressions: _col0 (type: string), _col1 (type: string), _col3 
(type: string), _col4 (type: string)
+            outputColumnNames: _col0, _col1, _col2, _col3
+            Statistics: Num rows: 4166 Data size: 80253 Basic stats: COMPLETE 
Column stats: NONE
+            File Output Operator
+              compressed: false
+              table:
+                  input format: 
org.apache.hadoop.mapred.SequenceFileInputFormat
+                  output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                  serde: 
org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe
 
   Stage: Stage-2
     Map Reduce
@@ -1158,7 +1182,7 @@ STAGE PLANS:
       Processor Tree:
         ListSink
 
-Warning: Shuffle Join JOIN[8][tables = [$hdt$_0, $hdt$_1]] in Stage 
'Stage-1:MAPRED' is a cross product
+Warning: Shuffle Join JOIN[6][tables = [$hdt$_0, $hdt$_1]] in Stage 
'Stage-1:MAPRED' is a cross product
 PREHOOK: query: SELECT *
 FROM src
 JOIN src1 a ON (a.key+src.key >= 100)
@@ -1221,15 +1245,15 @@ STAGE PLANS:
             alias: src
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
             Select Operator
-              expressions: key (type: string), value (type: string)
-              outputColumnNames: _col0, _col1
+              expressions: key (type: string), value (type: string), 
UDFToDouble(key) (type: double)
+              outputColumnNames: _col0, _col1, _col2
               Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
               Reduce Output Operator
                 key expressions: _col0 (type: string)
                 sort order: +
                 Map-reduce partition columns: _col0 (type: string)
                 Statistics: Num rows: 500 Data size: 5312 Basic stats: 
COMPLETE Column stats: NONE
-                value expressions: _col1 (type: string)
+                value expressions: _col1 (type: string), _col2 (type: double)
           TableScan
             alias: a
             Statistics: Num rows: 25 Data size: 191 Basic stats: COMPLETE 
Column stats: NONE
@@ -1250,7 +1274,7 @@ STAGE PLANS:
           keys:
             0 _col0 (type: string)
             1 _col0 (type: string)
-          outputColumnNames: _col0, _col1, _col2, _col3
+          outputColumnNames: _col0, _col1, _col2, _col3, _col4
           Statistics: Num rows: 550 Data size: 5843 Basic stats: COMPLETE 
Column stats: NONE
           File Output Operator
             compressed: false
@@ -1266,18 +1290,18 @@ STAGE PLANS:
             Reduce Output Operator
               sort order: 
               Statistics: Num rows: 550 Data size: 5843 Basic stats: COMPLETE 
Column stats: NONE
-              value expressions: _col0 (type: string), _col1 (type: string), 
_col2 (type: string), _col3 (type: string)
+              value expressions: _col0 (type: string), _col1 (type: string), 
_col2 (type: double), _col3 (type: string), _col4 (type: string)
           TableScan
             alias: b
             Statistics: Num rows: 25 Data size: 191 Basic stats: COMPLETE 
Column stats: NONE
             Select Operator
-              expressions: key (type: string), value (type: string)
-              outputColumnNames: _col0, _col1
+              expressions: key (type: string), value (type: string), 
UDFToDouble(key) (type: double)
+              outputColumnNames: _col0, _col1, _col2
               Statistics: Num rows: 25 Data size: 191 Basic stats: COMPLETE 
Column stats: NONE
               Reduce Output Operator
                 sort order: 
                 Statistics: Num rows: 25 Data size: 191 Basic stats: COMPLETE 
Column stats: NONE
-                value expressions: _col0 (type: string), _col1 (type: string)
+                value expressions: _col0 (type: string), _col1 (type: string), 
_col2 (type: double)
       Reduce Operator Tree:
         Join Operator
           condition map:
@@ -1285,19 +1309,23 @@ STAGE PLANS:
           keys:
             0 
             1 
-          outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
-          residual filter predicates: {((UDFToDouble(_col4) + 
UDFToDouble(_col0)) <= 102.0D)}
+          outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, 
_col7
+          residual filter predicates: {((_col7 + _col2) <= 102.0D)}
           Statistics: Num rows: 4583 Data size: 88285 Basic stats: COMPLETE 
Column stats: NONE
-          Limit
-            Number of rows: 10
-            Statistics: Num rows: 10 Data size: 190 Basic stats: COMPLETE 
Column stats: NONE
-            File Output Operator
-              compressed: false
+          Select Operator
+            expressions: _col0 (type: string), _col1 (type: string), _col3 
(type: string), _col4 (type: string), _col5 (type: string), _col6 (type: string)
+            outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
+            Statistics: Num rows: 4583 Data size: 88285 Basic stats: COMPLETE 
Column stats: NONE
+            Limit
+              Number of rows: 10
               Statistics: Num rows: 10 Data size: 190 Basic stats: COMPLETE 
Column stats: NONE
-              table:
-                  input format: 
org.apache.hadoop.mapred.SequenceFileInputFormat
-                  output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-                  serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+              File Output Operator
+                compressed: false
+                Statistics: Num rows: 10 Data size: 190 Basic stats: COMPLETE 
Column stats: NONE
+                table:
+                    input format: 
org.apache.hadoop.mapred.SequenceFileInputFormat
+                    output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                    serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
 
   Stage: Stage-0
     Fetch Operator
@@ -1324,7 +1352,7 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 POSTHOOK: Input: default@src1
 #### A masked pattern was here ####
-Warning: Shuffle Join JOIN[8][tables = [$hdt$_0, $hdt$_1]] in Stage 
'Stage-1:MAPRED' is a cross product
+Warning: Shuffle Join JOIN[6][tables = [$hdt$_0, $hdt$_1]] in Stage 
'Stage-1:MAPRED' is a cross product
 PREHOOK: query: EXPLAIN
 SELECT *
 FROM src
@@ -1358,24 +1386,24 @@ STAGE PLANS:
             alias: src
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
             Select Operator
-              expressions: key (type: string), value (type: string)
-              outputColumnNames: _col0, _col1
+              expressions: key (type: string), value (type: string), 
UDFToDouble(key) (type: double)
+              outputColumnNames: _col0, _col1, _col2
               Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
               Reduce Output Operator
                 sort order: 
                 Statistics: Num rows: 500 Data size: 5312 Basic stats: 
COMPLETE Column stats: NONE
-                value expressions: _col0 (type: string), _col1 (type: string)
+                value expressions: _col0 (type: string), _col1 (type: string), 
_col2 (type: double)
           TableScan
             alias: a
             Statistics: Num rows: 25 Data size: 191 Basic stats: COMPLETE 
Column stats: NONE
             Select Operator
-              expressions: key (type: string), value (type: string)
-              outputColumnNames: _col0, _col1
+              expressions: key (type: string), value (type: string), 
UDFToDouble(key) (type: double)
+              outputColumnNames: _col0, _col1, _col2
               Statistics: Num rows: 25 Data size: 191 Basic stats: COMPLETE 
Column stats: NONE
               Reduce Output Operator
                 sort order: 
                 Statistics: Num rows: 25 Data size: 191 Basic stats: COMPLETE 
Column stats: NONE
-                value expressions: _col0 (type: string), _col1 (type: string)
+                value expressions: _col0 (type: string), _col1 (type: string), 
_col2 (type: double)
       Reduce Operator Tree:
         Join Operator
           condition map:
@@ -1383,15 +1411,19 @@ STAGE PLANS:
           keys:
             0 
             1 
-          outputColumnNames: _col0, _col1, _col2, _col3
-          residual filter predicates: {((UDFToDouble(_col2) + 
UDFToDouble(_col0)) >= 100.0D)}
+          outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
+          residual filter predicates: {((_col5 + _col2) >= 100.0D)}
           Statistics: Num rows: 4166 Data size: 80253 Basic stats: COMPLETE 
Column stats: NONE
-          File Output Operator
-            compressed: false
-            table:
-                input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-                serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe
+          Select Operator
+            expressions: _col0 (type: string), _col1 (type: string), _col3 
(type: string), _col4 (type: string)
+            outputColumnNames: _col0, _col1, _col2, _col3
+            Statistics: Num rows: 4166 Data size: 80253 Basic stats: COMPLETE 
Column stats: NONE
+            File Output Operator
+              compressed: false
+              table:
+                  input format: 
org.apache.hadoop.mapred.SequenceFileInputFormat
+                  output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                  serde: 
org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe
 
   Stage: Stage-2
     Map Reduce
@@ -1442,7 +1474,7 @@ STAGE PLANS:
       Processor Tree:
         ListSink
 
-Warning: Shuffle Join JOIN[8][tables = [$hdt$_0, $hdt$_1]] in Stage 
'Stage-1:MAPRED' is a cross product
+Warning: Shuffle Join JOIN[6][tables = [$hdt$_0, $hdt$_1]] in Stage 
'Stage-1:MAPRED' is a cross product
 PREHOOK: query: SELECT *
 FROM src
 JOIN src1 a ON (a.key+src.key >= 100)
@@ -1505,15 +1537,15 @@ STAGE PLANS:
             alias: src
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
             Select Operator
-              expressions: key (type: string), value (type: string)
-              outputColumnNames: _col0, _col1
+              expressions: key (type: string), value (type: string), 
UDFToDouble(key) (type: double)
+              outputColumnNames: _col0, _col1, _col2
               Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
               Reduce Output Operator
                 key expressions: _col0 (type: string)
                 sort order: +
                 Map-reduce partition columns: _col0 (type: string)
                 Statistics: Num rows: 500 Data size: 5312 Basic stats: 
COMPLETE Column stats: NONE
-                value expressions: _col1 (type: string)
+                value expressions: _col1 (type: string), _col2 (type: double)
           TableScan
             alias: a
             Statistics: Num rows: 25 Data size: 191 Basic stats: COMPLETE 
Column stats: NONE
@@ -1534,7 +1566,7 @@ STAGE PLANS:
           keys:
             0 _col0 (type: string)
             1 _col0 (type: string)
-          outputColumnNames: _col0, _col1, _col2, _col3
+          outputColumnNames: _col0, _col1, _col2, _col3, _col4
           Statistics: Num rows: 550 Data size: 5843 Basic stats: COMPLETE 
Column stats: NONE
           File Output Operator
             compressed: false
@@ -1550,18 +1582,18 @@ STAGE PLANS:
             Reduce Output Operator
               sort order: 
               Statistics: Num rows: 550 Data size: 5843 Basic stats: COMPLETE 
Column stats: NONE
-              value expressions: _col0 (type: string), _col1 (type: string), 
_col2 (type: string), _col3 (type: string)
+              value expressions: _col0 (type: string), _col1 (type: string), 
_col2 (type: double), _col3 (type: string), _col4 (type: string)
           TableScan
             alias: b
             Statistics: Num rows: 25 Data size: 191 Basic stats: COMPLETE 
Column stats: NONE
             Select Operator
-              expressions: key (type: string), value (type: string)
-              outputColumnNames: _col0, _col1
+              expressions: key (type: string), value (type: string), 
UDFToDouble(key) (type: double)
+              outputColumnNames: _col0, _col1, _col2
               Statistics: Num rows: 25 Data size: 191 Basic stats: COMPLETE 
Column stats: NONE
               Reduce Output Operator
                 sort order: 
                 Statistics: Num rows: 25 Data size: 191 Basic stats: COMPLETE 
Column stats: NONE
-                value expressions: _col0 (type: string), _col1 (type: string)
+                value expressions: _col0 (type: string), _col1 (type: string), 
_col2 (type: double)
       Reduce Operator Tree:
         Join Operator
           condition map:
@@ -1569,19 +1601,23 @@ STAGE PLANS:
           keys:
             0 
             1 
-          outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
-          residual filter predicates: {((UDFToDouble(_col4) + 
UDFToDouble(_col0)) <= 102.0D)}
+          outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, 
_col7
+          residual filter predicates: {((_col7 + _col2) <= 102.0D)}
           Statistics: Num rows: 4583 Data size: 88285 Basic stats: COMPLETE 
Column stats: NONE
-          Limit
-            Number of rows: 10
-            Statistics: Num rows: 10 Data size: 190 Basic stats: COMPLETE 
Column stats: NONE
-            File Output Operator
-              compressed: false
+          Select Operator
+            expressions: _col0 (type: string), _col1 (type: string), _col3 
(type: string), _col4 (type: string), _col5 (type: string), _col6 (type: string)
+            outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
+            Statistics: Num rows: 4583 Data size: 88285 Basic stats: COMPLETE 
Column stats: NONE
+            Limit
+              Number of rows: 10
               Statistics: Num rows: 10 Data size: 190 Basic stats: COMPLETE 
Column stats: NONE
-              table:
-                  input format: 
org.apache.hadoop.mapred.SequenceFileInputFormat
-                  output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-                  serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+              File Output Operator
+                compressed: false
+                Statistics: Num rows: 10 Data size: 190 Basic stats: COMPLETE 
Column stats: NONE
+                table:
+                    input format: 
org.apache.hadoop.mapred.SequenceFileInputFormat
+                    output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                    serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
 
   Stage: Stage-0
     Fetch Operator
@@ -1698,18 +1734,18 @@ STAGE PLANS:
     Map Reduce
       Map Operator Tree:
           TableScan
-            alias: t3
+            alias: t5
             Statistics: Num rows: 20 Data size: 262 Basic stats: COMPLETE 
Column stats: NONE
             Select Operator
-              expressions: key (type: string), value (type: string), c_int 
(type: int), c_float (type: float), c_boolean (type: boolean), dt (type: string)
-              outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
+              expressions: key (type: string), value (type: string), c_int 
(type: int), c_float (type: float), c_boolean (type: boolean), dt (type: 
string), (c_int = 42) (type: boolean)
+              outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, 
_col6
               Statistics: Num rows: 20 Data size: 262 Basic stats: COMPLETE 
Column stats: NONE
               Reduce Output Operator
                 sort order: 
                 Statistics: Num rows: 20 Data size: 262 Basic stats: COMPLETE 
Column stats: NONE
-                value expressions: _col0 (type: string), _col1 (type: string), 
_col2 (type: int), _col3 (type: float), _col4 (type: boolean), _col5 (type: 
string)
+                value expressions: _col0 (type: string), _col1 (type: string), 
_col2 (type: int), _col3 (type: float), _col4 (type: boolean), _col5 (type: 
string), _col6 (type: boolean)
           TableScan
-            alias: t5
+            alias: t3
             Statistics: Num rows: 20 Data size: 262 Basic stats: COMPLETE 
Column stats: NONE
             Select Operator
               expressions: key (type: string), value (type: string), c_int 
(type: int), c_float (type: float), c_boolean (type: boolean), dt (type: string)
@@ -1746,11 +1782,11 @@ STAGE PLANS:
             1 
             2 
             3 
-          outputColumnNames: _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, _col25, _col26, 
_col27, _col28, _col29
-          residual filter predicates: {((_col6 = _col24) or ((_col28 = _col16) 
and (_col8 = 42)))} {((_col12 = _col24) or ((_col27 = _col15) and (_col13 = 
_col25)))} {((_col0 = _col24) or ((_col1 = _col25) and (_col26 = _col20)))}
+          outputColumnNames: _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, _col25, _col26, 
_col27, _col28, _col29, _col30
+          residual filter predicates: {((_col0 = _col25) or ((_col29 = _col17) 
and _col6))} {((_col13 = _col25) or ((_col28 = _col16) and (_col14 = _col26)))} 
{((_col7 = _col25) or ((_col8 = _col26) and (_col27 = _col21)))}
           Statistics: Num rows: 74250 Data size: 3964275 Basic stats: COMPLETE 
Column stats: NONE
           Select Operator
-            expressions: _col18 (type: string), _col19 (type: string), _col20 
(type: int), _col21 (type: float), _col22 (type: boolean), _col23 (type: 
string), _col24 (type: string), _col25 (type: string), _col26 (type: int), 
_col27 (type: float), _col28 (type: boolean), _col29 (type: string), _col0 
(type: string), _col1 (type: string), _col2 (type: int), _col3 (type: float), 
_col4 (type: boolean), _col5 (type: string), _col12 (type: string), _col13 
(type: string), _col14 (type: int), _col15 (type: float), _col16 (type: 
boolean), _col17 (type: string), _col6 (type: string), _col7 (type: string), 
_col8 (type: int), _col9 (type: float), _col10 (type: boolean), _col11 (type: 
string)
+            expressions: _col19 (type: string), _col20 (type: string), _col21 
(type: int), _col22 (type: float), _col23 (type: boolean), _col24 (type: 
string), _col25 (type: string), _col26 (type: string), _col27 (type: int), 
_col28 (type: float), _col29 (type: boolean), _col30 (type: string), _col7 
(type: string), _col8 (type: string), _col9 (type: int), _col10 (type: float), 
_col11 (type: boolean), _col12 (type: string), _col13 (type: string), _col14 
(type: string), _col15 (type: int), _col16 (type: float), _col17 (type: 
boolean), _col18 (type: string), _col0 (type: string), _col1 (type: string), 
_col2 (type: int), _col3 (type: float), _col4 (type: boolean), _col5 (type: 
string)
             outputColumnNames: _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, _col25, 
_col26, _col27, _col28, _col29
             Statistics: Num rows: 74250 Data size: 3964275 Basic stats: 
COMPLETE Column stats: NONE
             Limit

http://git-wip-us.apache.org/repos/asf/hive/blob/55887646/ql/src/test/results/clientpositive/join9.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/join9.q.out 
b/ql/src/test/results/clientpositive/join9.q.out
index 8c2dead..1dc2e0b 100644
--- a/ql/src/test/results/clientpositive/join9.q.out
+++ b/ql/src/test/results/clientpositive/join9.q.out
@@ -23,7 +23,7 @@ POSTHOOK: Input: default@srcpart
 POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=12
 POSTHOOK: Output: default@dest1_n39
 OPTIMIZED SQL: SELECT `t0`.`key`, `t2`.`value`
-FROM (SELECT `key`, CAST('2008-04-08' AS STRING) AS `ds`, CAST('12' AS STRING) 
AS `hr`
+FROM (SELECT `key`
 FROM `default`.`srcpart`
 WHERE `ds` = '2008-04-08' AND `hr` = '12' AND `key` IS NOT NULL) AS `t0`
 INNER JOIN (SELECT `key`, `value`
@@ -193,10 +193,10 @@ STAGE PLANS:
           keys:
             0 _col0 (type: string)
             1 _col0 (type: string)
-          outputColumnNames: _col0, _col4
+          outputColumnNames: _col0, _col2
           Statistics: Num rows: 550 Data size: 5843 Basic stats: COMPLETE 
Column stats: NONE
           Select Operator
-            expressions: UDFToInteger(_col0) (type: int), _col4 (type: string)
+            expressions: UDFToInteger(_col0) (type: int), _col2 (type: string)
             outputColumnNames: _col0, _col1
             Statistics: Num rows: 550 Data size: 5843 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/join_cond_pushdown_1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/join_cond_pushdown_1.q.out 
b/ql/src/test/results/clientpositive/join_cond_pushdown_1.q.out
index c968b38..352ae17 100644
--- a/ql/src/test/results/clientpositive/join_cond_pushdown_1.q.out
+++ b/ql/src/test/results/clientpositive/join_cond_pushdown_1.q.out
@@ -351,22 +351,22 @@ STAGE PLANS:
               Statistics: Num rows: 13 Data size: 1573 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: p_name (type: string), p_mfgr (type: string), 
p_brand (type: string), p_type (type: string), p_size (type: int), p_container 
(type: string), p_retailprice (type: double), p_comment (type: string)
-                outputColumnNames: _col1, _col2, _col3, _col4, _col5, _col6, 
_col7, _col8
+                outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, 
_col6, _col7
                 Statistics: Num rows: 13 Data size: 1573 Basic stats: COMPLETE 
Column stats: NONE
                 Reduce Output Operator
-                  key expressions: _col1 (type: string)
+                  key expressions: _col0 (type: string)
                   sort order: +
-                  Map-reduce partition columns: _col1 (type: string)
+                  Map-reduce partition columns: _col0 (type: string)
                   Statistics: Num rows: 13 Data size: 1573 Basic stats: 
COMPLETE Column stats: NONE
-                  value expressions: _col2 (type: string), _col3 (type: 
string), _col4 (type: string), _col5 (type: int), _col6 (type: string), _col7 
(type: double), _col8 (type: string)
+                  value expressions: _col1 (type: string), _col2 (type: 
string), _col3 (type: string), _col4 (type: int), _col5 (type: string), _col6 
(type: double), _col7 (type: string)
       Reduce Operator Tree:
         Join Operator
           condition map:
                Inner Join 0 to 1
           keys:
             0 _col1 (type: string)
-            1 _col1 (type: string)
-          outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, 
_col7, _col8, _col10, _col11, _col12, _col13, _col14, _col15, _col16, _col17
+            1 _col0 (type: string)
+          outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, 
_col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14, _col15, _col16
           Statistics: Num rows: 28 Data size: 3461 Basic stats: COMPLETE 
Column stats: NONE
           File Output Operator
             compressed: false
@@ -382,7 +382,7 @@ STAGE PLANS:
             Reduce Output Operator
               sort order: 
               Statistics: Num rows: 28 Data size: 3461 Basic stats: COMPLETE 
Column stats: NONE
-              value expressions: _col0 (type: int), _col1 (type: string), 
_col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: 
int), _col6 (type: string), _col7 (type: double), _col8 (type: string), _col10 
(type: string), _col11 (type: string), _col12 (type: string), _col13 (type: 
string), _col14 (type: int), _col15 (type: string), _col16 (type: double), 
_col17 (type: string)
+              value expressions: _col0 (type: int), _col1 (type: string), 
_col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: 
int), _col6 (type: string), _col7 (type: double), _col8 (type: string), _col9 
(type: string), _col10 (type: string), _col11 (type: string), _col12 (type: 
string), _col13 (type: int), _col14 (type: string), _col15 (type: double), 
_col16 (type: string)
           TableScan
             alias: p1
             Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE 
Column stats: NONE
@@ -401,10 +401,10 @@ STAGE PLANS:
           keys:
             0 
             1 
-          outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, 
_col7, _col8, _col10, _col11, _col12, _col13, _col14, _col15, _col16, _col17, 
_col18, _col19, _col20, _col21, _col22, _col23, _col24, _col25, _col26
+          outputColumnNames: _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, _col25
           Statistics: Num rows: 728 Data size: 178830 Basic stats: COMPLETE 
Column stats: NONE
           Select Operator
-            expressions: _col18 (type: int), _col19 (type: string), _col20 
(type: string), _col21 (type: string), _col22 (type: string), _col23 (type: 
int), _col24 (type: string), _col25 (type: double), _col26 (type: string), 1 
(type: int), _col10 (type: string), _col11 (type: string), _col12 (type: 
string), _col13 (type: string), _col14 (type: int), _col15 (type: string), 
_col16 (type: double), _col17 (type: string), _col0 (type: int), _col1 (type: 
string), _col2 (type: string), _col3 (type: string), _col4 (type: string), 
_col5 (type: int), _col6 (type: string), _col7 (type: double), _col8 (type: 
string)
+            expressions: _col17 (type: int), _col18 (type: string), _col19 
(type: string), _col20 (type: string), _col21 (type: string), _col22 (type: 
int), _col23 (type: string), _col24 (type: double), _col25 (type: string), 1 
(type: int), _col9 (type: string), _col10 (type: string), _col11 (type: 
string), _col12 (type: string), _col13 (type: int), _col14 (type: string), 
_col15 (type: double), _col16 (type: string), _col0 (type: int), _col1 (type: 
string), _col2 (type: string), _col3 (type: string), _col4 (type: string), 
_col5 (type: int), _col6 (type: string), _col7 (type: double), _col8 (type: 
string)
             outputColumnNames: _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, _col25, 
_col26
             Statistics: Num rows: 728 Data size: 178830 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/join_cond_pushdown_3.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/join_cond_pushdown_3.q.out 
b/ql/src/test/results/clientpositive/join_cond_pushdown_3.q.out
index 871d318..d643d14 100644
--- a/ql/src/test/results/clientpositive/join_cond_pushdown_3.q.out
+++ b/ql/src/test/results/clientpositive/join_cond_pushdown_3.q.out
@@ -359,22 +359,22 @@ STAGE PLANS:
               Statistics: Num rows: 13 Data size: 1573 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: p_name (type: string), p_mfgr (type: string), 
p_brand (type: string), p_type (type: string), p_size (type: int), p_container 
(type: string), p_retailprice (type: double), p_comment (type: string)
-                outputColumnNames: _col1, _col2, _col3, _col4, _col5, _col6, 
_col7, _col8
+                outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, 
_col6, _col7
                 Statistics: Num rows: 13 Data size: 1573 Basic stats: COMPLETE 
Column stats: NONE
                 Reduce Output Operator
-                  key expressions: _col1 (type: string)
+                  key expressions: _col0 (type: string)
                   sort order: +
-                  Map-reduce partition columns: _col1 (type: string)
+                  Map-reduce partition columns: _col0 (type: string)
                   Statistics: Num rows: 13 Data size: 1573 Basic stats: 
COMPLETE Column stats: NONE
-                  value expressions: _col2 (type: string), _col3 (type: 
string), _col4 (type: string), _col5 (type: int), _col6 (type: string), _col7 
(type: double), _col8 (type: string)
+                  value expressions: _col1 (type: string), _col2 (type: 
string), _col3 (type: string), _col4 (type: int), _col5 (type: string), _col6 
(type: double), _col7 (type: string)
       Reduce Operator Tree:
         Join Operator
           condition map:
                Inner Join 0 to 1
           keys:
             0 _col1 (type: string)
-            1 _col1 (type: string)
-          outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, 
_col7, _col8, _col10, _col11, _col12, _col13, _col14, _col15, _col16, _col17
+            1 _col0 (type: string)
+          outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, 
_col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14, _col15, _col16
           Statistics: Num rows: 28 Data size: 3461 Basic stats: COMPLETE 
Column stats: NONE
           File Output Operator
             compressed: false
@@ -390,7 +390,7 @@ STAGE PLANS:
             Reduce Output Operator
               sort order: 
               Statistics: Num rows: 28 Data size: 3461 Basic stats: COMPLETE 
Column stats: NONE
-              value expressions: _col0 (type: int), _col1 (type: string), 
_col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: 
int), _col6 (type: string), _col7 (type: double), _col8 (type: string), _col10 
(type: string), _col11 (type: string), _col12 (type: string), _col13 (type: 
string), _col14 (type: int), _col15 (type: string), _col16 (type: double), 
_col17 (type: string)
+              value expressions: _col0 (type: int), _col1 (type: string), 
_col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: 
int), _col6 (type: string), _col7 (type: double), _col8 (type: string), _col9 
(type: string), _col10 (type: string), _col11 (type: string), _col12 (type: 
string), _col13 (type: int), _col14 (type: string), _col15 (type: double), 
_col16 (type: string)
           TableScan
             alias: p1
             Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE 
Column stats: NONE
@@ -409,10 +409,10 @@ STAGE PLANS:
           keys:
             0 
             1 
-          outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, 
_col7, _col8, _col10, _col11, _col12, _col13, _col14, _col15, _col16, _col17, 
_col18, _col19, _col20, _col21, _col22, _col23, _col24, _col25, _col26
+          outputColumnNames: _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, _col25
           Statistics: Num rows: 728 Data size: 178830 Basic stats: COMPLETE 
Column stats: NONE
           Select Operator
-            expressions: _col18 (type: int), _col19 (type: string), _col20 
(type: string), _col21 (type: string), _col22 (type: string), _col23 (type: 
int), _col24 (type: string), _col25 (type: double), _col26 (type: string), 1 
(type: int), _col10 (type: string), _col11 (type: string), _col12 (type: 
string), _col13 (type: string), _col14 (type: int), _col15 (type: string), 
_col16 (type: double), _col17 (type: string), _col0 (type: int), _col1 (type: 
string), _col2 (type: string), _col3 (type: string), _col4 (type: string), 
_col5 (type: int), _col6 (type: string), _col7 (type: double), _col8 (type: 
string)
+            expressions: _col17 (type: int), _col18 (type: string), _col19 
(type: string), _col20 (type: string), _col21 (type: string), _col22 (type: 
int), _col23 (type: string), _col24 (type: double), _col25 (type: string), 1 
(type: int), _col9 (type: string), _col10 (type: string), _col11 (type: 
string), _col12 (type: string), _col13 (type: int), _col14 (type: string), 
_col15 (type: double), _col16 (type: string), _col0 (type: int), _col1 (type: 
string), _col2 (type: string), _col3 (type: string), _col4 (type: string), 
_col5 (type: int), _col6 (type: string), _col7 (type: double), _col8 (type: 
string)
             outputColumnNames: _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, _col25, 
_col26
             Statistics: Num rows: 728 Data size: 178830 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/join_cond_pushdown_unqual1.q.out
----------------------------------------------------------------------
diff --git 
a/ql/src/test/results/clientpositive/join_cond_pushdown_unqual1.q.out 
b/ql/src/test/results/clientpositive/join_cond_pushdown_unqual1.q.out
index 1d86613..3dcec7b 100644
--- a/ql/src/test/results/clientpositive/join_cond_pushdown_unqual1.q.out
+++ b/ql/src/test/results/clientpositive/join_cond_pushdown_unqual1.q.out
@@ -431,22 +431,22 @@ STAGE PLANS:
               Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column 
stats: NONE
               Select Operator
                 expressions: p2_name (type: string), p2_mfgr (type: string), 
p2_brand (type: string), p2_type (type: string), p2_size (type: int), 
p2_container (type: string), p2_retailprice (type: double), p2_comment (type: 
string)
-                outputColumnNames: _col1, _col2, _col3, _col4, _col5, _col6, 
_col7, _col8
+                outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, 
_col6, _col7
                 Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL 
Column stats: NONE
                 Reduce Output Operator
-                  key expressions: _col1 (type: string)
+                  key expressions: _col0 (type: string)
                   sort order: +
-                  Map-reduce partition columns: _col1 (type: string)
+                  Map-reduce partition columns: _col0 (type: string)
                   Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL 
Column stats: NONE
-                  value expressions: _col2 (type: string), _col3 (type: 
string), _col4 (type: string), _col5 (type: int), _col6 (type: string), _col7 
(type: double), _col8 (type: string)
+                  value expressions: _col1 (type: string), _col2 (type: 
string), _col3 (type: string), _col4 (type: int), _col5 (type: string), _col6 
(type: double), _col7 (type: string)
       Reduce Operator Tree:
         Join Operator
           condition map:
                Inner Join 0 to 1
           keys:
             0 _col1 (type: string)
-            1 _col1 (type: string)
-          outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, 
_col7, _col8, _col10, _col11, _col12, _col13, _col14, _col15, _col16, _col17
+            1 _col0 (type: string)
+          outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, 
_col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14, _col15, _col16
           Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column 
stats: NONE
           File Output Operator
             compressed: false
@@ -462,7 +462,7 @@ STAGE PLANS:
             Reduce Output Operator
               sort order: 
               Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column 
stats: NONE
-              value expressions: _col0 (type: int), _col1 (type: string), 
_col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: 
int), _col6 (type: string), _col7 (type: double), _col8 (type: string), _col10 
(type: string), _col11 (type: string), _col12 (type: string), _col13 (type: 
string), _col14 (type: int), _col15 (type: string), _col16 (type: double), 
_col17 (type: string)
+              value expressions: _col0 (type: int), _col1 (type: string), 
_col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: 
int), _col6 (type: string), _col7 (type: double), _col8 (type: string), _col9 
(type: string), _col10 (type: string), _col11 (type: string), _col12 (type: 
string), _col13 (type: int), _col14 (type: string), _col15 (type: double), 
_col16 (type: string)
           TableScan
             alias: p1
             Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE 
Column stats: NONE
@@ -481,10 +481,10 @@ STAGE PLANS:
           keys:
             0 
             1 
-          outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, 
_col7, _col8, _col10, _col11, _col12, _col13, _col14, _col15, _col16, _col17, 
_col18, _col19, _col20, _col21, _col22, _col23, _col24, _col25, _col26
+          outputColumnNames: _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, _col25
           Statistics: Num rows: 26 Data size: 3173 Basic stats: PARTIAL Column 
stats: NONE
           Select Operator
-            expressions: _col18 (type: int), _col19 (type: string), _col20 
(type: string), _col21 (type: string), _col22 (type: string), _col23 (type: 
int), _col24 (type: string), _col25 (type: double), _col26 (type: string), 1 
(type: int), _col10 (type: string), _col11 (type: string), _col12 (type: 
string), _col13 (type: string), _col14 (type: int), _col15 (type: string), 
_col16 (type: double), _col17 (type: string), _col0 (type: int), _col1 (type: 
string), _col2 (type: string), _col3 (type: string), _col4 (type: string), 
_col5 (type: int), _col6 (type: string), _col7 (type: double), _col8 (type: 
string)
+            expressions: _col17 (type: int), _col18 (type: string), _col19 
(type: string), _col20 (type: string), _col21 (type: string), _col22 (type: 
int), _col23 (type: string), _col24 (type: double), _col25 (type: string), 1 
(type: int), _col9 (type: string), _col10 (type: string), _col11 (type: 
string), _col12 (type: string), _col13 (type: int), _col14 (type: string), 
_col15 (type: double), _col16 (type: string), _col0 (type: int), _col1 (type: 
string), _col2 (type: string), _col3 (type: string), _col4 (type: string), 
_col5 (type: int), _col6 (type: string), _col7 (type: double), _col8 (type: 
string)
             outputColumnNames: _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, _col25, 
_col26
             Statistics: Num rows: 26 Data size: 3173 Basic stats: PARTIAL 
Column stats: NONE
             File Output Operator

http://git-wip-us.apache.org/repos/asf/hive/blob/55887646/ql/src/test/results/clientpositive/join_cond_pushdown_unqual3.q.out
----------------------------------------------------------------------
diff --git 
a/ql/src/test/results/clientpositive/join_cond_pushdown_unqual3.q.out 
b/ql/src/test/results/clientpositive/join_cond_pushdown_unqual3.q.out
index 8ffee7a..d9e2276 100644
--- a/ql/src/test/results/clientpositive/join_cond_pushdown_unqual3.q.out
+++ b/ql/src/test/results/clientpositive/join_cond_pushdown_unqual3.q.out
@@ -439,22 +439,22 @@ STAGE PLANS:
               Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column 
stats: NONE
               Select Operator
                 expressions: p2_name (type: string), p2_mfgr (type: string), 
p2_brand (type: string), p2_type (type: string), p2_size (type: int), 
p2_container (type: string), p2_retailprice (type: double), p2_comment (type: 
string)
-                outputColumnNames: _col1, _col2, _col3, _col4, _col5, _col6, 
_col7, _col8
+                outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, 
_col6, _col7
                 Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL 
Column stats: NONE
                 Reduce Output Operator
-                  key expressions: _col1 (type: string)
+                  key expressions: _col0 (type: string)
                   sort order: +
-                  Map-reduce partition columns: _col1 (type: string)
+                  Map-reduce partition columns: _col0 (type: string)
                   Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL 
Column stats: NONE
-                  value expressions: _col2 (type: string), _col3 (type: 
string), _col4 (type: string), _col5 (type: int), _col6 (type: string), _col7 
(type: double), _col8 (type: string)
+                  value expressions: _col1 (type: string), _col2 (type: 
string), _col3 (type: string), _col4 (type: int), _col5 (type: string), _col6 
(type: double), _col7 (type: string)
       Reduce Operator Tree:
         Join Operator
           condition map:
                Inner Join 0 to 1
           keys:
             0 _col1 (type: string)
-            1 _col1 (type: string)
-          outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, 
_col7, _col8, _col10, _col11, _col12, _col13, _col14, _col15, _col16, _col17
+            1 _col0 (type: string)
+          outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, 
_col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14, _col15, _col16
           Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column 
stats: NONE
           File Output Operator
             compressed: false
@@ -470,7 +470,7 @@ STAGE PLANS:
             Reduce Output Operator
               sort order: 
               Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column 
stats: NONE
-              value expressions: _col0 (type: int), _col1 (type: string), 
_col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: 
int), _col6 (type: string), _col7 (type: double), _col8 (type: string), _col10 
(type: string), _col11 (type: string), _col12 (type: string), _col13 (type: 
string), _col14 (type: int), _col15 (type: string), _col16 (type: double), 
_col17 (type: string)
+              value expressions: _col0 (type: int), _col1 (type: string), 
_col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: 
int), _col6 (type: string), _col7 (type: double), _col8 (type: string), _col9 
(type: string), _col10 (type: string), _col11 (type: string), _col12 (type: 
string), _col13 (type: int), _col14 (type: string), _col15 (type: double), 
_col16 (type: string)
           TableScan
             alias: p1
             Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE 
Column stats: NONE
@@ -489,10 +489,10 @@ STAGE PLANS:
           keys:
             0 
             1 
-          outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, 
_col7, _col8, _col10, _col11, _col12, _col13, _col14, _col15, _col16, _col17, 
_col18, _col19, _col20, _col21, _col22, _col23, _col24, _col25, _col26
+          outputColumnNames: _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, _col25
           Statistics: Num rows: 26 Data size: 3173 Basic stats: PARTIAL Column 
stats: NONE
           Select Operator
-            expressions: _col18 (type: int), _col19 (type: string), _col20 
(type: string), _col21 (type: string), _col22 (type: string), _col23 (type: 
int), _col24 (type: string), _col25 (type: double), _col26 (type: string), 1 
(type: int), _col10 (type: string), _col11 (type: string), _col12 (type: 
string), _col13 (type: string), _col14 (type: int), _col15 (type: string), 
_col16 (type: double), _col17 (type: string), _col0 (type: int), _col1 (type: 
string), _col2 (type: string), _col3 (type: string), _col4 (type: string), 
_col5 (type: int), _col6 (type: string), _col7 (type: double), _col8 (type: 
string)
+            expressions: _col17 (type: int), _col18 (type: string), _col19 
(type: string), _col20 (type: string), _col21 (type: string), _col22 (type: 
int), _col23 (type: string), _col24 (type: double), _col25 (type: string), 1 
(type: int), _col9 (type: string), _col10 (type: string), _col11 (type: 
string), _col12 (type: string), _col13 (type: int), _col14 (type: string), 
_col15 (type: double), _col16 (type: string), _col0 (type: int), _col1 (type: 
string), _col2 (type: string), _col3 (type: string), _col4 (type: string), 
_col5 (type: int), _col6 (type: string), _col7 (type: double), _col8 (type: 
string)
             outputColumnNames: _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, _col25, 
_col26
             Statistics: Num rows: 26 Data size: 3173 Basic stats: PARTIAL 
Column stats: NONE
             File Output Operator

http://git-wip-us.apache.org/repos/asf/hive/blob/55887646/ql/src/test/results/clientpositive/join_emit_interval.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/join_emit_interval.q.out 
b/ql/src/test/results/clientpositive/join_emit_interval.q.out
index 44d69da..18be46f 100644
--- a/ql/src/test/results/clientpositive/join_emit_interval.q.out
+++ b/ql/src/test/results/clientpositive/join_emit_interval.q.out
@@ -68,15 +68,15 @@ STAGE PLANS:
             alias: test1_n7
             Statistics: Num rows: 6 Data size: 56 Basic stats: COMPLETE Column 
stats: NONE
             Select Operator
-              expressions: key (type: int), value (type: int), col_1 (type: 
string)
-              outputColumnNames: _col0, _col1, _col2
+              expressions: key (type: int), value (type: int), col_1 (type: 
string), key BETWEEN 100 AND 102 (type: boolean)
+              outputColumnNames: _col0, _col1, _col2, _col3
               Statistics: Num rows: 6 Data size: 56 Basic stats: COMPLETE 
Column stats: NONE
               Reduce Output Operator
                 key expressions: _col1 (type: int)
                 sort order: +
                 Map-reduce partition columns: _col1 (type: int)
                 Statistics: Num rows: 6 Data size: 56 Basic stats: COMPLETE 
Column stats: NONE
-                value expressions: _col0 (type: int), _col2 (type: string)
+                value expressions: _col0 (type: int), _col2 (type: string), 
_col3 (type: boolean)
           TableScan
             alias: test2_n4
             Statistics: Num rows: 4 Data size: 38 Basic stats: COMPLETE Column 
stats: NONE
@@ -95,20 +95,24 @@ STAGE PLANS:
           condition map:
                Left Outer Join 0 to 1
           filter predicates:
-            0 {VALUE._col0 BETWEEN 100 AND 102}
+            0 {VALUE._col2}
             1 
           keys:
             0 _col1 (type: int)
             1 _col1 (type: int)
-          outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
+          outputColumnNames: _col0, _col1, _col2, _col4, _col5, _col6
           Statistics: Num rows: 6 Data size: 61 Basic stats: COMPLETE Column 
stats: NONE
-          File Output Operator
-            compressed: false
+          Select Operator
+            expressions: _col0 (type: int), _col1 (type: int), _col2 (type: 
string), _col4 (type: int), _col5 (type: int), _col6 (type: string)
+            outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
             Statistics: Num rows: 6 Data size: 61 Basic stats: COMPLETE Column 
stats: NONE
-            table:
-                input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-                serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+            File Output Operator
+              compressed: false
+              Statistics: Num rows: 6 Data size: 61 Basic stats: COMPLETE 
Column stats: NONE
+              table:
+                  input format: 
org.apache.hadoop.mapred.SequenceFileInputFormat
+                  output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                  serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
 
   Stage: Stage-0
     Fetch Operator
@@ -166,13 +170,13 @@ STAGE PLANS:
             alias: test1_n7
             Statistics: Num rows: 6 Data size: 56 Basic stats: COMPLETE Column 
stats: NONE
             Select Operator
-              expressions: key (type: int), value (type: int), col_1 (type: 
string)
-              outputColumnNames: _col0, _col1, _col2
+              expressions: key (type: int), value (type: int), col_1 (type: 
string), key BETWEEN 100 AND 102 (type: boolean)
+              outputColumnNames: _col0, _col1, _col2, _col3
               Statistics: Num rows: 6 Data size: 56 Basic stats: COMPLETE 
Column stats: NONE
               Reduce Output Operator
                 sort order: 
                 Statistics: Num rows: 6 Data size: 56 Basic stats: COMPLETE 
Column stats: NONE
-                value expressions: _col0 (type: int), _col1 (type: int), _col2 
(type: string)
+                value expressions: _col0 (type: int), _col1 (type: int), _col2 
(type: string), _col3 (type: boolean)
           TableScan
             alias: test2_n4
             Statistics: Num rows: 4 Data size: 38 Basic stats: COMPLETE Column 
stats: NONE
@@ -189,20 +193,24 @@ STAGE PLANS:
           condition map:
                Left Outer Join 0 to 1
           filter predicates:
-            0 {VALUE._col0 BETWEEN 100 AND 102}
+            0 {VALUE._col3}
             1 
           keys:
             0 
             1 
-          outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
+          outputColumnNames: _col0, _col1, _col2, _col4, _col5, _col6
           Statistics: Num rows: 24 Data size: 476 Basic stats: COMPLETE Column 
stats: NONE
-          File Output Operator
-            compressed: false
+          Select Operator
+            expressions: _col0 (type: int), _col1 (type: int), _col2 (type: 
string), _col4 (type: int), _col5 (type: int), _col6 (type: string)
+            outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
             Statistics: Num rows: 24 Data size: 476 Basic stats: COMPLETE 
Column stats: NONE
-            table:
-                input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-                serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+            File Output Operator
+              compressed: false
+              Statistics: Num rows: 24 Data size: 476 Basic stats: COMPLETE 
Column stats: NONE
+              table:
+                  input format: 
org.apache.hadoop.mapred.SequenceFileInputFormat
+                  output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                  serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
 
   Stage: Stage-0
     Fetch Operator

Reply via email to