http://git-wip-us.apache.org/repos/asf/hive/blob/55887646/ql/src/test/results/clientpositive/join45.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/join45.q.out 
b/ql/src/test/results/clientpositive/join45.q.out
index 6cf6c33..7865e0e 100644
--- a/ql/src/test/results/clientpositive/join45.q.out
+++ b/ql/src/test/results/clientpositive/join45.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,21 +388,25 @@ STAGE PLANS:
           keys:
             0 
             1 
-          outputColumnNames: _col0, _col1, _col2, _col3
+          outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
           Statistics: Num rows: 12500 Data size: 240800 Basic stats: COMPLETE 
Column stats: NONE
           Filter Operator
-            predicate: ((_col0 = _col2) or UDFToDouble(_col1) BETWEEN 100.0D 
AND 102.0D or UDFToDouble(_col3) BETWEEN 100.0D AND 102.0D) (type: boolean)
-            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
+            predicate: ((_col0 = _col3) or _col2 or _col5) (type: boolean)
+            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
@@ -474,24 +478,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:
@@ -499,21 +503,25 @@ STAGE PLANS:
           keys:
             0 
             1 
-          outputColumnNames: _col0, _col1, _col2, _col3
+          outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
           Statistics: Num rows: 12500 Data size: 240800 Basic stats: COMPLETE 
Column stats: NONE
           Filter Operator
-            predicate: (((UDFToDouble(_col0) + UDFToDouble(_col2)) <= 102.0D) 
and ((UDFToDouble(_col0) + UDFToDouble(_col2)) >= 100.0D)) (type: boolean)
+            predicate: (((_col2 + _col5) <= 102.0D) and ((_col2 + _col5) >= 
100.0D)) (type: boolean)
             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
@@ -579,24 +587,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:
@@ -604,21 +612,25 @@ STAGE PLANS:
           keys:
             0 
             1 
-          outputColumnNames: _col0, _col1, _col2, _col3
+          outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
           Statistics: Num rows: 12500 Data size: 240800 Basic stats: COMPLETE 
Column stats: NONE
           Filter Operator
-            predicate: (((UDFToDouble(_col0) + UDFToDouble(_col2)) <= 102.0D) 
or ((UDFToDouble(_col0) + UDFToDouble(_col2)) >= 100.0D)) (type: boolean)
+            predicate: (((_col2 + _col5) <= 102.0D) or ((_col2 + _col5) >= 
100.0D)) (type: boolean)
             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
@@ -686,24 +698,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:
@@ -711,21 +723,25 @@ STAGE PLANS:
           keys:
             0 
             1 
-          outputColumnNames: _col0, _col1, _col2, _col3
+          outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
           Statistics: Num rows: 12500 Data size: 240800 Basic stats: COMPLETE 
Column stats: NONE
           Filter Operator
-            predicate: (struct(UDFToDouble(_col0),UDFToDouble(_col2))) IN 
(const struct(100.0D,100.0D), const struct(101.0D,101.0D), const 
struct(102.0D,102.0D)) (type: boolean)
-            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
+            predicate: (struct(_col2,_col5)) IN (const struct(100.0D,100.0D), 
const struct(101.0D,101.0D), const struct(102.0D,102.0D)) (type: boolean)
+            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
@@ -784,15 +800,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
@@ -813,7 +829,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
@@ -829,18 +845,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:
@@ -848,13 +864,13 @@ STAGE PLANS:
           keys:
             0 
             1 
-          outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
+          outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, 
_col7
           Statistics: Num rows: 13750 Data size: 264875 Basic stats: COMPLETE 
Column stats: NONE
           Filter Operator
-            predicate: ((UDFToDouble(_col4) + UDFToDouble(_col0)) >= 100.0D) 
(type: boolean)
+            predicate: ((_col7 + _col2) >= 100.0D) (type: boolean)
             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
@@ -937,15 +953,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
@@ -966,7 +982,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
@@ -982,18 +998,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:
@@ -1001,21 +1017,25 @@ STAGE PLANS:
           keys:
             0 
             1 
-          outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
+          outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, 
_col7
           Statistics: Num rows: 13750 Data size: 264875 Basic stats: COMPLETE 
Column stats: NONE
           Filter Operator
-            predicate: ((UDFToDouble(_col4) + UDFToDouble(_col0)) <= 102.0D) 
(type: boolean)
+            predicate: ((_col7 + _col2) <= 102.0D) (type: boolean)
             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
