http://git-wip-us.apache.org/repos/asf/hive/blob/b597ab2a/ql/src/test/results/clientpositive/explain_logical.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/explain_logical.q.out 
b/ql/src/test/results/clientpositive/explain_logical.q.out
index 4a25a38..79a3050 100644
--- a/ql/src/test/results/clientpositive/explain_logical.q.out
+++ b/ql/src/test/results/clientpositive/explain_logical.q.out
@@ -364,36 +364,37 @@ PREHOOK: type: QUERY
 POSTHOOK: query: EXPLAIN LOGICAL SELECT * FROM V4
 POSTHOOK: type: QUERY
 LOGICAL PLAN:
-$hdt$_0:src 
+$hdt$_0:srcpart 
   TableScan (TS_0)
-    alias: src
+    alias: srcpart
     properties:
       insideView TRUE
-    Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column 
stats: NONE
+    Statistics: Num rows: 2000 Data size: 21248 Basic stats: COMPLETE Column 
stats: NONE
     Filter Operator (FIL_15)
       predicate: key is not null (type: boolean)
-      Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column 
stats: NONE
+      Statistics: Num rows: 2000 Data size: 21248 Basic stats: COMPLETE Column 
stats: NONE
       Select Operator (SEL_2)
-        expressions: key (type: string)
-        outputColumnNames: _col0
-        Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column 
stats: NONE
+        expressions: key (type: string), value (type: string)
+        outputColumnNames: _col0, _col1
+        Statistics: Num rows: 2000 Data size: 21248 Basic stats: COMPLETE 
Column stats: NONE
         Reduce Output Operator (RS_9)
           key expressions: _col0 (type: string)
           sort order: +
           Map-reduce partition columns: _col0 (type: string)
-          Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
+          Statistics: Num rows: 2000 Data size: 21248 Basic stats: COMPLETE 
Column stats: NONE
+          value expressions: _col1 (type: string)
           Join Operator (JOIN_12)
             condition map:
                  Inner Join 0 to 1
-                 Inner Join 1 to 2
+                 Inner Join 0 to 2
             keys:
               0 _col0 (type: string)
               1 _col0 (type: string)
               2 _col0 (type: string)
-            outputColumnNames: _col0, _col2, _col4
+            outputColumnNames: _col1, _col2, _col4
             Statistics: Num rows: 4400 Data size: 46745 Basic stats: COMPLETE 
Column stats: NONE
             Select Operator (SEL_13)
-              expressions: _col0 (type: string), _col2 (type: string), _col4 
(type: string)
+              expressions: _col2 (type: string), _col1 (type: string), _col4 
(type: string)
               outputColumnNames: _col0, _col1, _col2
               Statistics: Num rows: 4400 Data size: 46745 Basic stats: 
COMPLETE Column stats: NONE
               File Output Operator (FS_14)
@@ -403,34 +404,33 @@ $hdt$_0:src
                     input format: 
org.apache.hadoop.mapred.SequenceFileInputFormat
                     output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
                     serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-$hdt$_1:srcpart 
+$hdt$_1:src 
   TableScan (TS_3)
-    alias: srcpart
+    alias: src
     properties:
       insideView TRUE
-    Statistics: Num rows: 2000 Data size: 21248 Basic stats: COMPLETE Column 
stats: NONE
+    Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column 
stats: NONE
     Filter Operator (FIL_16)
       predicate: key is not null (type: boolean)
-      Statistics: Num rows: 2000 Data size: 21248 Basic stats: COMPLETE Column 
stats: NONE
+      Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column 
stats: NONE
       Select Operator (SEL_5)
-        expressions: key (type: string), value (type: string)
-        outputColumnNames: _col0, _col1
-        Statistics: Num rows: 2000 Data size: 21248 Basic stats: COMPLETE 
Column stats: NONE
+        expressions: key (type: string)
+        outputColumnNames: _col0
+        Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column 
stats: NONE
         Reduce Output Operator (RS_10)
           key expressions: _col0 (type: string)
           sort order: +
           Map-reduce partition columns: _col0 (type: string)
-          Statistics: Num rows: 2000 Data size: 21248 Basic stats: COMPLETE 
Column stats: NONE
-          value expressions: _col1 (type: string)
+          Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
           Join Operator (JOIN_12)
             condition map:
                  Inner Join 0 to 1
-                 Inner Join 1 to 2
+                 Inner Join 0 to 2
             keys:
               0 _col0 (type: string)
               1 _col0 (type: string)
               2 _col0 (type: string)
-            outputColumnNames: _col0, _col2, _col4
+            outputColumnNames: _col1, _col2, _col4
             Statistics: Num rows: 4400 Data size: 46745 Basic stats: COMPLETE 
Column stats: NONE
 $hdt$_2:src3 
   TableScan (TS_6)
@@ -454,12 +454,12 @@ $hdt$_2:src3
           Join Operator (JOIN_12)
             condition map:
                  Inner Join 0 to 1
-                 Inner Join 1 to 2
+                 Inner Join 0 to 2
             keys:
               0 _col0 (type: string)
               1 _col0 (type: string)
               2 _col0 (type: string)
-            outputColumnNames: _col0, _col2, _col4
+            outputColumnNames: _col1, _col2, _col4
             Statistics: Num rows: 4400 Data size: 46745 Basic stats: COMPLETE 
Column stats: NONE
 
 PREHOOK: query: -- The table should show up in the explain logical even if none

http://git-wip-us.apache.org/repos/asf/hive/blob/b597ab2a/ql/src/test/results/clientpositive/groupby_sort_1_23.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/groupby_sort_1_23.q.out 
b/ql/src/test/results/clientpositive/groupby_sort_1_23.q.out
index e70f912..6572f6c 100644
--- a/ql/src/test/results/clientpositive/groupby_sort_1_23.q.out
+++ b/ql/src/test/results/clientpositive/groupby_sort_1_23.q.out
@@ -1387,11 +1387,11 @@ STAGE PLANS:
             GatherStats: false
             Select Operator
               expressions: key (type: string)
-              outputColumnNames: key
+              outputColumnNames: _col1
               Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE 
Column stats: NONE
               Group By Operator
-                aggregations: count(key)
-                keys: key (type: string)
+                aggregations: count(1)
+                keys: _col1 (type: string)
                 mode: final
                 outputColumnNames: _col0, _col1
                 Statistics: Num rows: 3 Data size: 12 Basic stats: COMPLETE 
Column stats: NONE
@@ -1482,7 +1482,7 @@ STAGE PLANS:
               name: default.t1
             name: default.t1
       Truncated Path -> Alias:
-        /t1 [t1]
+        /t1 [$hdt$_0:t1]
 
   Stage: Stage-7
     Conditional Operator
@@ -1708,7 +1708,7 @@ SELECT 1, key, count(1) FROM T1 GROUP BY 1, key
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@t1
 POSTHOOK: Output: default@outputtbl3
-POSTHOOK: Lineage: outputtbl3.cnt EXPRESSION [(t1)t1.FieldSchema(name:key, 
type:string, comment:null), ]
+POSTHOOK: Lineage: outputtbl3.cnt EXPRESSION [(t1)t1.null, ]
 POSTHOOK: Lineage: outputtbl3.key1 SIMPLE []
 POSTHOOK: Lineage: outputtbl3.key2 EXPRESSION [(t1)t1.FieldSchema(name:key, 
type:string, comment:null), ]
 PREHOOK: query: SELECT * FROM outputTbl3
@@ -1757,11 +1757,11 @@ STAGE PLANS:
             GatherStats: false
             Select Operator
               expressions: key (type: string), val (type: string)
-              outputColumnNames: key, val
+              outputColumnNames: _col0, _col2
               Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE 
Column stats: NONE
               Group By Operator
-                aggregations: count(val)
-                keys: key (type: string), val (type: string)
+                aggregations: count(1)
+                keys: _col0 (type: string), _col2 (type: string)
                 mode: hash
                 outputColumnNames: _col0, _col1, _col2
                 Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE 
Column stats: NONE
@@ -1826,7 +1826,7 @@ STAGE PLANS:
               name: default.t1
             name: default.t1
       Truncated Path -> Alias:
-        /t1 [t1]
+        /t1 [$hdt$_0:t1]
       Needs Tagging: false
       Reduce Operator Tree:
         Group By Operator
@@ -1912,7 +1912,7 @@ SELECT key, 1, val, count(1) FROM T1 GROUP BY key, 1, val
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@t1
 POSTHOOK: Output: default@outputtbl4
-POSTHOOK: Lineage: outputtbl4.cnt EXPRESSION [(t1)t1.FieldSchema(name:val, 
type:string, comment:null), ]
+POSTHOOK: Lineage: outputtbl4.cnt EXPRESSION [(t1)t1.null, ]
 POSTHOOK: Lineage: outputtbl4.key1 EXPRESSION [(t1)t1.FieldSchema(name:key, 
type:string, comment:null), ]
 POSTHOOK: Lineage: outputtbl4.key2 SIMPLE []
 POSTHOOK: Lineage: outputtbl4.key3 SIMPLE [(t1)t1.FieldSchema(name:val, 
type:string, comment:null), ]
@@ -4123,11 +4123,11 @@ STAGE PLANS:
             GatherStats: false
             Select Operator
               expressions: key (type: string), val (type: string)
-              outputColumnNames: key, val
+              outputColumnNames: _col0, _col2
               Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE 
Column stats: NONE
               Group By Operator
-                aggregations: count(val)
-                keys: key (type: string), val (type: string)
+                aggregations: count(1)
+                keys: _col0 (type: string), _col2 (type: string)
                 mode: final
                 outputColumnNames: _col0, _col1, _col2
                 Statistics: Num rows: 3 Data size: 12 Basic stats: COMPLETE 
Column stats: NONE
@@ -4218,7 +4218,7 @@ STAGE PLANS:
               name: default.t2
             name: default.t2
       Truncated Path -> Alias:
-        /t2 [t2]
+        /t2 [$hdt$_0:t2]
 
   Stage: Stage-7
     Conditional Operator
@@ -4444,7 +4444,7 @@ SELECT key, 1, val, count(1) FROM T2 GROUP BY key, 1, val
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@t2
 POSTHOOK: Output: default@outputtbl4
-POSTHOOK: Lineage: outputtbl4.cnt EXPRESSION [(t2)t2.FieldSchema(name:val, 
type:string, comment:null), ]
+POSTHOOK: Lineage: outputtbl4.cnt EXPRESSION [(t2)t2.null, ]
 POSTHOOK: Lineage: outputtbl4.key1 EXPRESSION [(t2)t2.FieldSchema(name:key, 
type:string, comment:null), ]
 POSTHOOK: Lineage: outputtbl4.key2 SIMPLE []
 POSTHOOK: Lineage: outputtbl4.key3 SIMPLE [(t2)t2.FieldSchema(name:val, 
type:string, comment:null), ]
@@ -4502,11 +4502,11 @@ STAGE PLANS:
             GatherStats: false
             Select Operator
               expressions: key (type: string), val (type: string)
-              outputColumnNames: key, val
+              outputColumnNames: _col0, _col2
               Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE 
Column stats: NONE
               Group By Operator
