http://git-wip-us.apache.org/repos/asf/hive/blob/55887646/ql/src/test/results/clientpositive/llap/vectorized_join46.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/vectorized_join46.q.out 
b/ql/src/test/results/clientpositive/llap/vectorized_join46.q.out
index bd40d8f..1b4d343 100644
--- a/ql/src/test/results/clientpositive/llap/vectorized_join46.q.out
+++ b/ql/src/test/results/clientpositive/llap/vectorized_join46.q.out
@@ -234,17 +234,18 @@ STAGE PLANS:
                   TableScan Vectorization:
                       native: true
                   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
                     Select Vectorization:
                         className: VectorSelectOperator
                         native: true
-                    Statistics: Num rows: 6 Data size: 572 Basic stats: 
COMPLETE Column stats: COMPLETE
+                        selectExpressions: LongColumnBetween(col 0:int, left 
100, right 102) -> 4:boolean
+                    Statistics: Num rows: 6 Data size: 596 Basic stats: 
COMPLETE Column stats: COMPLETE
                     Map Join Operator
                       condition map:
                            Left Outer Join 0 to 1
                       filter predicates:
-                        0 {_col0 BETWEEN 100 AND 102}
+                        0 {_col3}
                         1 
                       keys:
                         0 _col1 (type: int)
@@ -253,20 +254,27 @@ STAGE PLANS:
                           className: VectorMapJoinOuterLongOperator
                           native: true
                           nativeConditionsMet: 
hive.mapjoin.optimized.hashtable IS true, 
hive.vectorized.execution.mapjoin.native.enabled IS true, hive.execution.engine 
tez IN [tez, spark] IS true, One MapJoin Condition IS true, No nullsafe IS 
true, Small table vectorizes IS true, Outer Join has keys IS true, Optimized 
Table and Supports Key Types IS true
-                      outputColumnNames: _col0, _col1, _col2, _col3, _col4, 
_col5
+                      outputColumnNames: _col0, _col1, _col2, _col4, _col5, 
_col6
                       input vertices:
                         1 Map 2
                       Statistics: Num rows: 8 Data size: 1049 Basic stats: 
COMPLETE Column stats: COMPLETE
-                      File Output Operator
-                        compressed: false
-                        File Sink Vectorization:
-                            className: VectorFileSinkOperator
-                            native: 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
+                        Select Vectorization:
+                            className: VectorSelectOperator
+                            native: true
                         Statistics: Num rows: 8 Data size: 1049 Basic stats: 
COMPLETE Column stats: COMPLETE
-                        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
+                          File Sink Vectorization:
+                              className: VectorFileSinkOperator
+                              native: false
+                          Statistics: Num rows: 8 Data size: 1049 Basic stats: 
COMPLETE Column stats: COMPLETE
+                          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
             Execution mode: vectorized, llap
             LLAP IO: no inputs
             Map Vectorization:
@@ -396,17 +404,18 @@ STAGE PLANS:
                   TableScan Vectorization:
                       native: true
                   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
                     Select Vectorization:
                         className: VectorSelectOperator
                         native: true
-                    Statistics: Num rows: 6 Data size: 572 Basic stats: 
COMPLETE Column stats: COMPLETE
+                        selectExpressions: LongColumnBetween(col 0:int, left 
100, right 102) -> 4:boolean
+                    Statistics: Num rows: 6 Data size: 596 Basic stats: 
COMPLETE Column stats: COMPLETE
                     Map Join Operator
                       condition map:
                            Left Outer Join 0 to 1
                       filter predicates:
-                        0 {_col0 BETWEEN 100 AND 102}
+                        0 {_col3}
                         1 
                       keys:
                         0 
@@ -416,20 +425,27 @@ STAGE PLANS:
                           native: false
                           nativeConditionsMet: 
hive.mapjoin.optimized.hashtable IS true, 
hive.vectorized.execution.mapjoin.native.enabled IS true, hive.execution.engine 
tez IN [tez, spark] IS true, One MapJoin Condition IS true, No nullsafe IS 
true, Small table vectorizes IS true, Optimized Table and Supports Key Types IS 
true
                           nativeConditionsNotMet: Outer Join has keys IS false
-                      outputColumnNames: _col0, _col1, _col2, _col3, _col4, 
_col5
+                      outputColumnNames: _col0, _col1, _col2, _col4, _col5, 
_col6
                       input vertices:
                         1 Map 2
                       Statistics: Num rows: 6 Data size: 1142 Basic stats: 
COMPLETE Column stats: COMPLETE
-                      File Output Operator
-                        compressed: false
-                        File Sink Vectorization:
-                            className: VectorFileSinkOperator
-                            native: 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
+                        Select Vectorization:
+                            className: VectorSelectOperator
+                            native: true
                         Statistics: Num rows: 6 Data size: 1142 Basic stats: 
COMPLETE Column stats: COMPLETE
-                        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
+                          File Sink Vectorization:
+                              className: VectorFileSinkOperator
+                              native: false
+                          Statistics: Num rows: 6 Data size: 1142 Basic stats: 
COMPLETE Column stats: COMPLETE
+                          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
             Execution mode: vectorized, llap
             LLAP IO: no inputs
             Map Vectorization:
@@ -699,17 +715,18 @@ STAGE PLANS:
                   TableScan Vectorization:
                       native: true
                   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
                     Select Vectorization:
                         className: VectorSelectOperator
                         native: true
