http://git-wip-us.apache.org/repos/asf/hive/blob/55887646/ql/src/test/results/clientpositive/llap/partition_shared_scan.q.out
----------------------------------------------------------------------
diff --git 
a/ql/src/test/results/clientpositive/llap/partition_shared_scan.q.out 
b/ql/src/test/results/clientpositive/llap/partition_shared_scan.q.out
index ba9e81d..f84d13f 100644
--- a/ql/src/test/results/clientpositive/llap/partition_shared_scan.q.out
+++ b/ql/src/test/results/clientpositive/llap/partition_shared_scan.q.out
@@ -98,12 +98,12 @@ STAGE PLANS:
                     Select Operator
                       expressions: i (type: int)
                       outputColumnNames: _col0
-                      Statistics: Num rows: 10 Data size: 940 Basic stats: 
COMPLETE Column stats: COMPLETE
+                      Statistics: Num rows: 10 Data size: 40 Basic stats: 
COMPLETE Column stats: COMPLETE
                       Reduce Output Operator
                         key expressions: _col0 (type: int)
                         sort order: +
                         Map-reduce partition columns: _col0 (type: int)
-                        Statistics: Num rows: 10 Data size: 940 Basic stats: 
COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 10 Data size: 40 Basic stats: 
COMPLETE Column stats: COMPLETE
             Execution mode: vectorized, llap
             LLAP IO: no inputs
         Map 5 
@@ -118,12 +118,12 @@ STAGE PLANS:
                     Select Operator
                       expressions: i (type: int)
                       outputColumnNames: _col0
-                      Statistics: Num rows: 10 Data size: 910 Basic stats: 
COMPLETE Column stats: COMPLETE
+                      Statistics: Num rows: 10 Data size: 40 Basic stats: 
COMPLETE Column stats: COMPLETE
                       Reduce Output Operator
                         key expressions: _col0 (type: int)
                         sort order: +
                         Map-reduce partition columns: _col0 (type: int)
-                        Statistics: Num rows: 10 Data size: 910 Basic stats: 
COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 10 Data size: 40 Basic stats: 
COMPLETE Column stats: COMPLETE
             Execution mode: vectorized, llap
             LLAP IO: no inputs
         Reducer 2 
@@ -152,10 +152,10 @@ STAGE PLANS:
                 keys:
                   0 _col9 (type: int)
                   1 _col0 (type: int)
-                outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, 
_col6, _col7, _col8, _col9, _col11
+                outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, 
_col6, _col7, _col8, _col9, _col10
                 Statistics: Num rows: 100 Data size: 62700 Basic stats: 
COMPLETE Column stats: COMPLETE
                 Select Operator
-                  expressions: _col9 (type: int), 'foo_n1' (type: string), 
_col0 (type: int), _col1 (type: string), _col2 (type: string), _col3 (type: 
string), _col4 (type: string), _col5 (type: int), _col6 (type: string), _col7 
(type: double), _col8 (type: string), _col11 (type: int), 'bar' (type: string)
+                  expressions: _col9 (type: int), 'foo_n1' (type: string), 
_col0 (type: int), _col1 (type: string), _col2 (type: string), _col3 (type: 
string), _col4 (type: string), _col5 (type: int), _col6 (type: string), _col7 
(type: double), _col8 (type: string), _col10 (type: int), 'bar' (type: string)
                   outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, 
_col6, _col7, _col8, _col9, _col10, _col11, _col12
                   Statistics: Num rows: 100 Data size: 80400 Basic stats: 
COMPLETE Column stats: COMPLETE
                   File Output Operator
@@ -240,17 +240,17 @@ STAGE PLANS:
                     Select Operator
                       expressions: i (type: int)
                       outputColumnNames: _col0
-                      Statistics: Num rows: 10 Data size: 940 Basic stats: 
COMPLETE Column stats: COMPLETE
+                      Statistics: Num rows: 10 Data size: 40 Basic stats: 
COMPLETE Column stats: COMPLETE
                       Reduce Output Operator
                         key expressions: _col0 (type: int)
                         sort order: +
                         Map-reduce partition columns: _col0 (type: int)
-                        Statistics: Num rows: 10 Data size: 940 Basic stats: 
COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 10 Data size: 40 Basic stats: 
COMPLETE Column stats: COMPLETE
                       Reduce Output Operator
                         key expressions: _col0 (type: int)
                         sort order: +
                         Map-reduce partition columns: _col0 (type: int)
-                        Statistics: Num rows: 10 Data size: 940 Basic stats: 
COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 10 Data size: 40 Basic stats: 
COMPLETE Column stats: COMPLETE
             Execution mode: vectorized, llap
             LLAP IO: no inputs
         Reducer 2 
@@ -279,10 +279,10 @@ STAGE PLANS:
                 keys:
                   0 _col9 (type: int)
                   1 _col0 (type: int)
-                outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, 
_col6, _col7, _col8, _col9, _col11
+                outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, 
_col6, _col7, _col8, _col9, _col10
                 Statistics: Num rows: 100 Data size: 62700 Basic stats: 
COMPLETE Column stats: COMPLETE
                 Select Operator
-                  expressions: _col9 (type: int), 'foo_n1' (type: string), 
_col0 (type: int), _col1 (type: string), _col2 (type: string), _col3 (type: 
string), _col4 (type: string), _col5 (type: int), _col6 (type: string), _col7 
(type: double), _col8 (type: string), _col11 (type: int), 'foo_n1' (type: 
string)
+                  expressions: _col9 (type: int), 'foo_n1' (type: string), 
_col0 (type: int), _col1 (type: string), _col2 (type: string), _col3 (type: 
string), _col4 (type: string), _col5 (type: int), _col6 (type: string), _col7 
(type: double), _col8 (type: string), _col10 (type: int), 'foo_n1' (type: 
string)
                   outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, 
_col6, _col7, _col8, _col9, _col10, _col11, _col12
                   Statistics: Num rows: 100 Data size: 80700 Basic stats: 
COMPLETE Column stats: COMPLETE
                   File Output Operator

http://git-wip-us.apache.org/repos/asf/hive/blob/55887646/ql/src/test/results/clientpositive/llap/ppd_union_view.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/ppd_union_view.q.out 
b/ql/src/test/results/clientpositive/llap/ppd_union_view.q.out
index 4c9a224..cba2434 100644
--- a/ql/src/test/results/clientpositive/llap/ppd_union_view.q.out
+++ b/ql/src/test/results/clientpositive/llap/ppd_union_view.q.out
@@ -156,10 +156,10 @@ FROM `default`.`t1_new_n0`
 WHERE `ds` = '2011-10-13'
 UNION ALL
 SELECT `t4`.`key`, `t2`.`value`