-                aggregations: count(val)
-                keys: key (type: string), val (type: string)
+                aggregations: count(1)
+                keys: _col0 (type: string), _col2 (type: string)
                 mode: final
                 outputColumnNames: _col0, _col1, _col2
                 Statistics: Num rows: 3 Data size: 12 Basic stats: COMPLETE 
Column stats: NONE
@@ -4597,7 +4597,7 @@ STAGE PLANS:
               name: default.t2
             name: default.t2
       Truncated Path -> Alias:
-        /t2 [t2]
+        /t2 [$hdt$_0:t2]
 
   Stage: Stage-7
     Conditional Operator
@@ -4823,7 +4823,7 @@ SELECT key, 1, val, 2, count(1) FROM T2 GROUP BY key, 1, 
val, 2
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@t2
 POSTHOOK: Output: default@outputtbl5
-POSTHOOK: Lineage: outputtbl5.cnt EXPRESSION [(t2)t2.FieldSchema(name:val, 
type:string, comment:null), ]
+POSTHOOK: Lineage: outputtbl5.cnt EXPRESSION [(t2)t2.null, ]
 POSTHOOK: Lineage: outputtbl5.key1 EXPRESSION [(t2)t2.FieldSchema(name:key, 
type:string, comment:null), ]
 POSTHOOK: Lineage: outputtbl5.key2 SIMPLE []
 POSTHOOK: Lineage: outputtbl5.key3 SIMPLE [(t2)t2.FieldSchema(name:val, 
type:string, comment:null), ]

http://git-wip-us.apache.org/repos/asf/hive/blob/b597ab2a/ql/src/test/results/clientpositive/groupby_sort_skew_1_23.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/groupby_sort_skew_1_23.q.out 
b/ql/src/test/results/clientpositive/groupby_sort_skew_1_23.q.out
index fc52984..ce71354 100644
--- a/ql/src/test/results/clientpositive/groupby_sort_skew_1_23.q.out
+++ b/ql/src/test/results/clientpositive/groupby_sort_skew_1_23.q.out
@@ -1453,11 +1453,11 @@ STAGE PLANS:
             GatherStats: false
             Select Operator
               expressions: key (type: string)
-              outputColumnNames: key
+              outputColumnNames: _col1
               Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE 
Column stats: NONE
               Group By Operator
-                aggregations: count(key)
-                keys: key (type: string)
+                aggregations: count(1)
+                keys: _col1 (type: string)
                 mode: final
                 outputColumnNames: _col0, _col1
                 Statistics: Num rows: 3 Data size: 12 Basic stats: COMPLETE 
Column stats: NONE
@@ -1548,7 +1548,7 @@ STAGE PLANS:
               name: default.t1
             name: default.t1
       Truncated Path -> Alias:
-        /t1 [t1]
+        /t1 [$hdt$_0:t1]
 
   Stage: Stage-7
     Conditional Operator
@@ -1774,7 +1774,7 @@ SELECT 1, key, count(1) FROM T1 GROUP BY 1, key
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@t1
 POSTHOOK: Output: default@outputtbl3
-POSTHOOK: Lineage: outputtbl3.cnt EXPRESSION [(t1)t1.FieldSchema(name:key, 
type:string, comment:null), ]
+POSTHOOK: Lineage: outputtbl3.cnt EXPRESSION [(t1)t1.null, ]
 POSTHOOK: Lineage: outputtbl3.key1 SIMPLE []
 POSTHOOK: Lineage: outputtbl3.key2 EXPRESSION [(t1)t1.FieldSchema(name:key, 
type:string, comment:null), ]
 PREHOOK: query: SELECT * FROM outputTbl3
@@ -1824,11 +1824,11 @@ STAGE PLANS:
             GatherStats: false
             Select Operator
               expressions: key (type: string), val (type: string)
-              outputColumnNames: key, val
+              outputColumnNames: _col0, _col2
               Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE 
Column stats: NONE
               Group By Operator
-                aggregations: count(val)
-                keys: key (type: string), val (type: string)
+                aggregations: count(1)
+                keys: _col0 (type: string), _col2 (type: string)
                 mode: hash
                 outputColumnNames: _col0, _col1, _col2
                 Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE 
Column stats: NONE
@@ -1893,7 +1893,7 @@ STAGE PLANS:
               name: default.t1
             name: default.t1
       Truncated Path -> Alias:
-        /t1 [t1]
+        /t1 [$hdt$_0:t1]
       Needs Tagging: false
       Reduce Operator Tree:
         Group By Operator
@@ -2044,7 +2044,7 @@ SELECT key, 1, val, count(1) FROM T1 GROUP BY key, 1, val
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@t1
 POSTHOOK: Output: default@outputtbl4
-POSTHOOK: Lineage: outputtbl4.cnt EXPRESSION [(t1)t1.FieldSchema(name:val, 
type:string, comment:null), ]
+POSTHOOK: Lineage: outputtbl4.cnt EXPRESSION [(t1)t1.null, ]
 POSTHOOK: Lineage: outputtbl4.key1 EXPRESSION [(t1)t1.FieldSchema(name:key, 
type:string, comment:null), ]
 POSTHOOK: Lineage: outputtbl4.key2 SIMPLE []
 POSTHOOK: Lineage: outputtbl4.key3 SIMPLE [(t1)t1.FieldSchema(name:val, 
type:string, comment:null), ]
@@ -4585,11 +4585,11 @@ STAGE PLANS:
             GatherStats: false
             Select Operator
               expressions: key (type: string), val (type: string)
-              outputColumnNames: key, val
+              outputColumnNames: _col0, _col2
               Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE 
Column stats: NONE
               Group By Operator
-                aggregations: count(val)
-                keys: key (type: string), val (type: string)
+                aggregations: count(1)
+                keys: _col0 (type: string), _col2 (type: string)
                 mode: final
                 outputColumnNames: _col0, _col1, _col2
                 Statistics: Num rows: 3 Data size: 12 Basic stats: COMPLETE 
Column stats: NONE
@@ -4680,7 +4680,7 @@ STAGE PLANS:
               name: default.t2
             name: default.t2
       Truncated Path -> Alias:
-        /t2 [t2]
+        /t2 [$hdt$_0:t2]
 
   Stage: Stage-7
     Conditional Operator
@@ -4906,7 +4906,7 @@ SELECT key, 1, val, count(1) FROM T2 GROUP BY key, 1, val
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@t2
 POSTHOOK: Output: default@outputtbl4
-POSTHOOK: Lineage: outputtbl4.cnt EXPRESSION [(t2)t2.FieldSchema(name:val, 
type:string, comment:null), ]
+POSTHOOK: Lineage: outputtbl4.cnt EXPRESSION [(t2)t2.null, ]
 POSTHOOK: Lineage: outputtbl4.key1 EXPRESSION [(t2)t2.FieldSchema(name:key, 
type:string, comment:null), ]
 POSTHOOK: Lineage: outputtbl4.key2 SIMPLE []
 POSTHOOK: Lineage: outputtbl4.key3 SIMPLE [(t2)t2.FieldSchema(name:val, 
type:string, comment:null), ]
@@ -4964,11 +4964,11 @@ STAGE PLANS:
             GatherStats: false
             Select Operator
               expressions: key (type: string), val (type: string)
-              outputColumnNames: key, val
+              outputColumnNames: _col0, _col2
               Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE 
Column stats: NONE
               Group By Operator
-                aggregations: count(val)
-                keys: key (type: string), val (type: string)
+                aggregations: count(1)
+                keys: _col0 (type: string), _col2 (type: string)
                 mode: final
                 outputColumnNames: _col0, _col1, _col2
                 Statistics: Num rows: 3 Data size: 12 Basic stats: COMPLETE 
Column stats: NONE
@@ -5059,7 +5059,7 @@ STAGE PLANS:
               name: default.t2
             name: default.t2
       Truncated Path -> Alias:
-        /t2 [t2]
+        /t2 [$hdt$_0:t2]
 
   Stage: Stage-7
     Conditional Operator
@@ -5285,7 +5285,7 @@ SELECT key, 1, val, 2, count(1) FROM T2 GROUP BY key, 1, 
val, 2
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@t2
 POSTHOOK: Output: default@outputtbl5
-POSTHOOK: Lineage: outputtbl5.cnt EXPRESSION [(t2)t2.FieldSchema(name:val, 
type:string, comment:null), ]
+POSTHOOK: Lineage: outputtbl5.cnt EXPRESSION [(t2)t2.null, ]
 POSTHOOK: Lineage: outputtbl5.key1 EXPRESSION [(t2)t2.FieldSchema(name:key, 
type:string, comment:null), ]
 POSTHOOK: Lineage: outputtbl5.key2 SIMPLE []
 POSTHOOK: Lineage: outputtbl5.key3 SIMPLE [(t2)t2.FieldSchema(name:val, 
type:string, comment:null), ]

http://git-wip-us.apache.org/repos/asf/hive/blob/b597ab2a/ql/src/test/results/clientpositive/limit_pushdown.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/limit_pushdown.q.out 
b/ql/src/test/results/clientpositive/limit_pushdown.q.out
index 6aaf9b8..898662b 100644
--- a/ql/src/test/results/clientpositive/limit_pushdown.q.out
+++ b/ql/src/test/results/clientpositive/limit_pushdown.q.out
@@ -695,7 +695,17 @@ STAGE PLANS:
     Fetch Operator
       limit: 0
       Processor Tree:
-        ListSink
+        TableScan
+          alias: src
+          Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
+          Select Operator
+            expressions: key (type: string), value (type: string)
+            outputColumnNames: _col0, _col1
+            Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
+            Limit
+              Number of rows: 0
+              Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column 
stats: NONE
+              ListSink
 
 PREHOOK: query: select key,value from src order by key limit 0
 PREHOOK: type: QUERY

http://git-wip-us.apache.org/repos/asf/hive/blob/b597ab2a/ql/src/test/results/clientpositive/limit_pushdown3.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/limit_pushdown3.q.out 
b/ql/src/test/results/clientpositive/limit_pushdown3.q.out
index 8ccda6a..66dc77f 100644
--- a/ql/src/test/results/clientpositive/limit_pushdown3.q.out
+++ b/ql/src/test/results/clientpositive/limit_pushdown3.q.out
@@ -824,7 +824,17 @@ STAGE PLANS:
     Fetch Operator
       limit: 0
       Processor Tree:
-        ListSink
+        TableScan
+          alias: src
+          Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
+          Select Operator
+            expressions: key (type: string), value (type: string)
+            outputColumnNames: _col0, _col1
+            Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
+            Limit
+              Number of rows: 0
+              Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column 
stats: NONE
+              ListSink
 
 PREHOOK: query: select key,value from src order by key limit 0
 PREHOOK: type: QUERY

http://git-wip-us.apache.org/repos/asf/hive/blob/b597ab2a/ql/src/test/results/clientpositive/llap/explainuser_4.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/explainuser_4.q.out 
b/ql/src/test/results/clientpositive/llap/explainuser_4.q.out
index 4ea1488..0978ddd 100644
--- a/ql/src/test/results/clientpositive/llap/explainuser_4.q.out
+++ b/ql/src/test/results/clientpositive/llap/explainuser_4.q.out
@@ -28,11 +28,11 @@ Stage-0
     Stage-1
       Reducer 3 llap
       File Output Operator [FS_12]