-                    Statistics: Num rows: 6 Data size: 572 Basic stats: 
COMPLETE Column stats: COMPLETE
+                        selectExpressions: LongColumnBetween(col 0:int, left 
100, right 102) -> 4:boolean
+                    Statistics: Num rows: 6 Data size: 596 Basic stats: 
COMPLETE Column stats: COMPLETE
                     Map Join Operator
                       condition map:
                            Left Outer Join 0 to 1
                       filter predicates:
-                        0 {_col0 BETWEEN 100 AND 102}
+                        0 {_col3}
                         1 
                       keys:
                         0 
@@ -719,20 +736,27 @@ STAGE PLANS:
                           native: false
                           nativeConditionsMet: 
hive.mapjoin.optimized.hashtable IS true, 
hive.vectorized.execution.mapjoin.native.enabled IS true, hive.execution.engine 
tez IN [tez, spark] IS true, One MapJoin Condition IS true, No nullsafe IS 
true, Small table vectorizes IS true, Optimized Table and Supports Key Types IS 
true
                           nativeConditionsNotMet: Outer Join has keys IS false
-                      outputColumnNames: _col0, _col1, _col2, _col3, _col4, 
_col5
+                      outputColumnNames: _col0, _col1, _col2, _col4, _col5, 
_col6
                       input vertices:
                         1 Map 2
                       Statistics: Num rows: 24 Data size: 4580 Basic stats: 
COMPLETE Column stats: COMPLETE
-                      File Output Operator
-                        compressed: false
-                        File Sink Vectorization:
-                            className: VectorFileSinkOperator
-                            native: 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
+                        Select Vectorization:
+                            className: VectorSelectOperator
+                            native: true
                         Statistics: Num rows: 24 Data size: 4580 Basic stats: 
COMPLETE Column stats: COMPLETE
-                        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
+                          File Sink Vectorization:
+                              className: VectorFileSinkOperator
+                              native: false
+                          Statistics: Num rows: 24 Data size: 4580 Basic 
stats: COMPLETE Column stats: COMPLETE
+                          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
             Execution mode: vectorized, llap
             LLAP IO: no inputs
             Map Vectorization:
@@ -856,27 +880,31 @@ STAGE PLANS:
                   alias: test1_n14
                   Statistics: Num rows: 6 Data size: 572 Basic stats: COMPLETE 
Column stats: COMPLETE
                   Select Operator
-                    expressions: key (type: int), value (type: int), col_1 
(type: string)
-                    outputColumnNames: _col0, _col1, _col2
-                    Statistics: Num rows: 6 Data size: 572 Basic stats: 
COMPLETE Column stats: COMPLETE
+                    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: 596 Basic stats: 
COMPLETE Column stats: COMPLETE
                     Map Join Operator
                       condition map:
                            Left Outer Join 0 to 1
                       keys:
                         0 
                         1 
-                      outputColumnNames: _col0, _col1, _col2, _col3, _col4, 
_col5
+                      outputColumnNames: _col0, _col1, _col2, _col3, _col4, 
_col5, _col6
                       input vertices:
                         1 Map 2
-                      residual filter predicates: {((_col1 = _col4) or _col0 
BETWEEN 100 AND 102 or _col3 BETWEEN 100 AND 102)}
-                      Statistics: Num rows: 24 Data size: 4580 Basic stats: 
COMPLETE Column stats: COMPLETE
-                      File Output Operator
-                        compressed: false
+                      residual filter predicates: {((_col1 = _col5) or _col3 
or _col4 BETWEEN 100 AND 102)}
+                      Statistics: Num rows: 24 Data size: 4676 Basic stats: 
COMPLETE Column stats: COMPLETE
+                      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: 4580 Basic stats: 
COMPLETE Column stats: COMPLETE
-                        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: 4580 Basic 
stats: COMPLETE Column stats: COMPLETE
+                          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
             Execution mode: llap
             LLAP IO: no inputs
             Map Vectorization:
@@ -1000,27 +1028,31 @@ STAGE PLANS:
                   alias: test1_n14
                   Statistics: Num rows: 6 Data size: 572 Basic stats: COMPLETE 
Column stats: COMPLETE
                   Select Operator
-                    expressions: key (type: int), value (type: int), col_1 
(type: string)
-                    outputColumnNames: _col0, _col1, _col2
-                    Statistics: Num rows: 6 Data size: 572 Basic stats: 
COMPLETE Column stats: COMPLETE
+                    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: 596 Basic stats: 
COMPLETE Column stats: COMPLETE
                     Map Join Operator
                       condition map:
                            Left Outer Join 0 to 1
                       keys:
                         0 
                         1 
-                      outputColumnNames: _col0, _col1, _col2, _col3, _col4, 
_col5
+                      outputColumnNames: _col0, _col1, _col2, _col3, _col4, 
_col5, _col6
                       input vertices:
                         1 Map 2
-                      residual filter predicates: {((_col1 = _col4) or _col0 
BETWEEN 100 AND 102)}
-                      Statistics: Num rows: 24 Data size: 4580 Basic stats: 
COMPLETE Column stats: COMPLETE
-                      File Output Operator
-                        compressed: false
+                      residual filter predicates: {((_col1 = _col5) or _col3)}
+                      Statistics: Num rows: 24 Data size: 4676 Basic stats: 
COMPLETE Column stats: COMPLETE
+                      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: 4580 Basic stats: 
COMPLETE Column stats: COMPLETE
-                        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: 4580 Basic 
stats: COMPLETE Column stats: COMPLETE
+                          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
             Execution mode: llap
             LLAP IO: no inputs
             Map Vectorization:
@@ -1280,27 +1312,31 @@ STAGE PLANS:
                   alias: test1_n14
                   Statistics: Num rows: 6 Data size: 572 Basic stats: COMPLETE 
Column stats: COMPLETE
                   Select Operator
-                    expressions: key (type: int), value (type: int), col_1 
(type: string)
-                    outputColumnNames: _col0, _col1, _col2
-                    Statistics: Num rows: 6 Data size: 572 Basic stats: 
COMPLETE Column stats: COMPLETE
+                    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: 596 Basic stats: 
COMPLETE Column stats: COMPLETE
                     Map Join Operator
                       condition map:
                            Left Outer Join 0 to 1
                       keys:
                         0 _col1 (type: int)
                         1 _col1 (type: int)
-                      outputColumnNames: _col0, _col1, _col2, _col3, _col4, 
_col5
+                      outputColumnNames: _col0, _col1, _col2, _col3, _col4, 
_col5, _col6
                       input vertices:
                         1 Map 2
-                      residual filter predicates: {(_col0 BETWEEN 100 AND 102 
or _col3 BETWEEN 100 AND 102)}
-                      Statistics: Num rows: 11 Data size: 1903 Basic stats: 
COMPLETE Column stats: COMPLETE
-                      File Output Operator
-                        compressed: false
+                      residual filter predicates: {(_col3 or _col4 BETWEEN 100 
AND 102)}
+                      Statistics: Num rows: 11 Data size: 1947 Basic stats: 
COMPLETE Column stats: COMPLETE
+                      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: 11 Data size: 1903 Basic stats: 
COMPLETE Column stats: COMPLETE
-                        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: 11 Data size: 1903 Basic 
stats: COMPLETE Column stats: COMPLETE
+                          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
             Execution mode: llap
             LLAP IO: no inputs
             Map Vectorization:
@@ -1454,27 +1490,31 @@ STAGE PLANS:
                   alias: test2_n9
                   Statistics: Num rows: 4 Data size: 380 Basic stats: COMPLETE 
Column stats: COMPLETE
                   Select Operator
-                    expressions: key (type: int), value (type: int), col_2 
(type: string)
-                    outputColumnNames: _col0, _col1, _col2
-                    Statistics: Num rows: 4 Data size: 380 Basic stats: 
COMPLETE Column stats: COMPLETE
+                    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: 396 Basic stats: 
COMPLETE Column stats: COMPLETE
                     Map Join Operator
                       condition map:
                            Right Outer Join 0 to 1
                       keys:
                         0 
                         1 
-                      outputColumnNames: _col0, _col1, _col2, _col3, _col4, 
_col5
+                      outputColumnNames: _col0, _col1, _col2, _col3, _col4, 
_col5, _col6
                       input vertices:
                         0 Map 1
-                      residual filter predicates: {((_col1 = _col4) or _col0 
BETWEEN 100 AND 102 or _col3 BETWEEN 100 AND 102)}
-                      Statistics: Num rows: 24 Data size: 4580 Basic stats: 
COMPLETE Column stats: COMPLETE
-                      File Output Operator
-                        compressed: false
+                      residual filter predicates: {((_col1 = _col4) or _col0 
BETWEEN 100 AND 102 or _col6)}
+                      Statistics: Num rows: 24 Data size: 4676 Basic stats: 
COMPLETE Column stats: COMPLETE
+                      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: 4580 Basic stats: 
COMPLETE Column stats: COMPLETE
-                        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: 4580 Basic 
stats: COMPLETE Column stats: COMPLETE
+                          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
             Execution mode: llap
             LLAP IO: no inputs
             Map Vectorization:
@@ -1737,27 +1777,31 @@ STAGE PLANS:
                   alias: test2_n9
                   Statistics: Num rows: 4 Data size: 380 Basic stats: COMPLETE 
Column stats: COMPLETE
                   Select Operator
-                    expressions: key (type: int), value (type: int), col_2 
(type: string)
-                    outputColumnNames: _col0, _col1, _col2
-                    Statistics: Num rows: 4 Data size: 380 Basic stats: 
COMPLETE Column stats: COMPLETE
+                    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: 396 Basic stats: 
COMPLETE Column stats: COMPLETE
                     Map Join Operator
                       condition map:
                            Right Outer Join 0 to 1
                       keys:
                         0 
                         1 
-                      outputColumnNames: _col0, _col1, _col2, _col3, _col4, 
_col5
+                      outputColumnNames: _col0, _col1, _col2, _col3, _col4, 
_col5, _col6
                       input vertices:
                         0 Map 1
-                      residual filter predicates: {((_col1 = _col4) or _col3 
BETWEEN 100 AND 102)}
-                      Statistics: Num rows: 24 Data size: 4580 Basic stats: 
COMPLETE Column stats: COMPLETE
-                      File Output Operator
-                        compressed: false
+                      residual filter predicates: {((_col1 = _col4) or _col6)}
+                      Statistics: Num rows: 24 Data size: 4676 Basic stats: 
COMPLETE Column stats: COMPLETE
+                      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: 4580 Basic stats: 
COMPLETE Column stats: COMPLETE
-                        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: 4580 Basic 
stats: COMPLETE Column stats: COMPLETE
+                          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
             Execution mode: llap
             LLAP IO: no inputs
             Map Vectorization:
@@ -1879,27 +1923,31 @@ STAGE PLANS:
                   alias: test2_n9
                   Statistics: Num rows: 4 Data size: 380 Basic stats: COMPLETE 
Column stats: COMPLETE
                   Select Operator
-                    expressions: key (type: int), value (type: int), col_2 
(type: string)
-                    outputColumnNames: _col0, _col1, _col2
-                    Statistics: Num rows: 4 Data size: 380 Basic stats: 
COMPLETE Column stats: COMPLETE
+                    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: 396 Basic stats: 
COMPLETE Column stats: COMPLETE
                     Map Join Operator
                       condition map:
                            Right Outer Join 0 to 1
                       keys:
                         0 _col1 (type: int)
                         1 _col1 (type: int)
-                      outputColumnNames: _col0, _col1, _col2, _col3, _col4, 
_col5
+                      outputColumnNames: _col0, _col1, _col2, _col3, _col4, 
_col5, _col6
                       input vertices:
                         0 Map 1
-                      residual filter predicates: {(_col0 BETWEEN 100 AND 102 
or _col3 BETWEEN 100 AND 102)}
-                      Statistics: Num rows: 10 Data size: 1810 Basic stats: 
COMPLETE Column stats: COMPLETE
-                      File Output Operator
-                        compressed: false
+                      residual filter predicates: {(_col0 BETWEEN 100 AND 102 
or _col6)}
+                      Statistics: Num rows: 10 Data size: 1850 Basic stats: 
COMPLETE Column stats: COMPLETE
+                      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: 10 Data size: 1810 Basic stats: 
COMPLETE Column stats: COMPLETE
-                        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: 1810 Basic 
stats: COMPLETE Column stats: COMPLETE
+                          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
             Execution mode: llap
             LLAP IO: no inputs
             Map Vectorization:

http://git-wip-us.apache.org/repos/asf/hive/blob/55887646/ql/src/test/results/clientpositive/llap/vectorized_multi_output_select.q.out
----------------------------------------------------------------------
diff --git 
a/ql/src/test/results/clientpositive/llap/vectorized_multi_output_select.q.out 
b/ql/src/test/results/clientpositive/llap/vectorized_multi_output_select.q.out
index 076e00f..d797e01 100644
--- 
a/ql/src/test/results/clientpositive/llap/vectorized_multi_output_select.q.out
+++ 
b/ql/src/test/results/clientpositive/llap/vectorized_multi_output_select.q.out
@@ -106,12 +106,12 @@ STAGE PLANS:
                     Select Operator
                       expressions: key (type: string)
                       outputColumnNames: _col0
-                      Statistics: Num rows: 1 Data size: 177 Basic stats: 
COMPLETE Column stats: COMPLETE
+                      Statistics: Num rows: 1 Data size: 86 Basic stats: 
COMPLETE Column stats: COMPLETE
                       Reduce Output Operator
                         key expressions: _col0 (type: string)
                         sort order: +
                         Map-reduce partition columns: _col0 (type: string)
-                        Statistics: Num rows: 1 Data size: 177 Basic stats: 
COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 1 Data size: 86 Basic stats: 
COMPLETE Column stats: COMPLETE
             Execution mode: vectorized, llap
             LLAP IO: no inputs
         Map 5 
@@ -126,12 +126,12 @@ STAGE PLANS:
                     Select Operator
                       expressions: key (type: string)
                       outputColumnNames: _col0
-                      Statistics: Num rows: 1 Data size: 177 Basic stats: 
COMPLETE Column stats: COMPLETE
+                      Statistics: Num rows: 1 Data size: 86 Basic stats: 
COMPLETE Column stats: COMPLETE
                       Reduce Output Operator
                         key expressions: _col0 (type: string)
                         sort order: +
                         Map-reduce partition columns: _col0 (type: string)
-                        Statistics: Num rows: 1 Data size: 177 Basic stats: 
COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 1 Data size: 86 Basic stats: 
COMPLETE Column stats: COMPLETE
             Execution mode: vectorized, llap
             LLAP IO: no inputs
         Reducer 2 

http://git-wip-us.apache.org/repos/asf/hive/blob/55887646/ql/src/test/results/clientpositive/louter_join_ppr.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/louter_join_ppr.q.out 
b/ql/src/test/results/clientpositive/louter_join_ppr.q.out
index 8dcb3fe..de0fea6 100644
--- a/ql/src/test/results/clientpositive/louter_join_ppr.q.out
+++ b/ql/src/test/results/clientpositive/louter_join_ppr.q.out
@@ -26,11 +26,11 @@ POSTHOOK: Input: default@srcpart
 POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=11
 POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=12
 #### A masked pattern was here ####
-OPTIMIZED SQL: SELECT `t0`.`key`, `t0`.`value`, `t2`.`key` AS `key1`, 
`t2`.`value` AS `value1`
+OPTIMIZED SQL: SELECT *
 FROM (SELECT `key`, `value`
 FROM `default`.`src`
 WHERE `key` < 20 AND `key` > 15) AS `t0`