-FROM (SELECT `keymap`, `value`, CAST('2011-10-13' AS STRING) AS `ds`
+FROM (SELECT `keymap`, `value`
 FROM `default`.`t1_old`
 WHERE `ds` = '2011-10-13' AND `keymap` IS NOT NULL) AS `t2`
-INNER JOIN (SELECT `key`, `keymap`, CAST('2011-10-13' AS STRING) AS `ds`
+INNER JOIN (SELECT `key`, `keymap`
 FROM `default`.`t1_mapping`
 WHERE '2011-10-13' = `ds` AND `keymap` IS NOT NULL) AS `t4` ON `t2`.`keymap` = 
`t4`.`keymap`) AS `t6`
 STAGE DEPENDENCIES:
@@ -234,13 +234,13 @@ STAGE PLANS:
                     Select Operator
                       expressions: keymap (type: string), value (type: string)
                       outputColumnNames: _col0, _col1
-                      Statistics: Num rows: 1 Data size: 275 Basic stats: 
COMPLETE Column stats: COMPLETE
+                      Statistics: Num rows: 1 Data size: 181 Basic stats: 
COMPLETE Column stats: COMPLETE
                       Reduce Output Operator
                         key expressions: _col0 (type: string)
                         null sort order: a
                         sort order: +
                         Map-reduce partition columns: _col0 (type: string)
-                        Statistics: Num rows: 1 Data size: 275 Basic stats: 
COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 1 Data size: 181 Basic stats: 
COMPLETE Column stats: COMPLETE
                         tag: 0
                         value expressions: _col1 (type: string)
                         auto parallelism: true
@@ -317,13 +317,13 @@ STAGE PLANS:
                     Select Operator
                       expressions: key (type: string), keymap (type: string)
                       outputColumnNames: _col0, _col1
-                      Statistics: Num rows: 1 Data size: 273 Basic stats: 
COMPLETE Column stats: COMPLETE
+                      Statistics: Num rows: 1 Data size: 179 Basic stats: 
COMPLETE Column stats: COMPLETE
                       Reduce Output Operator
                         key expressions: _col1 (type: string)
                         null sort order: a
                         sort order: +
                         Map-reduce partition columns: _col1 (type: string)
-                        Statistics: Num rows: 1 Data size: 273 Basic stats: 
COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 1 Data size: 179 Basic stats: 
COMPLETE Column stats: COMPLETE
                         tag: 1
                         value expressions: _col0 (type: string)
                         auto parallelism: true
@@ -394,11 +394,11 @@ STAGE PLANS:
                 keys:
                   0 _col0 (type: string)
                   1 _col1 (type: string)
-                outputColumnNames: _col1, _col3
+                outputColumnNames: _col1, _col2
                 Position of Big Table: 0
                 Statistics: Num rows: 1 Data size: 178 Basic stats: COMPLETE 
Column stats: COMPLETE
                 Select Operator
-                  expressions: _col3 (type: string), _col1 (type: string)
+                  expressions: _col2 (type: string), _col1 (type: string)
                   outputColumnNames: _col0, _col1
                   Statistics: Num rows: 1 Data size: 178 Basic stats: COMPLETE 
Column stats: COMPLETE
                   Select Operator
@@ -498,10 +498,10 @@ FROM `default`.`t1_new_n0`
 WHERE `ds` = '2011-10-15'
 UNION ALL
 SELECT `t4`.`key`, `t2`.`value`
-FROM (SELECT `keymap`, `value`, CAST('2011-10-15' AS STRING) AS `ds`
+FROM (SELECT `keymap`, `value`
 FROM `default`.`t1_old`
 WHERE `ds` = '2011-10-15' AND `keymap` IS NOT NULL) AS `t2`
-INNER JOIN (SELECT `key`, `keymap`, CAST('2011-10-15' AS STRING) AS `ds`
+INNER JOIN (SELECT `key`, `keymap`
 FROM `default`.`t1_mapping`
 WHERE '2011-10-15' = `ds` AND `keymap` IS NOT NULL) AS `t4` ON `t2`.`keymap` = 
`t4`.`keymap`) AS `t6`
 STAGE DEPENDENCIES:
@@ -627,13 +627,13 @@ STAGE PLANS:
                     Select Operator
                       expressions: keymap (type: string), value (type: string)
                       outputColumnNames: _col0, _col1
-                      Statistics: Num rows: 1 Data size: 462 Basic stats: 
COMPLETE Column stats: PARTIAL
+                      Statistics: Num rows: 1 Data size: 368 Basic stats: 
COMPLETE Column stats: PARTIAL
                       Reduce Output Operator
                         key expressions: _col0 (type: string)
                         null sort order: a
                         sort order: +
                         Map-reduce partition columns: _col0 (type: string)
-                        Statistics: Num rows: 1 Data size: 462 Basic stats: 
COMPLETE Column stats: PARTIAL
+                        Statistics: Num rows: 1 Data size: 368 Basic stats: 
COMPLETE Column stats: PARTIAL
                         tag: 0
                         value expressions: _col1 (type: string)
                         auto parallelism: true
@@ -655,13 +655,13 @@ STAGE PLANS:
                     Select Operator
                       expressions: key (type: string), keymap (type: string)
                       outputColumnNames: _col0, _col1
-                      Statistics: Num rows: 1 Data size: 462 Basic stats: 
COMPLETE Column stats: PARTIAL
+                      Statistics: Num rows: 1 Data size: 368 Basic stats: 
COMPLETE Column stats: PARTIAL
                       Reduce Output Operator
                         key expressions: _col1 (type: string)
                         null sort order: a
                         sort order: +
                         Map-reduce partition columns: _col1 (type: string)
-                        Statistics: Num rows: 1 Data size: 462 Basic stats: 
COMPLETE Column stats: PARTIAL
+                        Statistics: Num rows: 1 Data size: 368 Basic stats: 
COMPLETE Column stats: PARTIAL
                         tag: 1
                         value expressions: _col0 (type: string)
                         auto parallelism: true
@@ -677,11 +677,11 @@ STAGE PLANS:
                 keys:
                   0 _col0 (type: string)
                   1 _col1 (type: string)
-                outputColumnNames: _col1, _col3
+                outputColumnNames: _col1, _col2
                 Position of Big Table: 0
                 Statistics: Num rows: 1 Data size: 368 Basic stats: COMPLETE 
Column stats: PARTIAL
                 Select Operator
-                  expressions: _col3 (type: string), _col1 (type: string)
+                  expressions: _col2 (type: string), _col1 (type: string)
                   outputColumnNames: _col0, _col1
                   Statistics: Num rows: 1 Data size: 368 Basic stats: COMPLETE 
Column stats: PARTIAL
                   Select Operator

http://git-wip-us.apache.org/repos/asf/hive/blob/55887646/ql/src/test/results/clientpositive/llap/q93_with_constraints.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/q93_with_constraints.q.out 
b/ql/src/test/results/clientpositive/llap/q93_with_constraints.q.out
index 4f6e404..34865ac 100644
--- a/ql/src/test/results/clientpositive/llap/q93_with_constraints.q.out
+++ b/ql/src/test/results/clientpositive/llap/q93_with_constraints.q.out
@@ -323,10 +323,10 @@ STAGE PLANS:
                 keys:
                   0 _col0 (type: int), _col2 (type: int)
                   1 _col0 (type: int), _col2 (type: int)
-                outputColumnNames: _col3, _col7, _col9, _col10
+                outputColumnNames: _col3, _col6, _col8, _col9
                 Statistics: Num rows: 570235690 Data size: 69340660054 Basic 
stats: COMPLETE Column stats: NONE
                 Select Operator
-                  expressions: _col7 (type: int), CASE WHEN (_col3 is not 
null) THEN ((CAST( (_col9 - _col3) AS decimal(10,0)) * _col10)) ELSE ((CAST( 
_col9 AS decimal(10,0)) * _col10)) END (type: decimal(18,2))
+                  expressions: _col6 (type: int), CASE WHEN (_col3 is not 
null) THEN ((CAST( (_col8 - _col3) AS decimal(10,0)) * _col9)) ELSE ((CAST( 
_col8 AS decimal(10,0)) * _col9)) END (type: decimal(18,2))
                   outputColumnNames: _col0, _col1
                   Statistics: Num rows: 570235690 Data size: 69340660054 Basic 
stats: COMPLETE Column stats: NONE
                   Group By Operator

http://git-wip-us.apache.org/repos/asf/hive/blob/55887646/ql/src/test/results/clientpositive/llap/reopt_dpp.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/reopt_dpp.q.out 
b/ql/src/test/results/clientpositive/llap/reopt_dpp.q.out
index 2db8740..426d92f 100644
--- a/ql/src/test/results/clientpositive/llap/reopt_dpp.q.out
+++ b/ql/src/test/results/clientpositive/llap/reopt_dpp.q.out
@@ -160,16 +160,16 @@ Stage-0
               <-Map 3 [BROADCAST_EDGE] vectorized, llap
                 BROADCAST [RS_26]
                   PartitionCols:_col0
-                  Select Operator [SEL_25] (rows=28 width=8)
+                  Select Operator [SEL_25] (rows=28 width=4)
                     Output:["_col0"]
                     Filter Operator [FIL_24] (rows=28 width=8)
                       predicate:((d_year = 2000) and d_date_sk is not null)
                       TableScan [TS_3] (rows=56 width=8)
                         
default@x1_date_dim,d,Tbl:COMPLETE,Col:COMPLETE,Output:["d_date_sk","d_year"]
-                Dynamic Partitioning Event Operator [EVENT_29] (rows=1 width=8)
-                  Group By Operator [GBY_28] (rows=1 width=8)
+                Dynamic Partitioning Event Operator [EVENT_29] (rows=1 width=4)
+                  Group By Operator [GBY_28] (rows=1 width=4)
                     Output:["_col0"],keys:_col0
-                    Select Operator [SEL_27] (rows=28 width=8)
+                    Select Operator [SEL_27] (rows=28 width=4)
                       Output:["_col0"]
                        Please refer to the previous Select Operator [SEL_25]
               <-Select Operator [SEL_30] (rows=123457 width=4)
@@ -260,16 +260,16 @@ Stage-0
               <-Map 3 [BROADCAST_EDGE] vectorized, llap
                 BROADCAST [RS_26]
                   PartitionCols:_col0
-                  Select Operator [SEL_25] (runtime: rows=1 width=8)
+                  Select Operator [SEL_25] (runtime: rows=1 width=4)
                     Output:["_col0"]
                     Filter Operator [FIL_24] (runtime: rows=1 width=8)
                       predicate:((d_year = 2000) and d_date_sk is not null)
                       TableScan [TS_3] (runtime: rows=1 width=8)
                         
default@x1_date_dim,d,Tbl:COMPLETE,Col:COMPLETE,Output:["d_date_sk","d_year"]
-                Dynamic Partitioning Event Operator [EVENT_29] (runtime: 
rows=1 width=8)
-                  Group By Operator [GBY_28] (runtime: rows=1 width=8)
+                Dynamic Partitioning Event Operator [EVENT_29] (runtime: 
rows=1 width=4)
+                  Group By Operator [GBY_28] (runtime: rows=1 width=4)
                     Output:["_col0"],keys:_col0
-                    Select Operator [SEL_27] (runtime: rows=1 width=8)
+                    Select Operator [SEL_27] (runtime: rows=1 width=4)
                       Output:["_col0"]
                        Please refer to the previous Select Operator [SEL_25]
               <-Select Operator [SEL_30] (runtime: rows=1 width=4)

http://git-wip-us.apache.org/repos/asf/hive/blob/55887646/ql/src/test/results/clientpositive/llap/reopt_semijoin.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/reopt_semijoin.q.out 
b/ql/src/test/results/clientpositive/llap/reopt_semijoin.q.out
index 10485bb..e508e14 100644
--- a/ql/src/test/results/clientpositive/llap/reopt_semijoin.q.out
+++ b/ql/src/test/results/clientpositive/llap/reopt_semijoin.q.out
@@ -180,12 +180,12 @@ STAGE PLANS:
                     Select Operator
                       expressions: d_date_sk (type: int)
                       outputColumnNames: _col0
-                      Statistics: Num rows: 4 Data size: 32 Basic stats: 
COMPLETE Column stats: COMPLETE
+                      Statistics: Num rows: 4 Data size: 16 Basic stats: 
COMPLETE Column stats: COMPLETE
                       Reduce Output Operator
                         key expressions: _col0 (type: int)
                         sort order: +
                         Map-reduce partition columns: _col0 (type: int)
-                        Statistics: Num rows: 4 Data size: 32 Basic stats: 
COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 4 Data size: 16 Basic stats: 
COMPLETE Column stats: COMPLETE
                       Select Operator
                         expressions: _col0 (type: int)
                         outputColumnNames: _col0
@@ -355,12 +355,12 @@ STAGE PLANS:
                     Select Operator
                       expressions: d_date_sk (type: int)
                       outputColumnNames: _col0
-                      Statistics: (RUNTIME) Num rows: 1 Data size: 8 Basic 
stats: COMPLETE Column stats: COMPLETE
+                      Statistics: (RUNTIME) Num rows: 1 Data size: 4 Basic 
stats: COMPLETE Column stats: COMPLETE
                       Reduce Output Operator
                         key expressions: _col0 (type: int)
                         sort order: +
                         Map-reduce partition columns: _col0 (type: int)
-                        Statistics: (RUNTIME) Num rows: 1 Data size: 8 Basic 
stats: COMPLETE Column stats: COMPLETE
+                        Statistics: (RUNTIME) Num rows: 1 Data size: 4 Basic 
stats: COMPLETE Column stats: COMPLETE
                       Select Operator
                         expressions: _col0 (type: int)
                         outputColumnNames: _col0

http://git-wip-us.apache.org/repos/asf/hive/blob/55887646/ql/src/test/results/clientpositive/llap/sharedworkext.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/sharedworkext.q.out 
b/ql/src/test/results/clientpositive/llap/sharedworkext.q.out
index ca2b4d6..e348815 100644
--- a/ql/src/test/results/clientpositive/llap/sharedworkext.q.out
+++ b/ql/src/test/results/clientpositive/llap/sharedworkext.q.out
@@ -121,12 +121,12 @@ STAGE PLANS:
                 Select Operator
                   expressions: _col0 (type: string)
                   outputColumnNames: _col0
-                  Statistics: Num rows: 395 Data size: 70310 Basic stats: 
COMPLETE Column stats: COMPLETE
+                  Statistics: Num rows: 395 Data size: 34365 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: 395 Data size: 70310 Basic stats: 
COMPLETE Column stats: COMPLETE
+                    Statistics: Num rows: 395 Data size: 34365 Basic stats: 
COMPLETE Column stats: COMPLETE
         Reducer 4 
             Execution mode: llap
             Reduce Operator Tree:
@@ -156,12 +156,12 @@ STAGE PLANS:
                 Select Operator
                   expressions: _col0 (type: string)
                   outputColumnNames: _col0
-                  Statistics: Num rows: 395 Data size: 70310 Basic stats: 
COMPLETE Column stats: COMPLETE
+                  Statistics: Num rows: 395 Data size: 34365 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: 395 Data size: 70310 Basic stats: 
COMPLETE Column stats: COMPLETE
+                    Statistics: Num rows: 395 Data size: 34365 Basic stats: 
COMPLETE Column stats: COMPLETE
 
   Stage: Stage-0
     Fetch Operator

http://git-wip-us.apache.org/repos/asf/hive/blob/55887646/ql/src/test/results/clientpositive/llap/stats11.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/stats11.q.out 
b/ql/src/test/results/clientpositive/llap/stats11.q.out
index d244ddf..c9d5145 100644
--- a/ql/src/test/results/clientpositive/llap/stats11.q.out
+++ b/ql/src/test/results/clientpositive/llap/stats11.q.out
@@ -311,7 +311,7 @@ OPTIMIZED SQL: SELECT `t0`.`key`, `t0`.`value`, 
`t2`.`value` AS `value1`
 FROM (SELECT `key`, `value`
 FROM `default`.`srcbucket_mapjoin_n15`
 WHERE `key` IS NOT NULL) AS `t0`
-INNER JOIN (SELECT `key`, `value`, CAST('2008-04-08' AS STRING) AS `ds`
+INNER JOIN (SELECT `key`, `value`
 FROM `default`.`srcbucket_mapjoin_part_n16`
 WHERE `ds` = '2008-04-08' AND `key` IS NOT NULL) AS `t2` ON `t0`.`key` = 
`t2`.`key`
 STAGE DEPENDENCIES:
@@ -753,7 +753,7 @@ OPTIMIZED SQL: SELECT `t0`.`key`, `t0`.`value`, 
`t2`.`value` AS `value1`
 FROM (SELECT `key`, `value`
 FROM `default`.`srcbucket_mapjoin_n15`
 WHERE `key` IS NOT NULL) AS `t0`
-INNER JOIN (SELECT `key`, `value`, CAST('2008-04-08' AS STRING) AS `ds`
+INNER JOIN (SELECT `key`, `value`
 FROM `default`.`srcbucket_mapjoin_part_n16`
 WHERE `ds` = '2008-04-08' AND `key` IS NOT NULL) AS `t2` ON `t0`.`key` = 
`t2`.`key`
 STAGE DEPENDENCIES:

http://git-wip-us.apache.org/repos/asf/hive/blob/55887646/ql/src/test/results/clientpositive/llap/subquery_in.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/subquery_in.q.out 
b/ql/src/test/results/clientpositive/llap/subquery_in.q.out
index 039b52a..9cfc960 100644
--- a/ql/src/test/results/clientpositive/llap/subquery_in.q.out
+++ b/ql/src/test/results/clientpositive/llap/subquery_in.q.out
@@ -1098,12 +1098,12 @@ STAGE PLANS:
                     Select Operator
                       expressions: l_orderkey (type: int), l_partkey (type: 
int), l_suppkey (type: int)
                       outputColumnNames: _col0, _col1, _col2
-                      Statistics: Num rows: 14 Data size: 224 Basic stats: 
COMPLETE Column stats: COMPLETE
+                      Statistics: Num rows: 14 Data size: 168 Basic stats: 
COMPLETE Column stats: COMPLETE
                       Reduce Output Operator
                         key expressions: _col1 (type: int)
                         sort order: +
                         Map-reduce partition columns: _col1 (type: int)
-                        Statistics: Num rows: 14 Data size: 224 Basic stats: 
COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 14 Data size: 168 Basic stats: 
COMPLETE Column stats: COMPLETE
                         value expressions: _col0 (type: int), _col2 (type: int)
             Execution mode: vectorized, llap
             LLAP IO: no inputs
@@ -1592,9 +1592,8 @@ STAGE PLANS:
     Tez
 #### A masked pattern was here ####
       Edges:
-        Reducer 2 <- Map 1 (SIMPLE_EDGE), Reducer 5 (ONE_TO_ONE_EDGE)
+        Reducer 2 <- Map 1 (SIMPLE_EDGE), Reducer 4 (SIMPLE_EDGE)
         Reducer 4 <- Map 3 (SIMPLE_EDGE)
-        Reducer 5 <- Reducer 4 (SIMPLE_EDGE)
 #### A masked pattern was here ####
       Vertices:
         Map 1 
@@ -1607,14 +1606,14 @@ STAGE PLANS:
                     predicate: p_size is not null (type: boolean)
                     Statistics: Num rows: 26 Data size: 16094 Basic stats: 
COMPLETE Column stats: COMPLETE
                     Select Operator
-                      expressions: p_partkey (type: int), p_name (type: 
string), p_mfgr (type: string), p_brand (type: string), p_type (type: string), 
p_size (type: int), p_container (type: string), p_retailprice (type: double), 
p_comment (type: string)
-                      outputColumnNames: _col0, _col1, _col2, _col3, _col4, 
_col5, _col6, _col7, _col8
-                      Statistics: Num rows: 26 Data size: 16094 Basic stats: 
COMPLETE Column stats: COMPLETE
+                      expressions: p_partkey (type: int), p_name (type: 
string), p_mfgr (type: string), p_brand (type: string), p_type (type: string), 
p_size (type: int), p_container (type: string), p_retailprice (type: double), 
p_comment (type: string), (p_size - 1) (type: int)
+                      outputColumnNames: _col0, _col1, _col2, _col3, _col4, 
_col5, _col6, _col7, _col8, _col9
+                      Statistics: Num rows: 26 Data size: 16198 Basic stats: 
COMPLETE Column stats: COMPLETE
                       Reduce Output Operator
-                        key expressions: (_col5 - 1) (type: int)
+                        key expressions: _col9 (type: int)
                         sort order: +
-                        Map-reduce partition columns: (_col5 - 1) (type: int)
-                        Statistics: Num rows: 26 Data size: 16094 Basic stats: 
COMPLETE Column stats: COMPLETE
+                        Map-reduce partition columns: _col9 (type: int)
+                        Statistics: Num rows: 26 Data size: 16198 Basic stats: 
COMPLETE Column stats: COMPLETE
                         value expressions: _col0 (type: int), _col1 (type: 
string), _col2 (type: string), _col3 (type: string), _col4 (type: string), 
_col5 (type: int), _col6 (type: string), _col7 (type: double), _col8 (type: 
string)
             Execution mode: vectorized, llap
             LLAP IO: no inputs
@@ -1646,9 +1645,9 @@ STAGE PLANS:
             Reduce Operator Tree:
               Merge Join Operator
                 condition map:
-                     Inner Join 0 to 1
+                     Left Semi Join 0 to 1
                 keys:
-                  0 (_col5 - 1) (type: int)
+                  0 _col9 (type: int)
                   1 _col0 (type: int)
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, 
_col6, _col7, _col8
                 Statistics: Num rows: 7 Data size: 4333 Basic stats: COMPLETE 
Column stats: COMPLETE
@@ -1675,29 +1674,20 @@ STAGE PLANS:
                   Filter Operator
                     predicate: _col1 is not null (type: boolean)
                     Statistics: Num rows: 13 Data size: 52 Basic stats: 
COMPLETE Column stats: COMPLETE
-                    Group By Operator
-                      keys: _col1 (type: int)
-                      mode: hash
+                    Select Operator
+                      expressions: _col1 (type: int)
                       outputColumnNames: _col0
-                      Statistics: Num rows: 6 Data size: 24 Basic stats: 
COMPLETE Column stats: COMPLETE
-                      Reduce Output Operator
-                        key expressions: _col0 (type: int)
-                        sort order: +
-                        Map-reduce partition columns: _col0 (type: int)
+                      Statistics: Num rows: 13 Data size: 52 Basic stats: 
COMPLETE Column stats: COMPLETE
+                      Group By Operator
+                        keys: _col0 (type: int)
+                        mode: hash
+                        outputColumnNames: _col0
                         Statistics: Num rows: 6 Data size: 24 Basic stats: 
COMPLETE Column stats: COMPLETE
-        Reducer 5 
-            Execution mode: vectorized, llap
-            Reduce Operator Tree:
-              Group By Operator
-                keys: KEY._col0 (type: int)
-                mode: mergepartial
-                outputColumnNames: _col0
-                Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE 
Column stats: COMPLETE
-                Reduce Output Operator
-                  key expressions: _col0 (type: int)
-                  sort order: +
-                  Map-reduce partition columns: _col0 (type: int)
-                  Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE 
Column stats: COMPLETE
+                        Reduce Output Operator
+                          key expressions: _col0 (type: int)
+                          sort order: +
+                          Map-reduce partition columns: _col0 (type: int)
+                          Statistics: Num rows: 6 Data size: 24 Basic stats: 
COMPLETE Column stats: COMPLETE
 
   Stage: Stage-0
     Fetch Operator
@@ -1740,9 +1730,8 @@ STAGE PLANS:
     Tez
 #### A masked pattern was here ####
       Edges:
-        Reducer 2 <- Map 1 (SIMPLE_EDGE), Reducer 5 (ONE_TO_ONE_EDGE)
+        Reducer 2 <- Map 1 (SIMPLE_EDGE), Reducer 4 (SIMPLE_EDGE)
         Reducer 4 <- Map 3 (SIMPLE_EDGE)
-        Reducer 5 <- Reducer 4 (SIMPLE_EDGE)
 #### A masked pattern was here ####
       Vertices:
         Map 1 
@@ -1755,14 +1744,14 @@ STAGE PLANS:
                     predicate: (p_partkey is not null and p_size is not null) 
(type: boolean)
                     Statistics: Num rows: 26 Data size: 16094 Basic stats: 
COMPLETE Column stats: COMPLETE
                     Select Operator
-                      expressions: p_partkey (type: int), p_name (type: 
string), p_mfgr (type: string), p_brand (type: string), p_type (type: string), 
p_size (type: int), p_container (type: string), p_retailprice (type: double), 
p_comment (type: string)
-                      outputColumnNames: _col0, _col1, _col2, _col3, _col4, 
_col5, _col6, _col7, _col8
-                      Statistics: Num rows: 26 Data size: 16094 Basic stats: 
COMPLETE Column stats: COMPLETE
+                      expressions: p_partkey (type: int), p_name (type: 
string), p_mfgr (type: string), p_brand (type: string), p_type (type: string), 
p_size (type: int), p_container (type: string), p_retailprice (type: double), 
p_comment (type: string), (p_partkey * p_size) (type: int)
+                      outputColumnNames: _col0, _col1, _col2, _col3, _col4, 
_col5, _col6, _col7, _col8, _col9
+                      Statistics: Num rows: 26 Data size: 16198 Basic stats: 
COMPLETE Column stats: COMPLETE
                       Reduce Output Operator
-                        key expressions: (_col0 * _col5) (type: int)
+                        key expressions: _col9 (type: int)
                         sort order: +
-                        Map-reduce partition columns: (_col0 * _col5) (type: 
int)
-                        Statistics: Num rows: 26 Data size: 16094 Basic stats: 
COMPLETE Column stats: COMPLETE
+                        Map-reduce partition columns: _col9 (type: int)
+                        Statistics: Num rows: 26 Data size: 16198 Basic stats: 
COMPLETE Column stats: COMPLETE
                         value expressions: _col0 (type: int), _col1 (type: 
string), _col2 (type: string), _col3 (type: string), _col4 (type: string), 
_col5 (type: int), _col6 (type: string), _col7 (type: double), _col8 (type: 
string)
             Execution mode: vectorized, llap
             LLAP IO: no inputs
@@ -1794,9 +1783,9 @@ STAGE PLANS:
             Reduce Operator Tree:
               Merge Join Operator
                 condition map:
-                     Inner Join 0 to 1
+                     Left Semi Join 0 to 1
                 keys:
-                  0 (_col0 * _col5) (type: int)
+                  0 _col9 (type: int)
                   1 _col0 (type: int)
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, 
_col6, _col7, _col8
                 Statistics: Num rows: 6 Data size: 3714 Basic stats: COMPLETE 
Column stats: COMPLETE
@@ -1823,29 +1812,20 @@ STAGE PLANS:
                   Filter Operator
                     predicate: _col1 is not null (type: boolean)
                     Statistics: Num rows: 13 Data size: 52 Basic stats: 
COMPLETE Column stats: COMPLETE
-                    Group By Operator
-                      keys: _col1 (type: int)
-                      mode: hash
+                    Select Operator
+                      expressions: _col1 (type: int)
                       outputColumnNames: _col0
-                      Statistics: Num rows: 6 Data size: 24 Basic stats: 
COMPLETE Column stats: COMPLETE
-                      Reduce Output Operator
-                        key expressions: _col0 (type: int)
-                        sort order: +
-                        Map-reduce partition columns: _col0 (type: int)
+                      Statistics: Num rows: 13 Data size: 52 Basic stats: 
COMPLETE Column stats: COMPLETE
+                      Group By Operator
+                        keys: _col0 (type: int)
+                        mode: hash
+                        outputColumnNames: _col0
                         Statistics: Num rows: 6 Data size: 24 Basic stats: 
COMPLETE Column stats: COMPLETE
-        Reducer 5 
-            Execution mode: vectorized, llap
-            Reduce Operator Tree:
-              Group By Operator
-                keys: KEY._col0 (type: int)
-                mode: mergepartial
-                outputColumnNames: _col0
-                Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE 
Column stats: COMPLETE
-                Reduce Output Operator
-                  key expressions: _col0 (type: int)
-                  sort order: +
-                  Map-reduce partition columns: _col0 (type: int)
-                  Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE 
Column stats: COMPLETE
+                        Reduce Output Operator
+                          key expressions: _col0 (type: int)
+                          sort order: +
+                          Map-reduce partition columns: _col0 (type: int)
+                          Statistics: Num rows: 6 Data size: 24 Basic stats: 
COMPLETE Column stats: COMPLETE
 
   Stage: Stage-0
     Fetch Operator
@@ -1995,9 +1975,8 @@ STAGE PLANS:
     Tez
 #### A masked pattern was here ####
       Edges:
-        Reducer 2 <- Map 1 (SIMPLE_EDGE), Reducer 5 (ONE_TO_ONE_EDGE)
+        Reducer 2 <- Map 1 (SIMPLE_EDGE), Reducer 4 (SIMPLE_EDGE)
         Reducer 4 <- Map 3 (SIMPLE_EDGE)
-        Reducer 5 <- Reducer 4 (SIMPLE_EDGE)
 #### A masked pattern was here ####
       Vertices:
         Map 1 
@@ -2010,14 +1989,14 @@ STAGE PLANS:
                     predicate: p_retailprice is not null (type: boolean)
                     Statistics: Num rows: 26 Data size: 16094 Basic stats: 
COMPLETE Column stats: COMPLETE
                     Select Operator
-                      expressions: p_partkey (type: int), p_name (type: 
string), p_mfgr (type: string), p_brand (type: string), p_type (type: string), 
p_size (type: int), p_container (type: string), p_retailprice (type: double), 
p_comment (type: string)
-                      outputColumnNames: _col0, _col1, _col2, _col3, _col4, 
_col5, _col6, _col7, _col8
-                      Statistics: Num rows: 26 Data size: 16094 Basic stats: 
COMPLETE Column stats: COMPLETE
+                      expressions: p_partkey (type: int), p_name (type: 
string), p_mfgr (type: string), p_brand (type: string), p_type (type: string), 
p_size (type: int), p_container (type: string), p_retailprice (type: double), 
p_comment (type: string), floor(p_retailprice) (type: bigint)
+                      outputColumnNames: _col0, _col1, _col2, _col3, _col4, 
_col5, _col6, _col7, _col8, _col9
+                      Statistics: Num rows: 26 Data size: 16302 Basic stats: 
COMPLETE Column stats: COMPLETE
                       Reduce Output Operator
-                        key expressions: floor(_col7) (type: bigint)
+                        key expressions: _col9 (type: bigint)
                         sort order: +
-                        Map-reduce partition columns: floor(_col7) (type: 
bigint)
-                        Statistics: Num rows: 26 Data size: 16094 Basic stats: 
COMPLETE Column stats: COMPLETE
+                        Map-reduce partition columns: _col9 (type: bigint)
+                        Statistics: Num rows: 26 Data size: 16302 Basic stats: 
COMPLETE Column stats: COMPLETE
                         value expressions: _col0 (type: int), _col1 (type: 
string), _col2 (type: string), _col3 (type: string), _col4 (type: string), 
_col5 (type: int), _col6 (type: string), _col7 (type: double), _col8 (type: 
string)
             Execution mode: vectorized, llap
             LLAP IO: no inputs
@@ -2049,9 +2028,9 @@ STAGE PLANS:
             Reduce Operator Tree:
               Merge Join Operator
                 condition map:
-                     Inner Join 0 to 1
+                     Left Semi Join 0 to 1
                 keys:
-                  0 floor(_col7) (type: bigint)
+                  0 _col9 (type: bigint)
                   1 _col0 (type: bigint)
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, 
_col6, _col7, _col8
                 Statistics: Num rows: 6 Data size: 3714 Basic stats: COMPLETE 
Column stats: COMPLETE
@@ -2092,19 +2071,6 @@ STAGE PLANS:
                           sort order: +
                           Map-reduce partition columns: _col0 (type: bigint)
                           Statistics: Num rows: 6 Data size: 48 Basic stats: 
COMPLETE Column stats: COMPLETE
-        Reducer 5 
-            Execution mode: vectorized, llap
-            Reduce Operator Tree:
-              Group By Operator
-                keys: KEY._col0 (type: bigint)
-                mode: mergepartial
-                outputColumnNames: _col0
-                Statistics: Num rows: 6 Data size: 48 Basic stats: COMPLETE 
Column stats: COMPLETE
-                Reduce Output Operator
-                  key expressions: _col0 (type: bigint)
-                  sort order: +
-                  Map-reduce partition columns: _col0 (type: bigint)
-                  Statistics: Num rows: 6 Data size: 48 Basic stats: COMPLETE 
Column stats: COMPLETE
 
   Stage: Stage-0
     Fetch Operator
@@ -2256,7 +2222,7 @@ STAGE PLANS:
                      Inner Join 0 to 1
                 keys:
                   0 _col2 (type: int), _col0 (type: int)
-                  1 _col0 (type: int), (_col0 + 121150) (type: int)
+                  1 _col0 (type: int), _col1 (type: int)
                 outputColumnNames: _col1, _col3
                 Statistics: Num rows: 13 Data size: 1625 Basic stats: COMPLETE 
Column stats: COMPLETE
                 Select Operator
@@ -2281,11 +2247,15 @@ STAGE PLANS:
                 mode: mergepartial
                 outputColumnNames: _col0
                 Statistics: Num rows: 13 Data size: 52 Basic stats: COMPLETE 
Column stats: COMPLETE
-                Reduce Output Operator
-                  key expressions: _col0 (type: int), (_col0 + 121150) (type: 
int)
-                  sort order: ++
-                  Map-reduce partition columns: _col0 (type: int), (_col0 + 
121150) (type: int)
-                  Statistics: Num rows: 13 Data size: 52 Basic stats: COMPLETE 
Column stats: COMPLETE
+                Select Operator
+                  expressions: _col0 (type: int), (_col0 + 121150) (type: int)
+                  outputColumnNames: _col0, _col1
+                  Statistics: Num rows: 13 Data size: 104 Basic stats: 
COMPLETE Column stats: COMPLETE
+                  Reduce Output Operator
+                    key expressions: _col0 (type: int), _col1 (type: int)
+                    sort order: ++
+                    Map-reduce partition columns: _col0 (type: int), _col1 
(type: int)
+                    Statistics: Num rows: 13 Data size: 104 Basic stats: 
COMPLETE Column stats: COMPLETE
 
   Stage: Stage-0
     Fetch Operator
@@ -2606,13 +2576,13 @@ STAGE PLANS:
                     predicate: (p_size is not null and p_type is not null) 
(type: boolean)
                     Statistics: Num rows: 26 Data size: 2808 Basic stats: 
COMPLETE Column stats: COMPLETE
                     Select Operator
-                      expressions: p_type (type: string), p_size (type: int)
+                      expressions: p_type (type: string), (p_size + 1) (type: 
int)
                       outputColumnNames: _col0, _col1
                       Statistics: Num rows: 26 Data size: 2808 Basic stats: 
COMPLETE Column stats: COMPLETE
                       Reduce Output Operator
-                        key expressions: (_col1 + 1) (type: int)
+                        key expressions: _col1 (type: int)
                         sort order: +
-                        Map-reduce partition columns: (_col1 + 1) (type: int)
+                        Map-reduce partition columns: _col1 (type: int)
                         Statistics: Num rows: 26 Data size: 2808 Basic stats: 
COMPLETE Column stats: COMPLETE
                         value expressions: _col0 (type: string)
             Execution mode: vectorized, llap
@@ -2667,7 +2637,7 @@ STAGE PLANS:
                 condition map:
                      Inner Join 0 to 1
                 keys:
-                  0 (_col1 + 1) (type: int)
+                  0 _col1 (type: int)
                   1 _col0 (type: int)
                 outputColumnNames: _col0, _col2
                 Statistics: Num rows: 16 Data size: 1728 Basic stats: COMPLETE 
Column stats: COMPLETE
@@ -3213,10 +3183,9 @@ STAGE PLANS:
     Tez
 #### A masked pattern was here ####
       Edges:
-        Reducer 2 <- Map 1 (SIMPLE_EDGE), Reducer 6 (ONE_TO_ONE_EDGE)
+        Reducer 2 <- Map 1 (SIMPLE_EDGE), Reducer 5 (SIMPLE_EDGE)
         Reducer 3 <- Reducer 2 (SIMPLE_EDGE)
         Reducer 5 <- Map 4 (SIMPLE_EDGE)
-        Reducer 6 <- Reducer 5 (SIMPLE_EDGE)
 #### A masked pattern was here ####
       Vertices:
         Map 1 
@@ -3229,14 +3198,14 @@ STAGE PLANS:
                     predicate: p_size is not null (type: boolean)
                     Statistics: Num rows: 26 Data size: 16094 Basic stats: 
COMPLETE Column stats: COMPLETE
                     Select Operator
-                      expressions: p_partkey (type: int), p_name (type: 
string), p_mfgr (type: string), p_brand (type: string), p_type (type: string), 
p_size (type: int), p_container (type: string), p_retailprice (type: double), 
p_comment (type: string)
-                      outputColumnNames: _col0, _col1, _col2, _col3, _col4, 
_col5, _col6, _col7, _col8
-                      Statistics: Num rows: 26 Data size: 16094 Basic stats: 
COMPLETE Column stats: COMPLETE
+                      expressions: p_partkey (type: int), p_name (type: 
string), p_mfgr (type: string), p_brand (type: string), p_type (type: string), 
p_size (type: int), p_container (type: string), p_retailprice (type: double), 
p_comment (type: string), (p_size - 1) (type: int)
+                      outputColumnNames: _col0, _col1, _col2, _col3, _col4, 
_col5, _col6, _col7, _col8, _col9
+                      Statistics: Num rows: 26 Data size: 16198 Basic stats: 
COMPLETE Column stats: COMPLETE
                       Reduce Output Operator
-                        key expressions: (_col5 - 1) (type: int)
+                        key expressions: _col9 (type: int)
                         sort order: +
-                        Map-reduce partition columns: (_col5 - 1) (type: int)
-                        Statistics: Num rows: 26 Data size: 16094 Basic stats: 
COMPLETE Column stats: COMPLETE
+                        Map-reduce partition columns: _col9 (type: int)
+                        Statistics: Num rows: 26 Data size: 16198 Basic stats: 
COMPLETE Column stats: COMPLETE
                         value expressions: _col0 (type: int), _col1 (type: 
string), _col2 (type: string), _col3 (type: string), _col4 (type: string), 
_col5 (type: int), _col6 (type: string), _col7 (type: double), _col8 (type: 
string)
             Execution mode: vectorized, llap
             LLAP IO: no inputs
@@ -3268,9 +3237,9 @@ STAGE PLANS:
             Reduce Operator Tree:
               Merge Join Operator
                 condition map:
-                     Inner Join 0 to 1
+                     Left Semi Join 0 to 1
                 keys:
-                  0 (_col5 - 1) (type: int)
+                  0 _col9 (type: int)
                   1 _col0 (type: int)
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, 
_col6, _col7, _col8
                 Statistics: Num rows: 7 Data size: 4333 Basic stats: COMPLETE 
Column stats: COMPLETE
@@ -3309,29 +3278,20 @@ STAGE PLANS:
                   Filter Operator
                     predicate: _col1 is not null (type: boolean)
                     Statistics: Num rows: 13 Data size: 52 Basic stats: 
COMPLETE Column stats: COMPLETE
-                    Group By Operator
-                      keys: _col1 (type: int)
-                      mode: hash
+                    Select Operator
+                      expressions: _col1 (type: int)
                       outputColumnNames: _col0
-                      Statistics: Num rows: 6 Data size: 24 Basic stats: 
COMPLETE Column stats: COMPLETE
-                      Reduce Output Operator
-                        key expressions: _col0 (type: int)
-                        sort order: +
-                        Map-reduce partition columns: _col0 (type: int)
+                      Statistics: Num rows: 13 Data size: 52 Basic stats: 
COMPLETE Column stats: COMPLETE
+                      Group By Operator
+                        keys: _col0 (type: int)
+                        mode: hash
+                        outputColumnNames: _col0
                         Statistics: Num rows: 6 Data size: 24 Basic stats: 
COMPLETE Column stats: COMPLETE
-        Reducer 6 
-            Execution mode: vectorized, llap
-            Reduce Operator Tree:
-              Group By Operator
-                keys: KEY._col0 (type: int)
-                mode: mergepartial
-                outputColumnNames: _col0
-                Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE 
Column stats: COMPLETE
-                Reduce Output Operator
-                  key expressions: _col0 (type: int)
-                  sort order: +
-                  Map-reduce partition columns: _col0 (type: int)
-                  Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE 
Column stats: COMPLETE
+                        Reduce Output Operator
+                          key expressions: _col0 (type: int)
+                          sort order: +
+                          Map-reduce partition columns: _col0 (type: int)
+                          Statistics: Num rows: 6 Data size: 24 Basic stats: 
COMPLETE Column stats: COMPLETE
 
   Stage: Stage-0
     Fetch Operator
@@ -3374,10 +3334,9 @@ STAGE PLANS:
     Tez
 #### A masked pattern was here ####
       Edges:
-        Reducer 2 <- Map 1 (SIMPLE_EDGE), Reducer 6 (ONE_TO_ONE_EDGE)
+        Reducer 2 <- Map 1 (SIMPLE_EDGE), Reducer 5 (SIMPLE_EDGE)
         Reducer 3 <- Reducer 2 (SIMPLE_EDGE)
         Reducer 5 <- Map 4 (SIMPLE_EDGE)
-        Reducer 6 <- Reducer 5 (SIMPLE_EDGE)
 #### A masked pattern was here ####
       Vertices:
         Map 1 
@@ -3390,14 +3349,14 @@ STAGE PLANS:
                     predicate: p_size is not null (type: boolean)
                     Statistics: Num rows: 26 Data size: 16094 Basic stats: 
COMPLETE Column stats: COMPLETE
                     Select Operator
-                      expressions: p_partkey (type: int), p_name (type: 
string), p_mfgr (type: string), p_brand (type: string), p_type (type: string), 
p_size (type: int), p_container (type: string), p_retailprice (type: double), 
p_comment (type: string)
-                      outputColumnNames: _col0, _col1, _col2, _col3, _col4, 
_col5, _col6, _col7, _col8
-                      Statistics: Num rows: 26 Data size: 16094 Basic stats: 
COMPLETE Column stats: COMPLETE
+                      expressions: p_partkey (type: int), p_name (type: 
string), p_mfgr (type: string), p_brand (type: string), p_type (type: string), 
p_size (type: int), p_container (type: string), p_retailprice (type: double), 
p_comment (type: string), (p_size - 1) (type: int)
+                      outputColumnNames: _col0, _col1, _col2, _col3, _col4, 
_col5, _col6, _col7, _col8, _col9
+                      Statistics: Num rows: 26 Data size: 16198 Basic stats: 
COMPLETE Column stats: COMPLETE
                       Reduce Output Operator
-                        key expressions: (_col5 - 1) (type: int)
+                        key expressions: _col9 (type: int)
                         sort order: +
-                        Map-reduce partition columns: (_col5 - 1) (type: int)
-                        Statistics: Num rows: 26 Data size: 16094 Basic stats: 
COMPLETE Column stats: COMPLETE
+                        Map-reduce partition columns: _col9 (type: int)
+                        Statistics: Num rows: 26 Data size: 16198 Basic stats: 
COMPLETE Column stats: COMPLETE
                         value expressions: _col0 (type: int), _col1 (type: 
string), _col2 (type: string), _col3 (type: string), _col4 (type: string), 
_col5 (type: int), _col6 (type: string), _col7 (type: double), _col8 (type: 
string)
             Execution mode: vectorized, llap
             LLAP IO: no inputs
@@ -3429,9 +3388,9 @@ STAGE PLANS:
             Reduce Operator Tree:
               Merge Join Operator
                 condition map:
-                     Inner Join 0 to 1
+                     Left Semi Join 0 to 1
                 keys:
-                  0 (_col5 - 1) (type: int)
+                  0 _col9 (type: int)
                   1 _col0 (type: int)
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, 
_col6, _col7, _col8
                 Statistics: Num rows: 7 Data size: 4333 Basic stats: COMPLETE 
Column stats: COMPLETE
@@ -3474,29 +3433,20 @@ STAGE PLANS:
                   Filter Operator
                     predicate: _col1 is not null (type: boolean)
                     Statistics: Num rows: 13 Data size: 52 Basic stats: 
COMPLETE Column stats: COMPLETE
-                    Group By Operator
-                      keys: _col1 (type: int)
-                      mode: hash
+                    Select Operator
+                      expressions: _col1 (type: int)
                       outputColumnNames: _col0
-                      Statistics: Num rows: 6 Data size: 24 Basic stats: 
COMPLETE Column stats: COMPLETE
-                      Reduce Output Operator
-                        key expressions: _col0 (type: int)
-                        sort order: +
-                        Map-reduce partition columns: _col0 (type: int)
+                      Statistics: Num rows: 13 Data size: 52 Basic stats: 
COMPLETE Column stats: COMPLETE
+                      Group By Operator
+                        keys: _col0 (type: int)
+                        mode: hash
+                        outputColumnNames: _col0
                         Statistics: Num rows: 6 Data size: 24 Basic stats: 
COMPLETE Column stats: COMPLETE
-        Reducer 6 
-            Execution mode: vectorized, llap
-            Reduce Operator Tree:
-              Group By Operator
-                keys: KEY._col0 (type: int)
-                mode: mergepartial
-                outputColumnNames: _col0
-                Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE 
Column stats: COMPLETE
-                Reduce Output Operator
-                  key expressions: _col0 (type: int)
-                  sort order: +
-                  Map-reduce partition columns: _col0 (type: int)
-                  Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE 
Column stats: COMPLETE
+                        Reduce Output Operator
+                          key expressions: _col0 (type: int)
+                          sort order: +
+                          Map-reduce partition columns: _col0 (type: int)
+                          Statistics: Num rows: 6 Data size: 24 Basic stats: 
COMPLETE Column stats: COMPLETE
 
   Stage: Stage-0
     Fetch Operator
@@ -4000,12 +3950,12 @@ STAGE PLANS:
                     Select Operator
                       expressions: p_name (type: string), p_type (type: string)
                       outputColumnNames: _col0, _col1
-                      Statistics: Num rows: 26 Data size: 5954 Basic stats: 
COMPLETE Column stats: COMPLETE
+                      Statistics: Num rows: 26 Data size: 5850 Basic stats: 
COMPLETE Column stats: COMPLETE
                       Reduce Output Operator
                         key expressions: _col1 (type: string)
                         sort order: +
                         Map-reduce partition columns: _col1 (type: string)
-                        Statistics: Num rows: 26 Data size: 5954 Basic stats: 
COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 26 Data size: 5850 Basic stats: 
COMPLETE Column stats: COMPLETE
                         value expressions: _col0 (type: string)
             Execution mode: vectorized, llap
             LLAP IO: no inputs
@@ -4057,10 +4007,10 @@ STAGE PLANS:
                 keys:
                   0 _col1 (type: string)
                   1 _col0 (type: string)
-                outputColumnNames: _col0, _col4
+                outputColumnNames: _col0, _col3
                 Statistics: Num rows: 28 Data size: 3500 Basic stats: COMPLETE 
Column stats: COMPLETE
                 Select Operator
-                  expressions: _col0 (type: string), _col4 (type: int)
+                  expressions: _col0 (type: string), _col3 (type: int)
                   outputColumnNames: _col0, _col1
                   Statistics: Num rows: 28 Data size: 3500 Basic stats: 
COMPLETE Column stats: COMPLETE
                   Group By Operator

http://git-wip-us.apache.org/repos/asf/hive/blob/55887646/ql/src/test/results/clientpositive/llap/subquery_notin.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/subquery_notin.q.out 
b/ql/src/test/results/clientpositive/llap/subquery_notin.q.out
index 37e7562..29d8bbf 100644
--- a/ql/src/test/results/clientpositive/llap/subquery_notin.q.out
+++ b/ql/src/test/results/clientpositive/llap/subquery_notin.q.out
@@ -2783,16 +2783,20 @@ STAGE PLANS:
                 mode: mergepartial
                 outputColumnNames: _col0
                 Statistics: Num rows: 13 Data size: 52 Basic stats: COMPLETE 
Column stats: COMPLETE
-                Reduce Output Operator
-                  key expressions: _col0 (type: int), (_col0 + 121150) (type: 
int)
-                  sort order: ++
-                  Map-reduce partition columns: _col0 (type: int), (_col0 + 
121150) (type: int)
-                  Statistics: Num rows: 13 Data size: 52 Basic stats: COMPLETE 
Column stats: COMPLETE
-                Reduce Output Operator
-                  key expressions: _col0 (type: int), (_col0 + 121150) (type: 
int)
-                  sort order: ++
-                  Map-reduce partition columns: _col0 (type: int), (_col0 + 
121150) (type: int)
-                  Statistics: Num rows: 13 Data size: 52 Basic stats: COMPLETE 
Column stats: COMPLETE
+                Select Operator
+                  expressions: _col0 (type: int), (_col0 + 121150) (type: int)
+                  outputColumnNames: _col0, _col1
+                  Statistics: Num rows: 13 Data size: 104 Basic stats: 
COMPLETE Column stats: COMPLETE
+                  Reduce Output Operator
+                    key expressions: _col0 (type: int), _col1 (type: int)
+                    sort order: ++
+                    Map-reduce partition columns: _col0 (type: int), _col1 
(type: int)
+                    Statistics: Num rows: 13 Data size: 104 Basic stats: 
COMPLETE Column stats: COMPLETE
+                  Reduce Output Operator
+                    key expressions: _col0 (type: int), _col1 (type: int)
+                    sort order: ++
+                    Map-reduce partition columns: _col0 (type: int), _col1 
(type: int)
+                    Statistics: Num rows: 13 Data size: 104 Basic stats: 
COMPLETE Column stats: COMPLETE
         Reducer 2 
             Execution mode: llap
             Reduce Operator Tree:
@@ -2843,7 +2847,7 @@ STAGE PLANS:
                      Inner Join 0 to 1
                 keys:
                   0 _col2 (type: int), _col0 (type: int)
-                  1 _col0 (type: int), (_col0 + 121150) (type: int)
+                  1 _col0 (type: int), _col1 (type: int)
                 outputColumnNames: _col1, _col3
                 Statistics: Num rows: 13 Data size: 1625 Basic stats: COMPLETE 
Column stats: COMPLETE
                 Group By Operator
@@ -2881,7 +2885,7 @@ STAGE PLANS:
                      Inner Join 0 to 1
                 keys:
                   0 _col2 (type: int), _col0 (type: int)
-                  1 _col0 (type: int), (_col0 + 121150) (type: int)
+                  1 _col0 (type: int), _col1 (type: int)
                 outputColumnNames: _col1, _col3
                 Statistics: Num rows: 13 Data size: 1625 Basic stats: COMPLETE 
Column stats: COMPLETE
                 Group By Operator
@@ -3345,26 +3349,26 @@ STAGE PLANS:
                     predicate: p_size is not null (type: boolean)
                     Statistics: Num rows: 26 Data size: 2808 Basic stats: 
COMPLETE Column stats: COMPLETE
                     Select Operator
-                      expressions: p_type (type: string), p_size (type: int)
+                      expressions: p_type (type: string), (p_size + 1) (type: 
int)
                       outputColumnNames: _col0, _col1
                       Statistics: Num rows: 26 Data size: 2808 Basic stats: 
COMPLETE Column stats: COMPLETE
                       Reduce Output Operator
-                        key expressions: (_col1 + 1) (type: int)
+                        key expressions: _col1 (type: int)
                         sort order: +
-                        Map-reduce partition columns: (_col1 + 1) (type: int)
+                        Map-reduce partition columns: _col1 (type: int)
                         Statistics: Num rows: 26 Data size: 2808 Basic stats: 
COMPLETE Column stats: COMPLETE
                         value expressions: _col0 (type: string)
                   Filter Operator
                     predicate: (p_size is not null and p_type is not null) 
(type: boolean)
                     Statistics: Num rows: 26 Data size: 2808 Basic stats: 
COMPLETE Column stats: COMPLETE
                     Select Operator
-                      expressions: p_type (type: string), p_size (type: int)
+                      expressions: p_type (type: string), (p_size + 1) (type: 
int)
                       outputColumnNames: _col0, _col1
                       Statistics: Num rows: 26 Data size: 2808 Basic stats: 
COMPLETE Column stats: COMPLETE
                       Reduce Output Operator
-                        key expressions: (_col1 + 1) (type: int)
+                        key expressions: _col1 (type: int)
                         sort order: +
-                        Map-reduce partition columns: (_col1 + 1) (type: int)
+                        Map-reduce partition columns: _col1 (type: int)
                         Statistics: Num rows: 26 Data size: 2808 Basic stats: 
COMPLETE Column stats: COMPLETE
                         value expressions: _col0 (type: string)
             Execution mode: vectorized, llap
@@ -3486,7 +3490,7 @@ STAGE PLANS:
                 condition map:
                      Inner Join 0 to 1
                 keys:
-                  0 (_col1 + 1) (type: int)
+                  0 _col1 (type: int)
                   1 _col0 (type: int)
                 outputColumnNames: _col0, _col2
                 Statistics: Num rows: 16 Data size: 1728 Basic stats: COMPLETE 
Column stats: COMPLETE
@@ -3524,7 +3528,7 @@ STAGE PLANS:
                 condition map:
                      Inner Join 0 to 1
                 keys:
-                  0 (_col1 + 1) (type: int)
+                  0 _col1 (type: int)
                   1 _col0 (type: int)
                 outputColumnNames: _col0, _col2
                 Statistics: Num rows: 16 Data size: 1728 Basic stats: COMPLETE 
Column stats: COMPLETE
@@ -5836,14 +5840,14 @@ STAGE PLANS:
                     predicate: c1 is not null (type: boolean)
                     Statistics: Num rows: 2 Data size: 8 Basic stats: COMPLETE 
Column stats: COMPLETE
                     Select Operator
-                      expressions: c1 (type: int)
-                      outputColumnNames: _col0
-                      Statistics: Num rows: 2 Data size: 8 Basic stats: 
COMPLETE Column stats: COMPLETE
+                      expressions: c1 (type: int), UDFToDouble(c1) (type: 
double)
+                      outputColumnNames: _col0, _col1
+                      Statistics: Num rows: 2 Data size: 24 Basic stats: 
COMPLETE Column stats: COMPLETE
                       Reduce Output Operator
-                        key expressions: UDFToDouble(_col0) (type: double)
+                        key expressions: _col1 (type: double)
                         sort order: +
-                        Map-reduce partition columns: UDFToDouble(_col0) 
(type: double)
-                        Statistics: Num rows: 2 Data size: 8 Basic stats: 
COMPLETE Column stats: COMPLETE
+                        Map-reduce partition columns: _col1 (type: double)
+                        Statistics: Num rows: 2 Data size: 24 Basic stats: 
COMPLETE Column stats: COMPLETE
                         value expressions: _col0 (type: int)
             Execution mode: vectorized, llap
             LLAP IO: no inputs
@@ -5897,12 +5901,16 @@ STAGE PLANS:
                 mode: mergepartial
                 outputColumnNames: _col0
                 Statistics: Num rows: 1 Data size: 88 Basic stats: COMPLETE 
Column stats: COMPLETE
-                Reduce Output Operator
-                  key expressions: UDFToDouble(_col0) (type: double)
-                  sort order: +
-                  Map-reduce partition columns: UDFToDouble(_col0) (type: 
double)
-                  Statistics: Num rows: 1 Data size: 88 Basic stats: COMPLETE 
Column stats: COMPLETE
-                  value expressions: _col0 (type: char(100))
+                Select Operator
+                  expressions: _col0 (type: char(100)), UDFToDouble(_col0) 
(type: double)
+                  outputColumnNames: _col0, _col1
+                  Statistics: Num rows: 1 Data size: 96 Basic stats: COMPLETE 
Column stats: COMPLETE
+                  Reduce Output Operator
+                    key expressions: _col1 (type: double)
+                    sort order: +
+                    Map-reduce partition columns: _col1 (type: double)
+                    Statistics: Num rows: 1 Data size: 96 Basic stats: 
COMPLETE Column stats: COMPLETE
+                    value expressions: _col0 (type: char(100))
         Reducer 6 
             Execution mode: llap
             Reduce Operator Tree:
@@ -5910,12 +5918,12 @@ STAGE PLANS:
                 condition map:
                      Inner Join 0 to 1
                 keys:
-                  0 UDFToDouble(_col0) (type: double)
-                  1 UDFToDouble(_col0) (type: double)
-                outputColumnNames: _col0, _col1
+                  0 _col1 (type: double)
+                  1 _col1 (type: double)
+                outputColumnNames: _col0, _col2
                 Statistics: Num rows: 1 Data size: 92 Basic stats: COMPLETE 
Column stats: COMPLETE
                 Group By Operator
-                  aggregations: count(), count(_col1)
+                  aggregations: count(), count(_col2)
                   keys: _col0 (type: char(100))
                   mode: hash
                   outputColumnNames: _col0, _col1, _col2
@@ -5927,7 +5935,7 @@ STAGE PLANS:
                     Statistics: Num rows: 1 Data size: 104 Basic stats: 
COMPLETE Column stats: COMPLETE
                     value expressions: _col1 (type: bigint), _col2 (type: 
bigint)
                 Group By Operator
-                  keys: _col1 (type: int), _col0 (type: char(100))
+                  keys: _col2 (type: int), _col0 (type: char(100))
                   mode: hash
                   outputColumnNames: _col0, _col1
                   Statistics: Num rows: 1 Data size: 92 Basic stats: COMPLETE 
Column stats: COMPLETE

Reply via email to