-        Select Operator [SEL_11] (rows=7286 width=620)
+        Select Operator [SEL_11] (rows=9759 width=620)
           
Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col17","_col18","_col19","_col20","_col21","_col22","_col23"]
         <-Reducer 2 [SIMPLE_EDGE] llap
           SHUFFLE [RS_10]
-            Merge Join Operator [MERGEJOIN_17] (rows=7286 width=620)
+            Merge Join Operator [MERGEJOIN_17] (rows=9759 width=620)
               
Conds:RS_6._col2=RS_7._col2(Inner),Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col17","_col18","_col19","_col20","_col21","_col22","_col23"]
             <-Map 1 [SIMPLE_EDGE] llap
               SHUFFLE [RS_6]
@@ -46,10 +46,10 @@ Stage-0
             <-Map 4 [SIMPLE_EDGE] llap
               SHUFFLE [RS_7]
                 PartitionCols:_col2
-                Select Operator [SEL_5] (rows=3424 width=251)
+                Select Operator [SEL_5] (rows=4586 width=251)
                   
Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11"]
-                  Filter Operator [FIL_16] (rows=3424 width=251)
-                    predicate:(cint is not null and cbigint is not null and 
cint BETWEEN 1000000 AND 3000000)
+                  Filter Operator [FIL_16] (rows=4586 width=251)
+                    predicate:(cint BETWEEN 1000000 AND 3000000 and cbigint is 
not null)
                     TableScan [TS_3] (rows=12288 width=251)
                       
default@alltypesorc,b,Tbl:COMPLETE,Col:COMPLETE,Output:["ctinyint","csmallint","cint","cbigint","cfloat","cdouble","cstring1","cstring2","ctimestamp1","ctimestamp2","cboolean1","cboolean2"]
 
@@ -113,7 +113,7 @@ Stage-0
           SHUFFLE [RS_11]
             Group By Operator [GBY_10] (rows=1 width=8)
               Output:["_col0"],aggregations:["count()"]
-              Merge Join Operator [MERGEJOIN_19] (rows=7286 width=8)
+              Merge Join Operator [MERGEJOIN_19] (rows=9759 width=8)
                 Conds:RS_6._col0=RS_7._col0(Inner)
               <-Map 1 [SIMPLE_EDGE] llap
                 SHUFFLE [RS_6]
@@ -127,10 +127,10 @@ Stage-0
               <-Map 4 [SIMPLE_EDGE] llap
                 SHUFFLE [RS_7]
                   PartitionCols:_col0
-                  Select Operator [SEL_5] (rows=3424 width=8)
+                  Select Operator [SEL_5] (rows=4586 width=8)
                     Output:["_col0"]
-                    Filter Operator [FIL_18] (rows=3424 width=8)
-                      predicate:(cint is not null and cbigint is not null and 
cint BETWEEN 1000000 AND 3000000)
+                    Filter Operator [FIL_18] (rows=4586 width=8)
+                      predicate:(cint BETWEEN 1000000 AND 3000000 and cbigint 
is not null)
                       TableScan [TS_3] (rows=12288 width=8)
                         
default@alltypesorc,b,Tbl:COMPLETE,Col:COMPLETE,Output:["cint","cbigint"]
 
@@ -193,7 +193,7 @@ Stage-0
                 PartitionCols:_col0
                 Group By Operator [GBY_10] (rows=2765 width=12)
                   Output:["_col0","_col1"],aggregations:["count()"],keys:_col0
-                  Merge Join Operator [MERGEJOIN_21] (rows=7286 width=4)
+                  Merge Join Operator [MERGEJOIN_21] (rows=9759 width=4)
                     Conds:RS_6._col1=RS_7._col0(Inner),Output:["_col0"]
                   <-Map 1 [SIMPLE_EDGE] llap
                     SHUFFLE [RS_6]
@@ -207,10 +207,10 @@ Stage-0
                   <-Map 5 [SIMPLE_EDGE] llap
                     SHUFFLE [RS_7]
                       PartitionCols:_col0
-                      Select Operator [SEL_5] (rows=3424 width=8)
+                      Select Operator [SEL_5] (rows=4586 width=8)
                         Output:["_col0"]
-                        Filter Operator [FIL_20] (rows=3424 width=8)
-                          predicate:(cint is not null and cbigint is not null 
and cint BETWEEN 1000000 AND 3000000)
+                        Filter Operator [FIL_20] (rows=4586 width=8)
+                          predicate:(cint BETWEEN 1000000 AND 3000000 and 
cbigint is not null)
                           TableScan [TS_3] (rows=12288 width=8)
                             
default@alltypesorc,b,Tbl:COMPLETE,Col:COMPLETE,Output:["cint","cbigint"]
 
@@ -281,7 +281,7 @@ Stage-0
                 Select Operator [SEL_5] (rows=6144 width=215)
                   
Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11"]
                   Filter Operator [FIL_16] (rows=6144 width=215)
-                    predicate:(cint is not null and cbigint is not null and 
cint BETWEEN 1000000 AND 3000000)
+                    predicate:(cint BETWEEN 1000000 AND 3000000 and cbigint is 
not null)
                     TableScan [TS_3] (rows=12288 width=215)
                       
default@alltypesorc,b,Tbl:COMPLETE,Col:NONE,Output:["ctinyint","csmallint","cint","cbigint","cfloat","cdouble","cstring1","cstring2","ctimestamp1","ctimestamp2","cboolean1","cboolean2"]
             <-Map 1 [CUSTOM_SIMPLE_EDGE] llap
@@ -362,7 +362,7 @@ Stage-0
                   Select Operator [SEL_5] (rows=6144 width=215)
                     Output:["_col0"]
                     Filter Operator [FIL_18] (rows=6144 width=215)
-                      predicate:(cint is not null and cbigint is not null and 
cint BETWEEN 1000000 AND 3000000)
+                      predicate:(cint BETWEEN 1000000 AND 3000000 and cbigint 
is not null)
                       TableScan [TS_3] (rows=12288 width=215)
                         
default@alltypesorc,b,Tbl:COMPLETE,Col:NONE,Output:["cint","cbigint"]
               <-Map 1 [CUSTOM_SIMPLE_EDGE] llap
@@ -442,7 +442,7 @@ Stage-0
                       Select Operator [SEL_5] (rows=6144 width=215)
                         Output:["_col0"]
                         Filter Operator [FIL_20] (rows=6144 width=215)
-                          predicate:(cint is not null and cbigint is not null 
and cint BETWEEN 1000000 AND 3000000)
+                          predicate:(cint BETWEEN 1000000 AND 3000000 and 
cbigint is not null)
                           TableScan [TS_3] (rows=12288 width=215)
                             
default@alltypesorc,b,Tbl:COMPLETE,Col:NONE,Output:["cint","cbigint"]
                   <-Map 1 [CUSTOM_SIMPLE_EDGE] llap

http://git-wip-us.apache.org/repos/asf/hive/blob/b597ab2a/ql/src/test/results/clientpositive/llap/limit_pushdown.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/limit_pushdown.q.out 
b/ql/src/test/results/clientpositive/llap/limit_pushdown.q.out
index 3fe4837..507791e 100644
--- a/ql/src/test/results/clientpositive/llap/limit_pushdown.q.out
+++ b/ql/src/test/results/clientpositive/llap/limit_pushdown.q.out
@@ -778,7 +778,14 @@ STAGE PLANS:
     Fetch Operator
       limit: 0
       Processor Tree:
-        ListSink
+        TableScan
+          alias: src
+          Select Operator
+            expressions: key (type: string), value (type: string)
+            outputColumnNames: _col0, _col1
+            Limit
+              Number of rows: 0
+              ListSink
 
 PREHOOK: query: select key,value from src order by key limit 0
 PREHOOK: type: QUERY

http://git-wip-us.apache.org/repos/asf/hive/blob/b597ab2a/ql/src/test/results/clientpositive/llap/lineage3.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/lineage3.q.out 
b/ql/src/test/results/clientpositive/llap/lineage3.q.out
index 257c547..1a532da 100644
--- a/ql/src/test/results/clientpositive/llap/lineage3.q.out
+++ b/ql/src/test/results/clientpositive/llap/lineage3.q.out
@@ -116,7 +116,7 @@ order by a.cbigint, a.ctinyint, b.cint, b.ctinyint limit 5
 PREHOOK: type: QUERY
 PREHOOK: Input: default@alltypesorc
 #### A masked pattern was here ####
-{"version":"1.0","engine":"tez","database":"default","hash":"afd760470fc5aa6d3e8348dee03af97f","queryText":"select
 a.cbigint, a.ctinyint, b.cint, b.ctinyint\nfrom\n  (select ctinyint, cbigint 
from alltypesorc\n   union all\n   select ctinyint, cbigint from alltypesorc) 
a\n  inner join\n  alltypesorc b\n  on (a.ctinyint = b.ctinyint)\nwhere 
b.ctinyint < 100 and a.cbigint is not null and b.cint is not null\norder by 
a.cbigint, a.ctinyint, b.cint, b.ctinyint limit 
5","edges":[{"sources":[4],"targets":[0],"expression":"cbigint","edgeType":"PROJECTION"},{"sources":[5],"targets":[1],"expression":"ctinyint","edgeType":"PROJECTION"},{"sources":[6],"targets":[2],"edgeType":"PROJECTION"},{"sources":[5],"targets":[3],"edgeType":"PROJECTION"},{"sources":[5,4],"targets":[0,1,2,3],"expression":"(alltypesorc.ctinyint
 is not null and alltypesorc.cbigint is not null and (alltypesorc.ctinyint < 
100))","edgeType":"PREDICATE"},{"sources":[5],"targets":[0,1,2,3],"expression":"(ctinyint
 = b.ctinyint)","e
 
dgeType":"PREDICATE"},{"sources":[5,6],"targets":[0,1,2,3],"expression":"((b.ctinyint
 < 100) and b.cint is not 
null)","edgeType":"PREDICATE"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"a.cbigint"},{"id":1,"vertexType":"COLUMN","vertexId":"a.ctinyint"},{"id":2,"vertexType":"COLUMN","vertexId":"b.cint"},{"id":3,"vertexType":"COLUMN","vertexId":"b.ctinyint"},{"id":4,"vertexType":"COLUMN","vertexId":"default.alltypesorc.cbigint"},{"id":5,"vertexType":"COLUMN","vertexId":"default.alltypesorc.ctinyint"},{"id":6,"vertexType":"COLUMN","vertexId":"default.alltypesorc.cint"}]}
+{"version":"1.0","engine":"tez","database":"default","hash":"afd760470fc5aa6d3e8348dee03af97f","queryText":"select
 a.cbigint, a.ctinyint, b.cint, b.ctinyint\nfrom\n  (select ctinyint, cbigint 
from alltypesorc\n   union all\n   select ctinyint, cbigint from alltypesorc) 
a\n  inner join\n  alltypesorc b\n  on (a.ctinyint = b.ctinyint)\nwhere 
b.ctinyint < 100 and a.cbigint is not null and b.cint is not null\norder by 
a.cbigint, a.ctinyint, b.cint, b.ctinyint limit 
5","edges":[{"sources":[4],"targets":[0],"expression":"cbigint","edgeType":"PROJECTION"},{"sources":[5],"targets":[1],"expression":"ctinyint","edgeType":"PROJECTION"},{"sources":[6],"targets":[2],"edgeType":"PROJECTION"},{"sources":[5],"targets":[3],"edgeType":"PROJECTION"},{"sources":[5,4],"targets":[0,1,2,3],"expression":"((alltypesorc.ctinyint
 < 100) and alltypesorc.cbigint is not 
null)","edgeType":"PREDICATE"},{"sources":[5],"targets":[0,1,2,3],"expression":"(ctinyint
 = b.ctinyint)","edgeType":"PREDICATE"},{"sources":[5,6
 ],"targets":[0,1,2,3],"expression":"((b.ctinyint < 100) and b.cint is not 
null)","edgeType":"PREDICATE"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"a.cbigint"},{"id":1,"vertexType":"COLUMN","vertexId":"a.ctinyint"},{"id":2,"vertexType":"COLUMN","vertexId":"b.cint"},{"id":3,"vertexType":"COLUMN","vertexId":"b.ctinyint"},{"id":4,"vertexType":"COLUMN","vertexId":"default.alltypesorc.cbigint"},{"id":5,"vertexType":"COLUMN","vertexId":"default.alltypesorc.ctinyint"},{"id":6,"vertexType":"COLUMN","vertexId":"default.alltypesorc.cint"}]}
 -2147311592    -51     -1071480828     -51
 -2147311592    -51     -1071480828     -51
 -2147311592    -51     -1067683781     -51