@@ -1052,7 +1072,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
@@ -1086,24 +1106,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:
@@ -1111,17 +1131,21 @@ STAGE PLANS:
           keys:
             0 
             1 
-          outputColumnNames: _col0, _col1, _col2, _col3
+          outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
           Statistics: Num rows: 12500 Data size: 240800 Basic stats: COMPLETE 
Column stats: NONE
           Filter Operator
-            predicate: ((UDFToDouble(_col2) + UDFToDouble(_col0)) >= 100.0D) 
(type: boolean)
+            predicate: ((_col5 + _col2) >= 100.0D) (type: boolean)
             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
@@ -1172,7 +1196,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)
@@ -1235,15 +1259,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
@@ -1264,7 +1288,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
@@ -1280,18 +1304,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:
@@ -1299,21 +1323,25 @@ STAGE PLANS:
           keys:
             0 
             1 
-          outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
+          outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, 
_col7
           Statistics: Num rows: 13750 Data size: 264875 Basic stats: COMPLETE 
Column stats: NONE
           Filter Operator
-            predicate: ((UDFToDouble(_col4) + UDFToDouble(_col0)) <= 102.0D) 
(type: boolean)
+            predicate: ((_col7 + _col2) <= 102.0D) (type: boolean)
             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
@@ -1340,7 +1368,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
@@ -1374,24 +1402,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:
@@ -1399,17 +1427,21 @@ STAGE PLANS:
           keys:
             0 
             1 
-          outputColumnNames: _col0, _col1, _col2, _col3
+          outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
           Statistics: Num rows: 12500 Data size: 240800 Basic stats: COMPLETE 
Column stats: NONE
           Filter Operator
-            predicate: ((UDFToDouble(_col2) + UDFToDouble(_col0)) >= 100.0D) 
(type: boolean)
+            predicate: ((_col5 + _col2) >= 100.0D) (type: boolean)
             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
@@ -1460,7 +1492,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)
@@ -1523,15 +1555,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
@@ -1552,7 +1584,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
@@ -1568,18 +1600,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:
@@ -1587,21 +1619,25 @@ STAGE PLANS:
           keys:
             0 
             1 
-          outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
+          outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, 
_col7
           Statistics: Num rows: 13750 Data size: 264875 Basic stats: COMPLETE 
Column stats: NONE
           Filter Operator
-            predicate: ((UDFToDouble(_col4) + UDFToDouble(_col0)) <= 102.0D) 
(type: boolean)
+            predicate: ((_col7 + _col2) <= 102.0D) (type: boolean)
             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
@@ -1718,18 +1754,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)
@@ -1766,13 +1802,13 @@ 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
+          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
           Statistics: Num rows: 176000 Data size: 9396800 Basic stats: 
COMPLETE Column stats: NONE
           Filter Operator
-            predicate: (((_col0 = _col24) or ((_col1 = _col25) and (_col26 = 
_col20))) and ((_col12 = _col24) or ((_col27 = _col15) and (_col13 = _col25))) 
and ((_col6 = _col24) or ((_col28 = _col16) and (_col8 = 42)))) (type: boolean)
+            predicate: (((_col0 = _col25) or ((_col29 = _col17) and _col6)) 
and ((_col13 = _col25) or ((_col28 = _col16) and (_col14 = _col26))) and 
((_col7 = _col25) or ((_col8 = _col26) and (_col27 = _col21)))) (type: boolean)
             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/join46.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/join46.q.out 
b/ql/src/test/results/clientpositive/join46.q.out
index 738f0b6..3640691 100644
--- a/ql/src/test/results/clientpositive/join46.q.out
+++ b/ql/src/test/results/clientpositive/join46.q.out
@@ -167,15 +167,15 @@ STAGE PLANS:
             alias: test1_n2
             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_n0
             filterExpr: key BETWEEN 100 AND 102 (type: boolean)
@@ -198,20 +198,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
@@ -274,13 +278,13 @@ STAGE PLANS:
             alias: test1_n2
             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_n0
             filterExpr: key BETWEEN 100 AND 102 (type: boolean)
@@ -301,20 +305,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
@@ -467,13 +475,13 @@ STAGE PLANS:
             alias: test1_n2
             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_n0
             Statistics: Num rows: 4 Data size: 38 Basic stats: COMPLETE Column 