-INNER JOIN (SELECT `key`, `value`, CAST('2008-04-08' AS STRING) AS `ds`
+INNER JOIN (SELECT `key`, `value`
 FROM `default`.`srcpart`
 WHERE `ds` = '2008-04-08' AND `key` > 15 AND `key` < 20) AS `t2` ON `t0`.`key` 
= `t2`.`key`
 STAGE DEPENDENCIES:
@@ -343,8 +343,8 @@ POSTHOOK: Input: default@srcpart
 POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=11
 POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=12
 #### A masked pattern was here ####
-OPTIMIZED SQL: SELECT `t0`.`key`, `t0`.`value`, `t2`.`key` AS `key1`, 
`t2`.`value` AS `value1`
-FROM (SELECT `key`, `value`, CAST('2008-04-08' AS STRING) AS `ds`
+OPTIMIZED SQL: SELECT *
+FROM (SELECT `key`, `value`
 FROM `default`.`srcpart`
 WHERE `key` < 20 AND `ds` = '2008-04-08' AND `key` > 15) AS `t0`
 INNER JOIN (SELECT `key`, `value`
@@ -563,34 +563,30 @@ STAGE PLANS:
           keys:
             0 _col0 (type: string)
             1 _col0 (type: string)
-          outputColumnNames: _col0, _col1, _col3, _col4
+          outputColumnNames: _col0, _col1, _col2, _col3
           Statistics: Num rows: 122 Data size: 1296 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
+          File Output Operator
+            compressed: false
+            GlobalTableId: 0
+#### A masked pattern was here ####
+            NumFilesPerFileSink: 1
             Statistics: Num rows: 122 Data size: 1296 Basic stats: COMPLETE 
Column stats: NONE
-            File Output Operator
-              compressed: false
-              GlobalTableId: 0
-#### A masked pattern was here ####
-              NumFilesPerFileSink: 1
-              Statistics: Num rows: 122 Data size: 1296 Basic stats: COMPLETE 
Column stats: NONE
-#### A masked pattern was here ####
-              table:
-                  input format: 
org.apache.hadoop.mapred.SequenceFileInputFormat
-                  output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-                  properties:
-                    columns _col0,_col1,_col2,_col3
-                    columns.types string:string:string:string
-                    escape.delim \
-                    hive.serialization.extend.additional.nesting.levels true
-                    serialization.escape.crlf true
-                    serialization.format 1
-                    serialization.lib 
org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-                  serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-              TotalFiles: 1
-              GatherStats: false
-              MultiFileSpray: false
+#### A masked pattern was here ####
+            table:
+                input format: org.apache.hadoop.mapred.SequenceFileInputFormat
+                output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                properties:
+                  columns _col0,_col1,_col2,_col3
+                  columns.types string:string:string:string
+                  escape.delim \
+                  hive.serialization.extend.additional.nesting.levels true
+                  serialization.escape.crlf true
+                  serialization.format 1
+                  serialization.lib 
org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+            TotalFiles: 1
+            GatherStats: false
+            MultiFileSpray: false
 
   Stage: Stage-0
     Fetch Operator
@@ -664,11 +660,11 @@ POSTHOOK: Input: default@srcpart
 POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=11
 POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=12
 #### A masked pattern was here ####
-OPTIMIZED SQL: SELECT `t0`.`key`, `t0`.`value`, `t2`.`key` AS `key1`, 
`t2`.`value` AS `value1`
+OPTIMIZED SQL: SELECT *
 FROM (SELECT `key`, `value`
 FROM `default`.`src`
 WHERE `key` < 20 AND `key` > 15) AS `t0`
-INNER JOIN (SELECT `key`, `value`, CAST('2008-04-08' AS STRING) AS `ds`
+INNER JOIN (SELECT `key`, `value`
 FROM `default`.`srcpart`
 WHERE `key` > 15 AND `ds` = '2008-04-08' AND `key` < 20) AS `t2` ON `t0`.`key` 
= `t2`.`key`
 STAGE DEPENDENCIES:
@@ -981,8 +977,8 @@ POSTHOOK: Input: default@srcpart
 POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=11
 POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=12
 #### A masked pattern was here ####
-OPTIMIZED SQL: SELECT `t0`.`key`, `t0`.`value`, `t2`.`key` AS `key1`, 
`t2`.`value` AS `value1`
-FROM (SELECT `key`, `value`, CAST('2008-04-08' AS STRING) AS `ds`
+OPTIMIZED SQL: SELECT *
+FROM (SELECT `key`, `value`
 FROM `default`.`srcpart`
 WHERE `key` < 20 AND `ds` = '2008-04-08' AND `key` > 15) AS `t0`
 INNER JOIN (SELECT `key`, `value`
@@ -1201,34 +1197,30 @@ STAGE PLANS:
           keys:
             0 _col0 (type: string)
             1 _col0 (type: string)
-          outputColumnNames: _col0, _col1, _col3, _col4
+          outputColumnNames: _col0, _col1, _col2, _col3
           Statistics: Num rows: 122 Data size: 1296 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
+          File Output Operator
+            compressed: false
+            GlobalTableId: 0
+#### A masked pattern was here ####
+            NumFilesPerFileSink: 1
             Statistics: Num rows: 122 Data size: 1296 Basic stats: COMPLETE 
Column stats: NONE
-            File Output Operator
-              compressed: false
-              GlobalTableId: 0
-#### A masked pattern was here ####
-              NumFilesPerFileSink: 1
-              Statistics: Num rows: 122 Data size: 1296 Basic stats: COMPLETE 
Column stats: NONE
-#### A masked pattern was here ####
-              table:
-                  input format: 
org.apache.hadoop.mapred.SequenceFileInputFormat
-                  output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-                  properties:
-                    columns _col0,_col1,_col2,_col3
-                    columns.types string:string:string:string
-                    escape.delim \
-                    hive.serialization.extend.additional.nesting.levels true
-                    serialization.escape.crlf true
-                    serialization.format 1
-                    serialization.lib 
org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-                  serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-              TotalFiles: 1
-              GatherStats: false
-              MultiFileSpray: false
+#### A masked pattern was here ####
+            table:
+                input format: org.apache.hadoop.mapred.SequenceFileInputFormat
+                output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                properties:
+                  columns _col0,_col1,_col2,_col3
+                  columns.types string:string:string:string
+                  escape.delim \
+                  hive.serialization.extend.additional.nesting.levels true
+                  serialization.escape.crlf true
+                  serialization.format 1
+                  serialization.lib 
org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+            TotalFiles: 1
+            GatherStats: false
+            MultiFileSpray: false
 
   Stage: Stage-0
     Fetch Operator

http://git-wip-us.apache.org/repos/asf/hive/blob/55887646/ql/src/test/results/clientpositive/mapjoin1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/mapjoin1.q.out 
b/ql/src/test/results/clientpositive/mapjoin1.q.out
index dcbef2a..f194bef 100644
--- a/ql/src/test/results/clientpositive/mapjoin1.q.out
+++ b/ql/src/test/results/clientpositive/mapjoin1.q.out
@@ -146,7 +146,7 @@ STAGE PLANS:
               HashTable Sink Operator
                 filter predicates:
                   0 
-                  1 {((UDFToDouble(_col0) * 10.0D) < 1000.0D)}
+                  1 {_col2}
                 keys:
                   0 _col0 (type: string)
                   1 _col0 (type: string)
@@ -158,15 +158,15 @@ STAGE PLANS:
             alias: b
             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) * 10.0D) < 1000.0D) (type: boolean)
+              outputColumnNames: _col0, _col1, _col2
               Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
               Map Join Operator
                 condition map:
                      Right Outer Join 0 to 1
                 filter predicates:
                   0 
-                  1 {((UDFToDouble(_col0) * 10.0D) < 1000.0D)}
+                  1 {_col2}
                 keys:
                   0 _col0 (type: string)
                   1 _col0 (type: string)
@@ -245,7 +245,7 @@ STAGE PLANS:
               HashTable Sink Operator
                 filter predicates:
                   0 
-                  1 {(UDFToDouble(_col1.key) > 200.0D)}
+                  1 {_col2}
                 keys:
                   0 _col0 (type: string)
                   1 _col0 (type: string)
@@ -257,15 +257,15 @@ STAGE PLANS:
             alias: src
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
             Select Operator
-              expressions: key (type: string), 
named_struct('key',key,'value',value) (type: struct<key:string,value:string>)
-              outputColumnNames: _col0, _col1
+              expressions: key (type: string), 
named_struct('key',key,'value',value) (type: struct<key:string,value:string>), 
(UDFToDouble(named_struct('key',key,'value',value).key) > 200.0D) (type: 
boolean)
+              outputColumnNames: _col0, _col1, _col2
               Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
               Map Join Operator
                 condition map:
                      Right Outer Join 0 to 1
                 filter predicates:
                   0 
-                  1 {(UDFToDouble(_col1.key) > 200.0D)}
+                  1 {_col2}
                 keys:
                   0 _col0 (type: string)
                   1 _col0 (type: string)
@@ -435,7 +435,7 @@ STAGE PLANS:
               HashTable Sink Operator
                 filter predicates:
                   0 
-                  1 {((UDFToDouble(_col0) * 10.0D) < 1000.0D)}
+                  1 {_col2}
                 keys:
                   0 _col0 (type: string)
                   1 _col0 (type: string)
@@ -447,15 +447,15 @@ STAGE PLANS:
             alias: b
             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) * 10.0D) < 1000.0D) (type: boolean)