http://git-wip-us.apache.org/repos/asf/hive/blob/b597ab2a/ql/src/test/results/clientpositive/llap/table_access_keys_stats.q.out
----------------------------------------------------------------------
diff --git 
a/ql/src/test/results/clientpositive/llap/table_access_keys_stats.q.out 
b/ql/src/test/results/clientpositive/llap/table_access_keys_stats.q.out
index 91bdff3..e68f60f 100644
--- a/ql/src/test/results/clientpositive/llap/table_access_keys_stats.q.out
+++ b/ql/src/test/results/clientpositive/llap/table_access_keys_stats.q.out
@@ -77,7 +77,7 @@ SELECT 1, key, count(1) FROM T1 GROUP BY 1, key
 PREHOOK: type: QUERY
 PREHOOK: Input: default@t1
 #### A masked pattern was here ####
-Operator:GBY_2
+Operator:GBY_3
 Table:default@t1
 Keys:key
 
@@ -90,7 +90,7 @@ PREHOOK: query: SELECT key, 1, val, count(1) FROM T1 GROUP BY 
key, 1, val
 PREHOOK: type: QUERY
 PREHOOK: Input: default@t1
 #### A masked pattern was here ####
-Operator:GBY_2
+Operator:GBY_3
 Table:default@t1
 Keys:key,val
 
@@ -104,7 +104,7 @@ PREHOOK: query: SELECT key, 1, val, 2, count(1) FROM T1 
GROUP BY key, 1, val, 2
 PREHOOK: type: QUERY
 PREHOOK: Input: default@t1
 #### A masked pattern was here ####
-Operator:GBY_2
+Operator:GBY_3
 Table:default@t1
 Keys:key,val
 

http://git-wip-us.apache.org/repos/asf/hive/blob/b597ab2a/ql/src/test/results/clientpositive/llap/tez_dynpart_hashjoin_1.q.out
----------------------------------------------------------------------
diff --git 
a/ql/src/test/results/clientpositive/llap/tez_dynpart_hashjoin_1.q.out 
b/ql/src/test/results/clientpositive/llap/tez_dynpart_hashjoin_1.q.out
index 3c6ef9a..5c8db64 100644
--- a/ql/src/test/results/clientpositive/llap/tez_dynpart_hashjoin_1.q.out
+++ b/ql/src/test/results/clientpositive/llap/tez_dynpart_hashjoin_1.q.out
@@ -55,17 +55,17 @@ STAGE PLANS:
                   alias: b
                   Statistics: Num rows: 12288 Data size: 3093170 Basic stats: 
COMPLETE Column stats: COMPLETE
                   Filter Operator
-                    predicate: (cint is not null and cbigint is not null and 
cint BETWEEN 1000000 AND 3000000) (type: boolean)
-                    Statistics: Num rows: 3424 Data size: 862030 Basic stats: 
COMPLETE Column stats: COMPLETE
+                    predicate: (cint BETWEEN 1000000 AND 3000000 and cbigint 
is not null) (type: boolean)
+                    Statistics: Num rows: 4586 Data size: 1154510 Basic stats: 
COMPLETE Column stats: COMPLETE
                     Select Operator
                       expressions: ctinyint (type: tinyint), csmallint (type: 
smallint), cint (type: int), cbigint (type: bigint), cfloat (type: float), 
cdouble (type: double), cstring1 (type: string), cstring2 (type: string), 
ctimestamp1 (type: timestamp), ctimestamp2 (type: timestamp), cboolean1 (type: 
boolean), cboolean2 (type: boolean)
                       outputColumnNames: _col0, _col1, _col2, _col3, _col4, 
_col5, _col6, _col7, _col8, _col9, _col10, _col11
-                      Statistics: Num rows: 3424 Data size: 862030 Basic 
stats: COMPLETE Column stats: COMPLETE
+                      Statistics: Num rows: 4586 Data size: 1154510 Basic 
stats: COMPLETE Column stats: COMPLETE
                       Reduce Output Operator
                         key expressions: _col2 (type: int)
                         sort order: +
                         Map-reduce partition columns: _col2 (type: int)
-                        Statistics: Num rows: 3424 Data size: 862030 Basic 
stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 4586 Data size: 1154510 Basic 
stats: COMPLETE Column stats: COMPLETE
                         value expressions: _col0 (type: tinyint), _col1 (type: 
smallint), _col3 (type: bigint), _col4 (type: float), _col5 (type: double), 
_col6 (type: string), _col7 (type: string), _col8 (type: timestamp), _col9 
(type: timestamp), _col10 (type: boolean), _col11 (type: boolean)
             Execution mode: llap
             LLAP IO: all inputs
@@ -79,11 +79,11 @@ STAGE PLANS:
                   0 _col2 (type: int)
                   1 _col2 (type: int)
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, 
_col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14, _col15, 
_col16, _col17, _col18, _col19, _col20, _col21, _col22, _col23
-                Statistics: Num rows: 7286 Data size: 4517320 Basic stats: 
COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 9759 Data size: 6050580 Basic stats: 
COMPLETE Column stats: COMPLETE
                 Reduce Output Operator
                   key expressions: _col2 (type: int)
                   sort order: +
-                  Statistics: Num rows: 7286 Data size: 4517320 Basic stats: 
COMPLETE Column stats: COMPLETE
+                  Statistics: Num rows: 9759 Data size: 6050580 Basic stats: 
COMPLETE Column stats: COMPLETE
                   value expressions: _col0 (type: tinyint), _col1 (type: 
smallint), _col3 (type: bigint), _col4 (type: float), _col5 (type: double), 
_col6 (type: string), _col7 (type: string), _col8 (type: timestamp), _col9 
(type: timestamp), _col10 (type: boolean), _col11 (type: boolean), _col12 
(type: tinyint), _col13 (type: smallint), _col14 (type: int), _col15 (type: 
bigint), _col16 (type: float), _col17 (type: double), _col18 (type: string), 
_col19 (type: string), _col20 (type: timestamp), _col21 (type: timestamp), 
_col22 (type: boolean), _col23 (type: boolean)
         Reducer 3 
             Execution mode: llap
@@ -91,10 +91,10 @@ STAGE PLANS:
               Select Operator
                 expressions: VALUE._col0 (type: tinyint), VALUE._col1 (type: 
smallint), KEY.reducesinkkey0 (type: int), VALUE._col2 (type: bigint), 
VALUE._col3 (type: float), VALUE._col4 (type: double), VALUE._col5 (type: 
string), VALUE._col6 (type: string), VALUE._col7 (type: timestamp), VALUE._col8 
(type: timestamp), VALUE._col9 (type: boolean), VALUE._col10 (type: boolean), 
VALUE._col11 (type: tinyint), VALUE._col12 (type: smallint), VALUE._col13 
(type: int), VALUE._col14 (type: bigint), VALUE._col15 (type: float), 
VALUE._col16 (type: double), VALUE._col17 (type: string), VALUE._col18 (type: 
string), VALUE._col19 (type: timestamp), VALUE._col20 (type: timestamp), 
VALUE._col21 (type: boolean), VALUE._col22 (type: boolean)
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, 
_col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14, _col15, 
_col16, _col17, _col18, _col19, _col20, _col21, _col22, _col23
-                Statistics: Num rows: 7286 Data size: 4517320 Basic stats: 
COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 9759 Data size: 6050580 Basic stats: 
COMPLETE Column stats: COMPLETE
                 File Output Operator
                   compressed: false
-                  Statistics: Num rows: 7286 Data size: 4517320 Basic stats: 
COMPLETE Column stats: COMPLETE
+                  Statistics: Num rows: 9759 Data size: 6050580 Basic stats: 
COMPLETE Column stats: COMPLETE
                   table:
                       input format: 
org.apache.hadoop.mapred.SequenceFileInputFormat
                       output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
@@ -186,17 +186,17 @@ STAGE PLANS:
                   alias: b
                   Statistics: Num rows: 12288 Data size: 110088 Basic stats: 
COMPLETE Column stats: COMPLETE
                   Filter Operator
-                    predicate: (cint is not null and cbigint is not null and 
cint BETWEEN 1000000 AND 3000000) (type: boolean)
-                    Statistics: Num rows: 3424 Data size: 30684 Basic stats: 
COMPLETE Column stats: COMPLETE
+                    predicate: (cint BETWEEN 1000000 AND 3000000 and cbigint 
is not null) (type: boolean)
+                    Statistics: Num rows: 4586 Data size: 41088 Basic stats: 
COMPLETE Column stats: COMPLETE
                     Select Operator
                       expressions: cint (type: int)
                       outputColumnNames: _col0
-                      Statistics: Num rows: 3424 Data size: 30684 Basic stats: 
COMPLETE Column stats: COMPLETE
+                      Statistics: Num rows: 4586 Data size: 41088 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: 3424 Data size: 30684 Basic 
stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 4586 Data size: 41088 Basic 
stats: COMPLETE Column stats: COMPLETE
             Execution mode: llap
             LLAP IO: all inputs
         Reducer 2 
@@ -208,7 +208,7 @@ STAGE PLANS:
                 keys:
                   0 _col0 (type: int)
                   1 _col0 (type: int)
-                Statistics: Num rows: 7286 Data size: 58288 Basic stats: 
COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 9759 Data size: 78072 Basic stats: 
COMPLETE Column stats: COMPLETE
                 Group By Operator
                   aggregations: count()
                   mode: hash
@@ -315,17 +315,17 @@ STAGE PLANS:
                   alias: b
                   Statistics: Num rows: 12288 Data size: 110088 Basic stats: 
COMPLETE Column stats: COMPLETE
                   Filter Operator