stats: NONE
@@ -490,20 +498,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
@@ -571,13 +583,13 @@ STAGE PLANS:
             alias: test1_n2
             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_n0
             Statistics: Num rows: 4 Data size: 38 Basic stats: COMPLETE Column 
stats: NONE
@@ -596,16 +608,20 @@ STAGE PLANS:
           keys:
             0 
             1 
-          outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
-          residual filter predicates: {((_col1 = _col4) or _col0 BETWEEN 100 
AND 102 or _col3 BETWEEN 100 AND 102)}
+          outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6
+          residual filter predicates: {((_col1 = _col5) or _col3 or _col4 
BETWEEN 100 AND 102)}
           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
@@ -676,13 +692,13 @@ STAGE PLANS:
             alias: test1_n2
             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_n0
             Statistics: Num rows: 4 Data size: 38 Basic stats: COMPLETE Column 
stats: NONE
@@ -701,16 +717,20 @@ STAGE PLANS:
           keys:
             0 
             1 
-          outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
-          residual filter predicates: {((_col1 = _col4) or _col0 BETWEEN 100 
AND 102)}
+          outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6
+          residual filter predicates: {((_col1 = _col5) or _col3)}
           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
@@ -878,15 +898,15 @@ STAGE PLANS:
             alias: test1_n2
             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_n0
             Statistics: Num rows: 4 Data size: 38 Basic stats: COMPLETE Column 
stats: NONE
@@ -907,16 +927,20 @@ STAGE PLANS:
           keys:
             0 _col1 (type: int)
             1 _col1 (type: int)
-          outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
-          residual filter predicates: {(_col0 BETWEEN 100 AND 102 or _col3 
BETWEEN 100 AND 102)}
+          outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6
+          residual filter predicates: {(_col3 or _col4 BETWEEN 100 AND 102)}
           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
@@ -1095,13 +1119,13 @@ STAGE PLANS:
             alias: test2_n0
             Statistics: Num rows: 4 Data size: 38 Basic stats: COMPLETE Column 
stats: NONE
             Select Operator
-              expressions: key (type: int), value (type: int), col_2 (type: 
string)
-              outputColumnNames: _col0, _col1, _col2
+              expressions: key (type: int), value (type: int), col_2 (type: 
string), key BETWEEN 100 AND 102 (type: boolean)
+              outputColumnNames: _col0, _col1, _col2, _col3
               Statistics: Num rows: 4 Data size: 38 Basic stats: COMPLETE 
Column stats: NONE
               Reduce Output Operator
                 sort order: 
                 Statistics: Num rows: 4 Data size: 38 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)
       Reduce Operator Tree:
         Join Operator
           condition map:
@@ -1109,16 +1133,20 @@ STAGE PLANS:
           keys:
             0 
             1 