+              outputColumnNames: _col0, _col1, _col2
               Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
               Map Join Operator
                 condition map:
                      Right Outer Join 0 to 1
                 filter predicates:
                   0 
-                  1 {((UDFToDouble(_col0) * 10.0D) < 1000.0D)}
+                  1 {_col2}
                 keys:
                   0 _col0 (type: string)
                   1 _col0 (type: string)
@@ -534,7 +534,7 @@ STAGE PLANS:
               HashTable Sink Operator
                 filter predicates:
                   0 
-                  1 {(UDFToDouble(_col1.key) > 200.0D)}
+                  1 {_col2}
                 keys:
                   0 _col0 (type: string)
                   1 _col0 (type: string)
@@ -546,15 +546,15 @@ STAGE PLANS:
             alias: src
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
             Select Operator
-              expressions: key (type: string), 
named_struct('key',key,'value',value) (type: struct<key:string,value:string>)
-              outputColumnNames: _col0, _col1
+              expressions: key (type: string), 
named_struct('key',key,'value',value) (type: struct<key:string,value:string>), 
(UDFToDouble(named_struct('key',key,'value',value).key) > 200.0D) (type: 
boolean)
+              outputColumnNames: _col0, _col1, _col2
               Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
               Map Join Operator
                 condition map:
                      Right Outer Join 0 to 1
                 filter predicates:
                   0 