-                    predicate: (cint is not null and cbigint is not null and 
cint BETWEEN 1000000 AND 3000000) (type: boolean)
-                    Statistics: Num rows: 3424 Data size: 30684 Basic stats: 
COMPLETE Column stats: COMPLETE
+                    predicate: (cint BETWEEN 1000000 AND 3000000 and cbigint 
is not null) (type: boolean)
+                    Statistics: Num rows: 4586 Data size: 41088 Basic stats: 
COMPLETE Column stats: COMPLETE
                     Select Operator
                       expressions: cint (type: int)
                       outputColumnNames: _col0
-                      Statistics: Num rows: 3424 Data size: 30684 Basic stats: 
COMPLETE Column stats: COMPLETE
+                      Statistics: Num rows: 4586 Data size: 41088 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: 3424 Data size: 30684 Basic 
stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 4586 Data size: 41088 Basic 
stats: COMPLETE Column stats: COMPLETE
             Execution mode: llap
             LLAP IO: all inputs
         Reducer 2 
@@ -338,7 +338,7 @@ STAGE PLANS:
                   0 _col1 (type: int)
                   1 _col0 (type: int)
                 outputColumnNames: _col0
-                Statistics: Num rows: 7286 Data size: 29144 Basic stats: 
COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 9759 Data size: 39036 Basic stats: 
COMPLETE Column stats: COMPLETE
                 Group By Operator
                   aggregations: count()
                   keys: _col0 (type: smallint)
@@ -468,7 +468,7 @@ STAGE PLANS:
                   alias: b
                   Statistics: Num rows: 12288 Data size: 2641964 Basic stats: 
COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (cint is not null and cbigint is not null and 
cint BETWEEN 1000000 AND 3000000) (type: boolean)
+                    predicate: (cint BETWEEN 1000000 AND 3000000 and cbigint 
is not null) (type: boolean)
                     Statistics: Num rows: 6144 Data size: 1320982 Basic stats: 
COMPLETE Column stats: NONE
                     Select Operator
                       expressions: ctinyint (type: tinyint), csmallint (type: 
smallint), cint (type: int), cbigint (type: bigint), cfloat (type: float), 
cdouble (type: double), cstring1 (type: string), cstring2 (type: string), 
ctimestamp1 (type: timestamp), ctimestamp2 (type: timestamp), cboolean1 (type: 
boolean), cboolean2 (type: boolean)
@@ -602,7 +602,7 @@ STAGE PLANS:
                   alias: b
                   Statistics: Num rows: 12288 Data size: 2641964 Basic stats: 
COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (cint is not null and cbigint is not null and 
cint BETWEEN 1000000 AND 3000000) (type: boolean)
+                    predicate: (cint BETWEEN 1000000 AND 3000000 and cbigint 
is not null) (type: boolean)
                     Statistics: Num rows: 6144 Data size: 1320982 Basic stats: 
COMPLETE Column stats: NONE
                     Select Operator
                       expressions: cint (type: int)
@@ -734,7 +734,7 @@ STAGE PLANS:
                   alias: b
                   Statistics: Num rows: 12288 Data size: 2641964 Basic stats: 
COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (cint is not null and cbigint is not null and 
cint BETWEEN 1000000 AND 3000000) (type: boolean)
+                    predicate: (cint BETWEEN 1000000 AND 3000000 and cbigint 
is not null) (type: boolean)
                     Statistics: Num rows: 6144 Data size: 1320982 Basic stats: 
COMPLETE Column stats: NONE
                     Select Operator
                       expressions: cint (type: int)

http://git-wip-us.apache.org/repos/asf/hive/blob/b597ab2a/ql/src/test/results/clientpositive/llap/tez_vector_dynpart_hashjoin_1.q.out
----------------------------------------------------------------------
diff --git 
a/ql/src/test/results/clientpositive/llap/tez_vector_dynpart_hashjoin_1.q.out 
b/ql/src/test/results/clientpositive/llap/tez_vector_dynpart_hashjoin_1.q.out
index c3aebc7..b2359c1 100644
--- 
a/ql/src/test/results/clientpositive/llap/tez_vector_dynpart_hashjoin_1.q.out
+++ 
b/ql/src/test/results/clientpositive/llap/tez_vector_dynpart_hashjoin_1.q.out
@@ -55,17 +55,17 @@ STAGE PLANS:
                   alias: b
                   Statistics: Num rows: 12288 Data size: 3093170 Basic stats: 
COMPLETE Column stats: COMPLETE
                   Filter Operator
-                    predicate: (cint is not null and cbigint is not null and 
cint BETWEEN 1000000 AND 3000000) (type: boolean)
-                    Statistics: Num rows: 3424 Data size: 862030 Basic stats: 
COMPLETE Column stats: COMPLETE
+                    predicate: (cint BETWEEN 1000000 AND 3000000 and cbigint 
is not null) (type: boolean)
+                    Statistics: Num rows: 4586 Data size: 1154510 Basic stats: 
COMPLETE Column stats: COMPLETE
                     Select Operator
                       expressions: ctinyint (type: tinyint), csmallint (type: 
smallint), cint (type: int), cbigint (type: bigint), cfloat (type: float), 
cdouble (type: double), cstring1 (type: string), cstring2 (type: string), 
ctimestamp1 (type: timestamp), ctimestamp2 (type: timestamp), cboolean1 (type: 
boolean), cboolean2 (type: boolean)
                       outputColumnNames: _col0, _col1, _col2, _col3, _col4, 
_col5, _col6, _col7, _col8, _col9, _col10, _col11
-                      Statistics: Num rows: 3424 Data size: 862030 Basic 
stats: COMPLETE Column stats: COMPLETE
+                      Statistics: Num rows: 4586 Data size: 1154510 Basic 
stats: COMPLETE Column stats: COMPLETE
                       Reduce Output Operator
                         key expressions: _col2 (type: int)
                         sort order: +
                         Map-reduce partition columns: _col2 (type: int)
-                        Statistics: Num rows: 3424 Data size: 862030 Basic 
stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 4586 Data size: 1154510 Basic 
stats: COMPLETE Column stats: COMPLETE
                         value expressions: _col0 (type: tinyint), _col1 (type: 
smallint), _col3 (type: bigint), _col4 (type: float), _col5 (type: double), 
_col6 (type: string), _col7 (type: string), _col8 (type: timestamp), _col9 
(type: timestamp), _col10 (type: boolean), _col11 (type: boolean)
             Execution mode: llap
             LLAP IO: all inputs
@@ -79,11 +79,11 @@ STAGE PLANS:
                   0 _col2 (type: int)
                   1 _col2 (type: int)
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, 
_col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14, _col15, 
_col16, _col17, _col18, _col19, _col20, _col21, _col22, _col23
-                Statistics: Num rows: 7286 Data size: 4517320 Basic stats: 
COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 9759 Data size: 6050580 Basic stats: 
COMPLETE Column stats: COMPLETE
                 Reduce Output Operator
                   key expressions: _col2 (type: int)
                   sort order: +
-                  Statistics: Num rows: 7286 Data size: 4517320 Basic stats: 
COMPLETE Column stats: COMPLETE
+                  Statistics: Num rows: 9759 Data size: 6050580 Basic stats: 
COMPLETE Column stats: COMPLETE
                   value expressions: _col0 (type: tinyint), _col1 (type: 
smallint), _col3 (type: bigint), _col4 (type: float), _col5 (type: double), 
_col6 (type: string), _col7 (type: string), _col8 (type: timestamp), _col9 
(type: timestamp), _col10 (type: boolean), _col11 (type: boolean), _col12 
(type: tinyint), _col13 (type: smallint), _col14 (type: int), _col15 (type: 
bigint), _col16 (type: float), _col17 (type: double), _col18 (type: string), 
_col19 (type: string), _col20 (type: timestamp), _col21 (type: timestamp), 
_col22 (type: boolean), _col23 (type: boolean)
         Reducer 3 
             Execution mode: llap
@@ -91,10 +91,10 @@ STAGE PLANS:
               Select Operator
                 expressions: VALUE._col0 (type: tinyint), VALUE._col1 (type: 
smallint), KEY.reducesinkkey0 (type: int), VALUE._col2 (type: bigint), 
VALUE._col3 (type: float), VALUE._col4 (type: double), VALUE._col5 (type: 
string), VALUE._col6 (type: string), VALUE._col7 (type: timestamp), VALUE._col8 
(type: timestamp), VALUE._col9 (type: boolean), VALUE._col10 (type: boolean), 
VALUE._col11 (type: tinyint), VALUE._col12 (type: smallint), VALUE._col13 
(type: int), VALUE._col14 (type: bigint), VALUE._col15 (type: float), 
VALUE._col16 (type: double), VALUE._col17 (type: string), VALUE._col18 (type: 
string), VALUE._col19 (type: timestamp), VALUE._col20 (type: timestamp), 
VALUE._col21 (type: boolean), VALUE._col22 (type: boolean)
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, 
_col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14, _col15, 
_col16, _col17, _col18, _col19, _col20, _col21, _col22, _col23
-                Statistics: Num rows: 7286 Data size: 4517320 Basic stats: 
COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 9759 Data size: 6050580 Basic stats: 
COMPLETE Column stats: COMPLETE
                 File Output Operator
                   compressed: false
-                  Statistics: Num rows: 7286 Data size: 4517320 Basic stats: 
COMPLETE Column stats: COMPLETE
+                  Statistics: Num rows: 9759 Data size: 6050580 Basic stats: 
COMPLETE Column stats: COMPLETE
                   table:
                       input format: 
org.apache.hadoop.mapred.SequenceFileInputFormat
                       output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
@@ -186,17 +186,17 @@ STAGE PLANS:
                   alias: b
                   Statistics: Num rows: 12288 Data size: 110088 Basic stats: 
COMPLETE Column stats: COMPLETE
                   Filter Operator
-                    predicate: (cint is not null and cbigint is not null and 
cint BETWEEN 1000000 AND 3000000) (type: boolean)
-                    Statistics: Num rows: 3424 Data size: 30684 Basic stats: 
COMPLETE Column stats: COMPLETE
+                    predicate: (cint BETWEEN 1000000 AND 3000000 and cbigint 
is not null) (type: boolean)
+                    Statistics: Num rows: 4586 Data size: 41088 Basic stats: 
COMPLETE Column stats: COMPLETE
                     Select Operator
                       expressions: cint (type: int)
                       outputColumnNames: _col0
-                      Statistics: Num rows: 3424 Data size: 30684 Basic stats: 
COMPLETE Column stats: COMPLETE
+                      Statistics: Num rows: 4586 Data size: 41088 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: 3424 Data size: 30684 Basic 
stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 4586 Data size: 41088 Basic 
stats: COMPLETE Column stats: COMPLETE
             Execution mode: llap
             LLAP IO: all inputs
         Reducer 2 
@@ -208,7 +208,7 @@ STAGE PLANS:
                 keys:
                   0 _col0 (type: int)
                   1 _col0 (type: int)
-                Statistics: Num rows: 7286 Data size: 58288 Basic stats: 
COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 9759 Data size: 78072 Basic stats: 
COMPLETE Column stats: COMPLETE
                 Group By Operator
                   aggregations: count()
                   mode: hash
@@ -315,17 +315,17 @@ STAGE PLANS:
                   alias: b
                   Statistics: Num rows: 12288 Data size: 110088 Basic stats: 
COMPLETE Column stats: COMPLETE
                   Filter Operator