-          outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
-          residual filter predicates: {((_col1 = _col4) or _col0 BETWEEN 100 
AND 102 or _col3 BETWEEN 100 AND 102)}
+          outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6
+          residual filter predicates: {((_col1 = _col4) or _col0 BETWEEN 100 
AND 102 or _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), _col3 (type: int), _col4 (type: int), _col5 (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
@@ -1300,13 +1328,13 @@ STAGE PLANS:
             alias: test2_n0
             Statistics: Num rows: 4 Data size: 38 Basic stats: COMPLETE Column 
stats: NONE
             Select Operator
-              expressions: key (type: int), value (type: int), col_2 (type: 
string)
-              outputColumnNames: _col0, _col1, _col2
+              expressions: key (type: int), value (type: int), col_2 (type: 
string), key BETWEEN 100 AND 102 (type: boolean)
+              outputColumnNames: _col0, _col1, _col2, _col3
               Statistics: Num rows: 4 Data size: 38 Basic stats: COMPLETE 
Column stats: NONE
               Reduce Output Operator
                 sort order: 
                 Statistics: Num rows: 4 Data size: 38 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)
       Reduce Operator Tree:
         Join Operator
           condition map:
@@ -1314,16 +1342,20 @@ STAGE PLANS:
           keys:
             0 
             1 
-          outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
-          residual filter predicates: {((_col1 = _col4) or _col3 BETWEEN 100 
AND 102)}
+          outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6
+          residual filter predicates: {((_col1 = _col4) or _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), _col3 (type: int), _col4 (type: int), _col5 (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
@@ -1403,15 +1435,15 @@ STAGE PLANS:
             alias: test2_n0
             Statistics: Num rows: 4 Data size: 38 Basic stats: COMPLETE Column 
stats: NONE
             Select Operator
-              expressions: key (type: int), value (type: int), col_2 (type: 
string)
-              outputColumnNames: _col0, _col1, _col2
+              expressions: key (type: int), value (type: int), col_2 (type: 
string), key BETWEEN 100 AND 102 (type: boolean)
+              outputColumnNames: _col0, _col1, _col2, _col3
               Statistics: Num rows: 4 Data size: 38 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: 4 Data size: 38 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)
       Reduce Operator Tree:
         Join Operator
           condition map:
@@ -1419,16 +1451,20 @@ STAGE PLANS:
           keys:
             0 _col1 (type: int)
             1 _col1 (type: int)
-          outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
-          residual filter predicates: {(_col0 BETWEEN 100 AND 102 or _col3 
BETWEEN 100 AND 102)}
+          outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6
+          residual filter predicates: {(_col0 BETWEEN 100 AND 102 or _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), _col3 (type: int), _col4 (type: int), _col5 (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
@@ -1874,7 +1910,7 @@ NULL      NULL    NULL    105     NULL    None
 101    2       Car     102     2       Del
 99     2       Mat     102     2       Del
 NULL   NULL    NULL    104     3       Fli
-Warning: Shuffle Join JOIN[17][tables = [$hdt$_0, $hdt$_1, $hdt$_2]] in Stage 
'Stage-2:MAPRED' is a cross product
+Warning: Shuffle Join JOIN[18][tables = [$hdt$_0, $hdt$_1]] in Stage 
'Stage-2:MAPRED' is a cross product
 PREHOOK: query: EXPLAIN
 SELECT *
 FROM (
@@ -1948,15 +1984,15 @@ STAGE PLANS:
             alias: test2_n0
             Statistics: Num rows: 4 Data size: 38 Basic stats: COMPLETE Column 
stats: NONE
             Select Operator
-              expressions: key (type: int), value (type: int), col_2 (type: 
string)
-              outputColumnNames: _col0, _col1, _col2
+              expressions: key (type: int), value (type: int), col_2 (type: 
string), key BETWEEN 100 AND 102 (type: boolean)
+              outputColumnNames: _col0, _col1, _col2, _col3
               Statistics: Num rows: 4 Data size: 38 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: 4 Data size: 38 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)
       Reduce Operator Tree:
         Join Operator
           condition map:
@@ -1964,15 +2000,19 @@ STAGE PLANS:
           keys:
             0 _col1 (type: int)
             1 _col1 (type: int)
-          outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
-          residual filter predicates: {(_col0 BETWEEN 100 AND 102 or _col3 
BETWEEN 100 AND 102)}
+          outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6
+          residual filter predicates: {(_col0 BETWEEN 100 AND 102 or _col6)}
           Statistics: Num rows: 6 Data size: 61 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: int), _col1 (type: int), _col2 (type: 
string), _col3 (type: int), _col4 (type: int), _col5 (type: string)
+            outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
+            Statistics: Num rows: 6 Data size: 61 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
@@ -2012,15 +2052,15 @@ STAGE PLANS:
             alias: test1_n2
             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_n0
             Statistics: Num rows: 4 Data size: 38 Basic stats: COMPLETE Column 
stats: NONE
@@ -2041,15 +2081,19 @@ STAGE PLANS:
           keys:
             0 _col1 (type: int)
             1 _col1 (type: int)
-          outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
-          residual filter predicates: {(_col0 BETWEEN 100 AND 102 or _col3 
BETWEEN 100 AND 102)}
+          outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6
+          residual filter predicates: {(_col3 or _col4 BETWEEN 100 AND 102)}
           Statistics: Num rows: 6 Data size: 61 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: 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
+            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-0
     Fetch Operator
@@ -2057,7 +2101,7 @@ STAGE PLANS:
       Processor Tree:
         ListSink
 
-Warning: Shuffle Join JOIN[17][tables = [$hdt$_0, $hdt$_1, $hdt$_2]] in Stage 
'Stage-2:MAPRED' is a cross product
+Warning: Shuffle Join JOIN[18][tables = [$hdt$_0, $hdt$_1]] in Stage 
'Stage-2:MAPRED' is a cross product
 PREHOOK: query: SELECT *
 FROM (
   SELECT test1_n2.key AS key1, test1_n2.value AS value1, test1_n2.col_1 AS 
col_1,

Reply via email to