-                  1 {(UDFToDouble(_col1.key) > 200.0D)}
+                  1 {_col2}
                 keys:
                   0 _col0 (type: string)
                   1 _col0 (type: string)

http://git-wip-us.apache.org/repos/asf/hive/blob/55887646/ql/src/test/results/clientpositive/mapjoin46.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/mapjoin46.q.out 
b/ql/src/test/results/clientpositive/mapjoin46.q.out
index bbdeaef..afc554c 100644
--- a/ql/src/test/results/clientpositive/mapjoin46.q.out
+++ b/ql/src/test/results/clientpositive/mapjoin46.q.out
@@ -185,7 +185,7 @@ STAGE PLANS:
                 Statistics: Num rows: 4 Data size: 38 Basic stats: COMPLETE 
Column stats: NONE
                 HashTable Sink Operator
                   filter predicates:
-                    0 {_col0 BETWEEN 100 AND 102}
+                    0 {_col3}
                     1 
                   keys:
                     0 _col1 (type: int)
@@ -198,27 +198,31 @@ STAGE PLANS:
             alias: test1_n4
             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
               Map Join Operator
                 condition map:
                      Left Outer Join 0 to 1
                 filter predicates:
-                  0 {_col0 BETWEEN 100 AND 102}
+                  0 {_col3}
                   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
       Local Work:
         Map Reduce Local Work
 
@@ -298,7 +302,7 @@ STAGE PLANS:
                 Statistics: Num rows: 4 Data size: 38 Basic stats: COMPLETE 
Column stats: NONE
                 HashTable Sink Operator
                   filter predicates:
-                    0 {_col0 BETWEEN 100 AND 102}
+                    0 {_col3}
                     1 
                   keys:
                     0 
@@ -311,27 +315,31 @@ STAGE PLANS:
             alias: test1_n4
             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
               Map Join Operator
                 condition map:
                      Left Outer Join 0 to 1
                 filter predicates:
-                  0 {_col0 BETWEEN 100 AND 102}
+                  0 {_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
       Local Work:
         Map Reduce Local Work
 
@@ -500,7 +508,7 @@ STAGE PLANS:
               Statistics: Num rows: 4 Data size: 38 Basic stats: COMPLETE 
Column stats: NONE
               HashTable Sink Operator
                 filter predicates:
-                  0 {_col0 BETWEEN 100 AND 102}
+                  0 {_col3}
                   1 
                 keys:
                   0 
@@ -513,27 +521,31 @@ STAGE PLANS:
             alias: test1_n4
             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
               Map Join Operator
                 condition map:
                      Left Outer Join 0 to 1
                 filter predicates:
-                  0 {_col0 BETWEEN 100 AND 102}
+                  0 {_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
       Local Work:
         Map Reduce Local Work
 
@@ -624,8 +636,8 @@ STAGE PLANS:
             alias: test1_n4
             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
               Map Join Operator
                 condition map:
@@ -633,16 +645,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
       Local Work:
         Map Reduce Local Work
 
@@ -736,8 +752,8 @@ STAGE PLANS:
             alias: test1_n4
             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
               Map Join Operator
                 condition map:
@@ -745,16 +761,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
       Local Work:
         Map Reduce Local Work
 
@@ -952,8 +972,8 @@ STAGE PLANS:
             alias: test1_n4
             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
               Map Join Operator
                 condition map:
@@ -961,16 +981,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
       Local Work:
         Map Reduce Local Work
 
@@ -1059,8 +1083,8 @@ STAGE PLANS:
             alias: test2_n2
             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
               Map Join Operator
                 condition map:
@@ -1068,16 +1092,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
       Local Work:
         Map Reduce Local Work
 
@@ -1278,8 +1306,8 @@ STAGE PLANS:
             alias: test2_n2
             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
               Map Join Operator
                 condition map:
@@ -1287,16 +1315,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
       Local Work:
         Map Reduce Local Work
 
@@ -1386,8 +1418,8 @@ STAGE PLANS:
             alias: test2_n2
             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
               Map Join Operator
                 condition map:
@@ -1395,16 +1427,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
       Local Work:
         Map Reduce Local Work
 
@@ -2267,7 +2303,7 @@ POSTHOOK: Input: default@test2_n2
 NULL   NULL    NULL    104     3       Fli
 NULL   NULL    NULL    105     NULL    None
 NULL   NULL    None    NULL    NULL    NULL
-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 (
@@ -2323,14 +2359,14 @@ STAGE PLANS:
   Stage: Stage-8
     Map Reduce Local Work
       Alias -> Map Local Tables:
-        $hdt$_0:test1_n4 
+        $hdt$_0:$hdt$_0:test1_n4 
           Fetch Operator
             limit: -1
-        $hdt$_2:$hdt$_3:test2_n2 
+        $hdt$_1:$hdt$_2:test2_n2 
           Fetch Operator
             limit: -1
       Alias -> Map Local Operator Tree:
-        $hdt$_0:test1_n4 
+        $hdt$_0:$hdt$_0:test1_n4 
           TableScan
             alias: test1_n4
             Statistics: Num rows: 6 Data size: 56 Basic stats: COMPLETE Column 
stats: NONE
@@ -2342,7 +2378,7 @@ STAGE PLANS:
                 keys:
                   0 _col1 (type: int)
                   1 _col1 (type: int)
-        $hdt$_2:$hdt$_3:test2_n2 
+        $hdt$_1:$hdt$_2:test2_n2 
           TableScan
             alias: test2_n2
             Statistics: Num rows: 4 Data size: 38 Basic stats: COMPLETE Column 
stats: NONE
@@ -2362,8 +2398,8 @@ STAGE PLANS:
             alias: test2_n2
             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
               Map Join Operator
                 condition map:
@@ -2371,19 +2407,23 @@ 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
-                Reduce Output Operator
-                  sort order: 
+                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
-                  value expressions: _col0 (type: int), _col1 (type: int), 
_col2 (type: string), _col3 (type: int), _col4 (type: int), _col5 (type: string)
+                  Reduce Output Operator
+                    sort order: 
+                    Statistics: Num rows: 6 Data size: 61 Basic stats: 
COMPLETE Column stats: NONE
+                    value expressions: _col0 (type: int), _col1 (type: int), 
_col2 (type: string), _col3 (type: int), _col4 (type: int), _col5 (type: string)
           TableScan
             alias: test1_n4
             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
               Map Join Operator
                 condition map:
@@ -2391,13 +2431,17 @@ 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
-                Reduce Output Operator
-                  sort order: 
+                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
-                  value expressions: _col0 (type: int), _col1 (type: int), 
_col2 (type: string), _col3 (type: int), _col4 (type: int), _col5 (type: string)
+                  Reduce Output Operator
+                    sort order: 
+                    Statistics: Num rows: 6 Data size: 61 Basic stats: 
COMPLETE Column stats: NONE
+                    value expressions: _col0 (type: int), _col1 (type: int), 
_col2 (type: string), _col3 (type: int), _col4 (type: int), _col5 (type: string)
       Local Work:
         Map Reduce Local Work
       Reduce Operator Tree:
@@ -2424,7 +2468,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_n4.key AS key1, test1_n4.value AS value1, test1_n4.col_1 AS 
col_1,
@@ -2489,7 +2533,7 @@ NULL      NULL    NULL    105     NULL    None    98      
NULL    None    NULL    NULL    NULL
 NULL   NULL    NULL    105     NULL    None    99      0       Alice   NULL    
NULL    NULL
 NULL   NULL    NULL    105     NULL    None    99      2       Mat     102     
2       Del
 NULL   NULL    NULL    105     NULL    None    NULL    NULL    None    NULL    
NULL    NULL
-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 (
@@ -2545,14 +2589,14 @@ STAGE PLANS:
   Stage: Stage-8
     Map Reduce Local Work
       Alias -> Map Local Tables:
-        $hdt$_0:test1_n4 
+        $hdt$_0:$hdt$_0:test1_n4 
           Fetch Operator
             limit: -1
-        $hdt$_2:$hdt$_3:test2_n2 
+        $hdt$_1:$hdt$_2:test2_n2 
           Fetch Operator
             limit: -1
       Alias -> Map Local Operator Tree:
-        $hdt$_0:test1_n4 
+        $hdt$_0:$hdt$_0:test1_n4 
           TableScan
             alias: test1_n4
             Statistics: Num rows: 6 Data size: 56 Basic stats: COMPLETE Column 
stats: NONE
@@ -2564,7 +2608,7 @@ STAGE PLANS:
                 keys:
                   0 _col1 (type: int)
                   1 _col1 (type: int)
-        $hdt$_2:$hdt$_3:test2_n2 
+        $hdt$_1:$hdt$_2:test2_n2 
           TableScan
             alias: test2_n2
             Statistics: Num rows: 4 Data size: 38 Basic stats: COMPLETE Column 
stats: NONE
@@ -2584,8 +2628,8 @@ STAGE PLANS:
             alias: test2_n2
             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
               Map Join Operator
                 condition map:
@@ -2593,19 +2637,23 @@ 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
-                Reduce Output Operator
-                  sort order: 
+                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
-                  value expressions: _col0 (type: int), _col1 (type: int), 
_col2 (type: string), _col3 (type: int), _col4 (type: int), _col5 (type: string)
+                  Reduce Output Operator
+                    sort order: 
+                    Statistics: Num rows: 6 Data size: 61 Basic stats: 
COMPLETE Column stats: NONE
+                    value expressions: _col0 (type: int), _col1 (type: int), 
_col2 (type: string), _col3 (type: int), _col4 (type: int), _col5 (type: string)
           TableScan
             alias: test1_n4
             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
               Map Join Operator
                 condition map:
@@ -2613,13 +2661,17 @@ 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
-                Reduce Output Operator
-                  sort order: 
+                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
-                  value expressions: _col0 (type: int), _col1 (type: int), 
_col2 (type: string), _col3 (type: int), _col4 (type: int), _col5 (type: string)
+                  Reduce Output Operator
+                    sort order: 
+                    Statistics: Num rows: 6 Data size: 61 Basic stats: 
COMPLETE Column stats: NONE
+                    value expressions: _col0 (type: int), _col1 (type: int), 
_col2 (type: string), _col3 (type: int), _col4 (type: int), _col5 (type: string)
       Local Work:
         Map Reduce Local Work
       Reduce Operator Tree:
@@ -2646,7 +2698,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_n4.key AS key1, test1_n4.value AS value1, test1_n4.col_1 AS 
col_1,

Reply via email to