-                    predicate: (cint is not null and cbigint is not null and 
cint BETWEEN 1000000 AND 3000000) (type: boolean)
-                    Statistics: Num rows: 3424 Data size: 30684 Basic stats: 
COMPLETE Column stats: COMPLETE
+                    predicate: (cint BETWEEN 1000000 AND 3000000 and cbigint 
is not null) (type: boolean)
+                    Statistics: Num rows: 4586 Data size: 41088 Basic stats: 
COMPLETE Column stats: COMPLETE
                     Select Operator
                       expressions: cint (type: int)
                       outputColumnNames: _col0
-                      Statistics: Num rows: 3424 Data size: 30684 Basic stats: 
COMPLETE Column stats: COMPLETE
+                      Statistics: Num rows: 4586 Data size: 41088 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: 3424 Data size: 30684 Basic 
stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 4586 Data size: 41088 Basic 
stats: COMPLETE Column stats: COMPLETE
             Execution mode: llap
             LLAP IO: all inputs
         Reducer 2 
@@ -338,7 +338,7 @@ STAGE PLANS:
                   0 _col1 (type: int)
                   1 _col0 (type: int)
                 outputColumnNames: _col0
-                Statistics: Num rows: 7286 Data size: 29144 Basic stats: 
COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 9759 Data size: 39036 Basic stats: 
COMPLETE Column stats: COMPLETE
                 Group By Operator
                   aggregations: count()
                   keys: _col0 (type: smallint)
@@ -468,7 +468,7 @@ STAGE PLANS:
                   alias: b
                   Statistics: Num rows: 12288 Data size: 2641964 Basic stats: 
COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (cint is not null and cbigint is not null and 
cint BETWEEN 1000000 AND 3000000) (type: boolean)
+                    predicate: (cint BETWEEN 1000000 AND 3000000 and cbigint 
is not null) (type: boolean)
                     Statistics: Num rows: 6144 Data size: 1320982 Basic stats: 
COMPLETE Column stats: NONE
                     Select Operator
                       expressions: ctinyint (type: tinyint), csmallint (type: 
smallint), cint (type: int), cbigint (type: bigint), cfloat (type: float), 
cdouble (type: double), cstring1 (type: string), cstring2 (type: string), 
ctimestamp1 (type: timestamp), ctimestamp2 (type: timestamp), cboolean1 (type: 
boolean), cboolean2 (type: boolean)
@@ -602,7 +602,7 @@ STAGE PLANS:
                   alias: b
                   Statistics: Num rows: 12288 Data size: 2641964 Basic stats: 
COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (cint is not null and cbigint is not null and 
cint BETWEEN 1000000 AND 3000000) (type: boolean)
+                    predicate: (cint BETWEEN 1000000 AND 3000000 and cbigint 
is not null) (type: boolean)
                     Statistics: Num rows: 6144 Data size: 1320982 Basic stats: 
COMPLETE Column stats: NONE
                     Select Operator
                       expressions: cint (type: int)
@@ -734,7 +734,7 @@ STAGE PLANS:
                   alias: b
                   Statistics: Num rows: 12288 Data size: 2641964 Basic stats: 
COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (cint is not null and cbigint is not null and 
cint BETWEEN 1000000 AND 3000000) (type: boolean)
+                    predicate: (cint BETWEEN 1000000 AND 3000000 and cbigint 
is not null) (type: boolean)
                     Statistics: Num rows: 6144 Data size: 1320982 Basic stats: 
COMPLETE Column stats: NONE
                     Select Operator
                       expressions: cint (type: int)

http://git-wip-us.apache.org/repos/asf/hive/blob/b597ab2a/ql/src/test/results/clientpositive/offset_limit_ppd_optimizer.q.out
----------------------------------------------------------------------
diff --git 
a/ql/src/test/results/clientpositive/offset_limit_ppd_optimizer.q.out 
b/ql/src/test/results/clientpositive/offset_limit_ppd_optimizer.q.out
index 14cde78..71766a7 100644
--- a/ql/src/test/results/clientpositive/offset_limit_ppd_optimizer.q.out
+++ b/ql/src/test/results/clientpositive/offset_limit_ppd_optimizer.q.out
@@ -695,7 +695,17 @@ STAGE PLANS:
     Fetch Operator
       limit: 0
       Processor Tree:
-        ListSink
+        TableScan
+          alias: src
+          Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
+          Select Operator
+            expressions: key (type: string), value (type: string)
+            outputColumnNames: _col0, _col1
+            Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
+            Limit
+              Number of rows: 0
+              Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column 
stats: NONE
+              ListSink
 
 PREHOOK: query: select key,value from src order by key limit 0,0
 PREHOOK: type: QUERY

http://git-wip-us.apache.org/repos/asf/hive/blob/b597ab2a/ql/src/test/results/clientpositive/perf/query75.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/perf/query75.q.out 
b/ql/src/test/results/clientpositive/perf/query75.q.out
index 0c72248..f78ce8a 100644
--- a/ql/src/test/results/clientpositive/perf/query75.q.out
+++ b/ql/src/test/results/clientpositive/perf/query75.q.out
@@ -81,7 +81,7 @@ Stage-0
                                         Select Operator [SEL_82] (rows=231000 
width=1436)
                                           
Output:["_col0","_col1","_col2","_col3","_col5"]
                                           Filter Operator [FIL_231] 
(rows=231000 width=1436)
-                                            predicate:((i_category = 'Sports') 
and i_item_sk is not null and i_brand_id is not null and i_class_id is not null 
and i_category_id is not null)
+                                            predicate:((i_category = 'Sports') 
and i_item_sk is not null and i_brand_id is not null and i_class_id is not null 
and i_category_id is not null and i_manufact_id is not null)
                                             TableScan [TS_80] (rows=462000 
width=1436)
                                               
default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk","i_brand_id","i_class_id","i_category_id","i_category","i_manufact_id"]
                                     <-Reducer 27 [SIMPLE_EDGE]
@@ -136,7 +136,7 @@ Stage-0
                                         Select Operator [SEL_104] (rows=231000 
width=1436)
                                           
Output:["_col0","_col1","_col2","_col3","_col5"]
                                           Filter Operator [FIL_235] 
(rows=231000 width=1436)
-                                            predicate:((i_category = 'Sports') 
and i_item_sk is not null and i_brand_id is not null and i_class_id is not null 
and i_category_id is not null)
+                                            predicate:((i_category = 'Sports') 
and i_item_sk is not null and i_brand_id is not null and i_class_id is not null 
and i_category_id is not null and i_manufact_id is not null)
                                             TableScan [TS_102] (rows=462000 
width=1436)
                                               
default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk","i_brand_id","i_class_id","i_category_id","i_category","i_manufact_id"]
                                     <-Reducer 36 [SIMPLE_EDGE]
@@ -191,7 +191,7 @@ Stage-0
                                         Select Operator [SEL_128] (rows=231000 
width=1436)
                                           
Output:["_col0","_col1","_col2","_col3","_col5"]
                                           Filter Operator [FIL_239] 
(rows=231000 width=1436)
-                                            predicate:((i_category = 'Sports') 
and i_item_sk is not null and i_brand_id is not null and i_class_id is not null 
and i_category_id is not null)
+                                            predicate:((i_category = 'Sports') 
and i_item_sk is not null and i_brand_id is not null and i_class_id is not null 
and i_category_id is not null and i_manufact_id is not null)
                                             TableScan [TS_126] (rows=462000 
width=1436)
                                               
default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk","i_brand_id","i_class_id","i_category_id","i_category","i_manufact_id"]
                                     <-Reducer 43 [SIMPLE_EDGE]
@@ -252,7 +252,7 @@ Stage-0
                                         Select Operator [SEL_30] (rows=231000 
width=1436)
                                           
Output:["_col0","_col1","_col2","_col3","_col5"]
                                           Filter Operator [FIL_223] 
(rows=231000 width=1436)
-                                            predicate:((i_category = 'Sports') 
and i_item_sk is not null and i_brand_id is not null and i_class_id is not null 
and i_category_id is not null)
+                                            predicate:((i_category = 'Sports') 
and i_item_sk is not null and i_brand_id is not null and i_class_id is not null 
and i_category_id is not null and i_manufact_id is not null)
                                             TableScan [TS_28] (rows=462000 
width=1436)
                                               
default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk","i_brand_id","i_class_id","i_category_id","i_category","i_manufact_id"]
                                     <-Reducer 13 [SIMPLE_EDGE]
@@ -307,7 +307,7 @@ Stage-0
                                         Select Operator [SEL_54] (rows=231000 
width=1436)
                                           
Output:["_col0","_col1","_col2","_col3","_col5"]
                                           Filter Operator [FIL_227] 
(rows=231000 width=1436)
-                                            predicate:((i_category = 'Sports') 
and i_item_sk is not null and i_brand_id is not null and i_class_id is not null 
and i_category_id is not null)
+                                            predicate:((i_category = 'Sports') 
and i_item_sk is not null and i_brand_id is not null and i_class_id is not null 
and i_category_id is not null and i_manufact_id is not null)
                                             TableScan [TS_52] (rows=462000 
width=1436)
                                               
default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk","i_brand_id","i_class_id","i_category_id","i_category","i_manufact_id"]
                                     <-Reducer 20 [SIMPLE_EDGE]
@@ -362,7 +362,7 @@ Stage-0
                                         Select Operator [SEL_8] (rows=231000 
width=1436)
                                           
Output:["_col0","_col1","_col2","_col3","_col5"]
                                           Filter Operator [FIL_219] 
(rows=231000 width=1436)
-                                            predicate:((i_category = 'Sports') 
and i_item_sk is not null and i_brand_id is not null and i_class_id is not null 
and i_category_id is not null)
+                                            predicate:((i_category = 'Sports') 
and i_item_sk is not null and i_brand_id is not null and i_class_id is not null 
and i_category_id is not null and i_manufact_id is not null)
                                             TableScan [TS_6] (rows=462000 
width=1436)
                                               
default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk","i_brand_id","i_class_id","i_category_id","i_category","i_manufact_id"]
                                     <-Reducer 2 [SIMPLE_EDGE]

http://git-wip-us.apache.org/repos/asf/hive/blob/b597ab2a/ql/src/test/results/clientpositive/spark/groupby_sort_1_23.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/groupby_sort_1_23.q.out 
b/ql/src/test/results/clientpositive/spark/groupby_sort_1_23.q.out
index c6a7982..92ca67b 100644
--- a/ql/src/test/results/clientpositive/spark/groupby_sort_1_23.q.out
+++ b/ql/src/test/results/clientpositive/spark/groupby_sort_1_23.q.out
@@ -836,11 +836,11 @@ STAGE PLANS:
                   GatherStats: false
                   Select Operator
                     expressions: key (type: string)
-                    outputColumnNames: key
+                    outputColumnNames: _col1
                     Statistics: Num rows: 6 Data size: 24 Basic stats: 
COMPLETE Column stats: NONE
                     Group By Operator
-                      aggregations: count(key)
-                      keys: key (type: string)
+                      aggregations: count(1)
+                      keys: _col1 (type: string)
                       mode: final
                       outputColumnNames: _col0, _col1
                       Statistics: Num rows: 3 Data size: 12 Basic stats: 
COMPLETE Column stats: NONE
@@ -974,7 +974,7 @@ SELECT 1, key, count(1) FROM T1 GROUP BY 1, key
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@t1
 POSTHOOK: Output: default@outputtbl3
-POSTHOOK: Lineage: outputtbl3.cnt EXPRESSION [(t1)t1.FieldSchema(name:key, 
type:string, comment:null), ]
+POSTHOOK: Lineage: outputtbl3.cnt EXPRESSION [(t1)t1.null, ]
 POSTHOOK: Lineage: outputtbl3.key1 SIMPLE []
 POSTHOOK: Lineage: outputtbl3.key2 EXPRESSION [(t1)t1.FieldSchema(name:key, 
type:string, comment:null), ]
 PREHOOK: query: SELECT * FROM outputTbl3
@@ -1028,11 +1028,11 @@ STAGE PLANS:
                   GatherStats: false
                   Select Operator
                     expressions: key (type: string), val (type: string)
-                    outputColumnNames: key, val
+                    outputColumnNames: _col0, _col2
                     Statistics: Num rows: 6 Data size: 24 Basic stats: 
COMPLETE Column stats: NONE
                     Group By Operator
-                      aggregations: count(val)
-                      keys: key (type: string), val (type: string)
+                      aggregations: count(1)
+                      keys: _col0 (type: string), _col2 (type: string)
                       mode: hash
                       outputColumnNames: _col0, _col1, _col2
                       Statistics: Num rows: 6 Data size: 24 Basic stats: 
COMPLETE Column stats: NONE
@@ -1184,7 +1184,7 @@ SELECT key, 1, val, count(1) FROM T1 GROUP BY key, 1, val
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@t1
 POSTHOOK: Output: default@outputtbl4
-POSTHOOK: Lineage: outputtbl4.cnt EXPRESSION [(t1)t1.FieldSchema(name:val, 
type:string, comment:null), ]
+POSTHOOK: Lineage: outputtbl4.cnt EXPRESSION [(t1)t1.null, ]
 POSTHOOK: Lineage: outputtbl4.key1 EXPRESSION [(t1)t1.FieldSchema(name:key, 
type:string, comment:null), ]
 POSTHOOK: Lineage: outputtbl4.key2 SIMPLE []
 POSTHOOK: Lineage: outputtbl4.key3 SIMPLE [(t1)t1.FieldSchema(name:val, 
type:string, comment:null), ]
@@ -3074,11 +3074,11 @@ STAGE PLANS:
                   GatherStats: false
                   Select Operator
                     expressions: key (type: string), val (type: string)
-                    outputColumnNames: key, val
+                    outputColumnNames: _col0, _col2
                     Statistics: Num rows: 6 Data size: 24 Basic stats: 
COMPLETE Column stats: NONE
                     Group By Operator
-                      aggregations: count(val)
-                      keys: key (type: string), val (type: string)
+                      aggregations: count(1)
+                      keys: _col0 (type: string), _col2 (type: string)
                       mode: final
                       outputColumnNames: _col0, _col1, _col2
                       Statistics: Num rows: 3 Data size: 12 Basic stats: 
COMPLETE Column stats: NONE
@@ -3212,7 +3212,7 @@ SELECT key, 1, val, count(1) FROM T2 GROUP BY key, 1, val
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@t2
 POSTHOOK: Output: default@outputtbl4
-POSTHOOK: Lineage: outputtbl4.cnt EXPRESSION [(t2)t2.FieldSchema(name:val, 
type:string, comment:null), ]
+POSTHOOK: Lineage: outputtbl4.cnt EXPRESSION [(t2)t2.null, ]
 POSTHOOK: Lineage: outputtbl4.key1 EXPRESSION [(t2)t2.FieldSchema(name:key, 
type:string, comment:null), ]
 POSTHOOK: Lineage: outputtbl4.key2 SIMPLE []
 POSTHOOK: Lineage: outputtbl4.key3 SIMPLE [(t2)t2.FieldSchema(name:val, 
type:string, comment:null), ]
@@ -3268,11 +3268,11 @@ STAGE PLANS:
                   GatherStats: false
                   Select Operator
                     expressions: key (type: string), val (type: string)
-                    outputColumnNames: key, val
+                    outputColumnNames: _col0, _col2
                     Statistics: Num rows: 6 Data size: 24 Basic stats: 
COMPLETE Column stats: NONE
                     Group By Operator
-                      aggregations: count(val)
-                      keys: key (type: string), val (type: string)
+                      aggregations: count(1)
+                      keys: _col0 (type: string), _col2 (type: string)
                       mode: final
                       outputColumnNames: _col0, _col1, _col2
                       Statistics: Num rows: 3 Data size: 12 Basic stats: 
COMPLETE Column stats: NONE
@@ -3406,7 +3406,7 @@ SELECT key, 1, val, 2, count(1) FROM T2 GROUP BY key, 1, 
val, 2
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@t2
 POSTHOOK: Output: default@outputtbl5
-POSTHOOK: Lineage: outputtbl5.cnt EXPRESSION [(t2)t2.FieldSchema(name:val, 
type:string, comment:null), ]
+POSTHOOK: Lineage: outputtbl5.cnt EXPRESSION [(t2)t2.null, ]
 POSTHOOK: Lineage: outputtbl5.key1 EXPRESSION [(t2)t2.FieldSchema(name:key, 
type:string, comment:null), ]
 POSTHOOK: Lineage: outputtbl5.key2 SIMPLE []
 POSTHOOK: Lineage: outputtbl5.key3 SIMPLE [(t2)t2.FieldSchema(name:val, 
type:string, comment:null), ]

http://git-wip-us.apache.org/repos/asf/hive/blob/b597ab2a/ql/src/test/results/clientpositive/spark/groupby_sort_skew_1_23.q.out
----------------------------------------------------------------------
diff --git 
a/ql/src/test/results/clientpositive/spark/groupby_sort_skew_1_23.q.out 
b/ql/src/test/results/clientpositive/spark/groupby_sort_skew_1_23.q.out
index a438124..f7f4dbb 100644
--- a/ql/src/test/results/clientpositive/spark/groupby_sort_skew_1_23.q.out
+++ b/ql/src/test/results/clientpositive/spark/groupby_sort_skew_1_23.q.out
@@ -855,11 +855,11 @@ STAGE PLANS:
                   GatherStats: false
                   Select Operator
                     expressions: key (type: string)
-                    outputColumnNames: key
+                    outputColumnNames: _col1
                     Statistics: Num rows: 6 Data size: 24 Basic stats: 
COMPLETE Column stats: NONE
                     Group By Operator
-                      aggregations: count(key)
-                      keys: key (type: string)
+                      aggregations: count(1)
+                      keys: _col1 (type: string)
                       mode: final
                       outputColumnNames: _col0, _col1
                       Statistics: Num rows: 3 Data size: 12 Basic stats: 
COMPLETE Column stats: NONE
@@ -993,7 +993,7 @@ SELECT 1, key, count(1) FROM T1 GROUP BY 1, key
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@t1
 POSTHOOK: Output: default@outputtbl3
-POSTHOOK: Lineage: outputtbl3.cnt EXPRESSION [(t1)t1.FieldSchema(name:key, 
type:string, comment:null), ]
+POSTHOOK: Lineage: outputtbl3.cnt EXPRESSION [(t1)t1.null, ]
 POSTHOOK: Lineage: outputtbl3.key1 SIMPLE []
 POSTHOOK: Lineage: outputtbl3.key2 EXPRESSION [(t1)t1.FieldSchema(name:key, 
type:string, comment:null), ]
 PREHOOK: query: SELECT * FROM outputTbl3
@@ -1048,11 +1048,11 @@ STAGE PLANS:
                   GatherStats: false
                   Select Operator
                     expressions: key (type: string), val (type: string)
-                    outputColumnNames: key, val
+                    outputColumnNames: _col0, _col2
                     Statistics: Num rows: 6 Data size: 24 Basic stats: 
COMPLETE Column stats: NONE
                     Group By Operator
-                      aggregations: count(val)
-                      keys: key (type: string), val (type: string)
+                      aggregations: count(1)
+                      keys: _col0 (type: string), _col2 (type: string)
                       mode: hash
                       outputColumnNames: _col0, _col1, _col2
                       Statistics: Num rows: 6 Data size: 24 Basic stats: 
COMPLETE Column stats: NONE
@@ -1222,7 +1222,7 @@ SELECT key, 1, val, count(1) FROM T1 GROUP BY key, 1, val
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@t1
 POSTHOOK: Output: default@outputtbl4
-POSTHOOK: Lineage: outputtbl4.cnt EXPRESSION [(t1)t1.FieldSchema(name:val, 
type:string, comment:null), ]
+POSTHOOK: Lineage: outputtbl4.cnt EXPRESSION [(t1)t1.null, ]
 POSTHOOK: Lineage: outputtbl4.key1 EXPRESSION [(t1)t1.FieldSchema(name:key, 
type:string, comment:null), ]
 POSTHOOK: Lineage: outputtbl4.key2 SIMPLE []
 POSTHOOK: Lineage: outputtbl4.key3 SIMPLE [(t1)t1.FieldSchema(name:val, 
type:string, comment:null), ]
@@ -3207,11 +3207,11 @@ STAGE PLANS:
                   GatherStats: false
                   Select Operator
                     expressions: key (type: string), val (type: string)
-                    outputColumnNames: key, val
+                    outputColumnNames: _col0, _col2
                     Statistics: Num rows: 6 Data size: 24 Basic stats: 
COMPLETE Column stats: NONE
                     Group By Operator
-                      aggregations: count(val)
-                      keys: key (type: string), val (type: string)
+                      aggregations: count(1)
+                      keys: _col0 (type: string), _col2 (type: string)
                       mode: final
                       outputColumnNames: _col0, _col1, _col2
                       Statistics: Num rows: 3 Data size: 12 Basic stats: 
COMPLETE Column stats: NONE
@@ -3345,7 +3345,7 @@ SELECT key, 1, val, count(1) FROM T2 GROUP BY key, 1, val
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@t2
 POSTHOOK: Output: default@outputtbl4
-POSTHOOK: Lineage: outputtbl4.cnt EXPRESSION [(t2)t2.FieldSchema(name:val, 
type:string, comment:null), ]
+POSTHOOK: Lineage: outputtbl4.cnt EXPRESSION [(t2)t2.null, ]
 POSTHOOK: Lineage: outputtbl4.key1 EXPRESSION [(t2)t2.FieldSchema(name:key, 
type:string, comment:null), ]
 POSTHOOK: Lineage: outputtbl4.key2 SIMPLE []
 POSTHOOK: Lineage: outputtbl4.key3 SIMPLE [(t2)t2.FieldSchema(name:val, 
type:string, comment:null), ]
@@ -3401,11 +3401,11 @@ STAGE PLANS:
                   GatherStats: false
                   Select Operator
                     expressions: key (type: string), val (type: string)
-                    outputColumnNames: key, val
+                    outputColumnNames: _col0, _col2
                     Statistics: Num rows: 6 Data size: 24 Basic stats: 
COMPLETE Column stats: NONE
                     Group By Operator
-                      aggregations: count(val)
-                      keys: key (type: string), val (type: string)
+                      aggregations: count(1)
+                      keys: _col0 (type: string), _col2 (type: string)
                       mode: final
                       outputColumnNames: _col0, _col1, _col2
                       Statistics: Num rows: 3 Data size: 12 Basic stats: 
COMPLETE Column stats: NONE
@@ -3539,7 +3539,7 @@ SELECT key, 1, val, 2, count(1) FROM T2 GROUP BY key, 1, 
val, 2
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@t2
 POSTHOOK: Output: default@outputtbl5
-POSTHOOK: Lineage: outputtbl5.cnt EXPRESSION [(t2)t2.FieldSchema(name:val, 
type:string, comment:null), ]
+POSTHOOK: Lineage: outputtbl5.cnt EXPRESSION [(t2)t2.null, ]
 POSTHOOK: Lineage: outputtbl5.key1 EXPRESSION [(t2)t2.FieldSchema(name:key, 
type:string, comment:null), ]
 POSTHOOK: Lineage: outputtbl5.key2 SIMPLE []
 POSTHOOK: Lineage: outputtbl5.key3 SIMPLE [(t2)t2.FieldSchema(name:val, 
type:string, comment:null), ]

http://git-wip-us.apache.org/repos/asf/hive/blob/b597ab2a/ql/src/test/results/clientpositive/spark/limit_pushdown.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/limit_pushdown.q.out 
b/ql/src/test/results/clientpositive/spark/limit_pushdown.q.out
index 67c6e70..95de5b1 100644
--- a/ql/src/test/results/clientpositive/spark/limit_pushdown.q.out
+++ b/ql/src/test/results/clientpositive/spark/limit_pushdown.q.out
@@ -746,7 +746,14 @@ STAGE PLANS:
     Fetch Operator
       limit: 0
       Processor Tree:
-        ListSink
+        TableScan
+          alias: src
+          Select Operator
+            expressions: key (type: string), value (type: string)
+            outputColumnNames: _col0, _col1
+            Limit
+              Number of rows: 0
+              ListSink
 
 PREHOOK: query: select key,value from src order by key limit 0
 PREHOOK: type: QUERY

http://git-wip-us.apache.org/repos/asf/hive/blob/b597ab2a/ql/src/test/results/clientpositive/spark/table_access_keys_stats.q.out
----------------------------------------------------------------------
diff --git 
a/ql/src/test/results/clientpositive/spark/table_access_keys_stats.q.out 
b/ql/src/test/results/clientpositive/spark/table_access_keys_stats.q.out
index e26ccec..07727d4 100644
--- a/ql/src/test/results/clientpositive/spark/table_access_keys_stats.q.out
+++ b/ql/src/test/results/clientpositive/spark/table_access_keys_stats.q.out
@@ -77,7 +77,7 @@ SELECT 1, key, count(1) FROM T1 GROUP BY 1, key
 PREHOOK: type: QUERY
 PREHOOK: Input: default@t1
 #### A masked pattern was here ####
-Operator:GBY_2
+Operator:GBY_3
 Table:default@t1
 Keys:key
 
@@ -90,7 +90,7 @@ PREHOOK: query: SELECT key, 1, val, count(1) FROM T1 GROUP BY 
key, 1, val
 PREHOOK: type: QUERY
 PREHOOK: Input: default@t1
 #### A masked pattern was here ####
-Operator:GBY_2
+Operator:GBY_3
 Table:default@t1
 Keys:key,val
 
@@ -104,7 +104,7 @@ PREHOOK: query: SELECT key, 1, val, 2, count(1) FROM T1 
GROUP BY key, 1, val, 2
 PREHOOK: type: QUERY
 PREHOOK: Input: default@t1
 #### A masked pattern was here ####
-Operator:GBY_2
+Operator:GBY_3
 Table:default@t1
 Keys:key,val
 

http://git-wip-us.apache.org/repos/asf/hive/blob/b597ab2a/ql/src/test/results/clientpositive/tez/explainanalyze_4.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/tez/explainanalyze_4.q.out 
b/ql/src/test/results/clientpositive/tez/explainanalyze_4.q.out
index 3426d19..9a3d59f 100644
--- a/ql/src/test/results/clientpositive/tez/explainanalyze_4.q.out
+++ b/ql/src/test/results/clientpositive/tez/explainanalyze_4.q.out
@@ -46,11 +46,11 @@ Stage-0
     Stage-1
       Reducer 3
       File Output Operator [FS_12]
-        Select Operator [SEL_11] (rows=7286/10 width=620)
+        Select Operator [SEL_11] (rows=9759/10 width=620)
           
Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col17","_col18","_col19","_col20","_col21","_col22","_col23"]
         <-Reducer 2 [SIMPLE_EDGE]
           SHUFFLE [RS_10]
-            Merge Join Operator [MERGEJOIN_17] (rows=7286/10 width=620)
+            Merge Join Operator [MERGEJOIN_17] (rows=9759/10 width=620)
               
Conds:RS_6._col2=RS_7._col2(Inner),Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col17","_col18","_col19","_col20","_col21","_col22","_col23"]
             <-Map 1 [SIMPLE_EDGE]
               SHUFFLE [RS_6]
@@ -64,10 +64,10 @@ Stage-0
             <-Map 4 [SIMPLE_EDGE]
               SHUFFLE [RS_7]
                 PartitionCols:_col2
-                Select Operator [SEL_5] (rows=3424/10 width=251)
+                Select Operator [SEL_5] (rows=4586/10 width=251)
                   
Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11"]
-                  Filter Operator [FIL_16] (rows=3424/10 width=251)
-                    predicate:(cint is not null and cbigint is not null and 
cint BETWEEN 1000000 AND 3000000)
+                  Filter Operator [FIL_16] (rows=4586/10 width=251)
+                    predicate:(cint BETWEEN 1000000 AND 3000000 and cbigint is 
not null)
                     TableScan [TS_3] (rows=12288/12288 width=251)
                       
default@alltypesorc,b,Tbl:COMPLETE,Col:COMPLETE,Output:["ctinyint","csmallint","cint","cbigint","cfloat","cdouble","cstring1","cstring2","ctimestamp1","ctimestamp2","cboolean1","cboolean2"]
 
@@ -147,7 +147,7 @@ Stage-0
           SHUFFLE [RS_11]
             Group By Operator [GBY_10] (rows=1/1 width=8)
               Output:["_col0"],aggregations:["count()"]
-              Merge Join Operator [MERGEJOIN_19] (rows=7286/10 width=8)
+              Merge Join Operator [MERGEJOIN_19] (rows=9759/10 width=8)
                 Conds:RS_6._col0=RS_7._col0(Inner)
               <-Map 1 [SIMPLE_EDGE]
                 SHUFFLE [RS_6]
@@ -161,10 +161,10 @@ Stage-0
               <-Map 4 [SIMPLE_EDGE]
                 SHUFFLE [RS_7]
                   PartitionCols:_col0
-                  Select Operator [SEL_5] (rows=3424/10 width=8)
+                  Select Operator [SEL_5] (rows=4586/10 width=8)
                     Output:["_col0"]
-                    Filter Operator [FIL_18] (rows=3424/10 width=8)
-                      predicate:(cint is not null and cbigint is not null and 
cint BETWEEN 1000000 AND 3000000)
+                    Filter Operator [FIL_18] (rows=4586/10 width=8)
+                      predicate:(cint BETWEEN 1000000 AND 3000000 and cbigint 
is not null)
                       TableScan [TS_3] (rows=12288/12288 width=8)
                         
default@alltypesorc,b,Tbl:COMPLETE,Col:COMPLETE,Output:["cint","cbigint"]
 
@@ -247,7 +247,7 @@ Stage-0
                 PartitionCols:_col0
                 Group By Operator [GBY_10] (rows=2765/5 width=12)
                   Output:["_col0","_col1"],aggregations:["count()"],keys:_col0
-                  Merge Join Operator [MERGEJOIN_21] (rows=7286/10 width=4)
+                  Merge Join Operator [MERGEJOIN_21] (rows=9759/10 width=4)
                     Conds:RS_6._col1=RS_7._col0(Inner),Output:["_col0"]
                   <-Map 1 [SIMPLE_EDGE]
                     SHUFFLE [RS_6]
@@ -261,10 +261,10 @@ Stage-0
                   <-Map 5 [SIMPLE_EDGE]
                     SHUFFLE [RS_7]
                       PartitionCols:_col0
-                      Select Operator [SEL_5] (rows=3424/10 width=8)
+                      Select Operator [SEL_5] (rows=4586/10 width=8)
                         Output:["_col0"]
-                        Filter Operator [FIL_20] (rows=3424/10 width=8)
-                          predicate:(cint is not null and cbigint is not null 
and cint BETWEEN 1000000 AND 3000000)
+                        Filter Operator [FIL_20] (rows=4586/10 width=8)
+                          predicate:(cint BETWEEN 1000000 AND 3000000 and 
cbigint is not null)
                           TableScan [TS_3] (rows=12288/12288 width=8)
                             
default@alltypesorc,b,Tbl:COMPLETE,Col:COMPLETE,Output:["cint","cbigint"]
 
@@ -353,7 +353,7 @@ Stage-0
                 Select Operator [SEL_5] (rows=6144/10 width=215)
                   
Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11"]
                   Filter Operator [FIL_16] (rows=6144/10 width=215)
-                    predicate:(cint is not null and cbigint is not null and 
cint BETWEEN 1000000 AND 3000000)
+                    predicate:(cint BETWEEN 1000000 AND 3000000 and cbigint is 
not null)
                     TableScan [TS_3] (rows=12288/12288 width=215)
                       
default@alltypesorc,b,Tbl:COMPLETE,Col:NONE,Output:["ctinyint","csmallint","cint","cbigint","cfloat","cdouble","cstring1","cstring2","ctimestamp1","ctimestamp2","cboolean1","cboolean2"]
             <-Map 1 [CUSTOM_SIMPLE_EDGE]
@@ -450,7 +450,7 @@ Stage-0
                   Select Operator [SEL_5] (rows=6144/10 width=215)
                     Output:["_col0"]
                     Filter Operator [FIL_18] (rows=6144/10 width=215)
-                      predicate:(cint is not null and cbigint is not null and 
cint BETWEEN 1000000 AND 3000000)
+                      predicate:(cint BETWEEN 1000000 AND 3000000 and cbigint 
is not null)
                       TableScan [TS_3] (rows=12288/12288 width=215)
                         
default@alltypesorc,b,Tbl:COMPLETE,Col:NONE,Output:["cint","cbigint"]
               <-Map 1 [CUSTOM_SIMPLE_EDGE]
@@ -550,7 +550,7 @@ Stage-0
                       Select Operator [SEL_5] (rows=6144/10 width=215)
                         Output:["_col0"]
                         Filter Operator [FIL_20] (rows=6144/10 width=215)
-                          predicate:(cint is not null and cbigint is not null 
and cint BETWEEN 1000000 AND 3000000)
+                          predicate:(cint BETWEEN 1000000 AND 3000000 and 
cbigint is not null)
                           TableScan [TS_3] (rows=12288/12288 width=215)
                             
default@alltypesorc,b,Tbl:COMPLETE,Col:NONE,Output:["cint","cbigint"]
                   <-Map 1 [CUSTOM_SIMPLE_EDGE]

Reply via email to