Repository: hive
Updated Branches:
  refs/heads/branch-1.2 03be35e02 -> 6fdd9cdd1


http://git-wip-us.apache.org/repos/asf/hive/blob/6fdd9cdd/ql/src/test/results/clientpositive/vector_outer_join2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/vector_outer_join2.q.out 
b/ql/src/test/results/clientpositive/vector_outer_join2.q.out
index a7b14e1..ff2e52a 100644
--- a/ql/src/test/results/clientpositive/vector_outer_join2.q.out
+++ b/ql/src/test/results/clientpositive/vector_outer_join2.q.out
@@ -1,39 +1,39 @@
-PREHOOK: query: create table small_alltypesorc1a as select * from alltypesorc 
where cint is not null and ctinyint is not null limit 5
+PREHOOK: query: create table small_alltypesorc1a as select * from alltypesorc 
where cint is not null and ctinyint is not null order by cint, ctinyint limit 5
 PREHOOK: type: CREATETABLE_AS_SELECT
 PREHOOK: Input: default@alltypesorc
 PREHOOK: Output: database:default
 PREHOOK: Output: default@small_alltypesorc1a
-POSTHOOK: query: create table small_alltypesorc1a as select * from alltypesorc 
where cint is not null and ctinyint is not null limit 5
+POSTHOOK: query: create table small_alltypesorc1a as select * from alltypesorc 
where cint is not null and ctinyint is not null order by cint, ctinyint limit 5
 POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@alltypesorc
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@small_alltypesorc1a
-PREHOOK: query: create table small_alltypesorc2a as select * from alltypesorc 
where cint is null and ctinyint is not null limit 5
+PREHOOK: query: create table small_alltypesorc2a as select * from alltypesorc 
where cint is null and ctinyint is not null order by cint, ctinyint limit 5
 PREHOOK: type: CREATETABLE_AS_SELECT
 PREHOOK: Input: default@alltypesorc
 PREHOOK: Output: database:default
 PREHOOK: Output: default@small_alltypesorc2a
-POSTHOOK: query: create table small_alltypesorc2a as select * from alltypesorc 
where cint is null and ctinyint is not null limit 5
+POSTHOOK: query: create table small_alltypesorc2a as select * from alltypesorc 
where cint is null and ctinyint is not null order by cint, ctinyint limit 5
 POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@alltypesorc
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@small_alltypesorc2a
-PREHOOK: query: create table small_alltypesorc3a as select * from alltypesorc 
where cint is not null and ctinyint is null limit 5
+PREHOOK: query: create table small_alltypesorc3a as select * from alltypesorc 
where cint is not null and ctinyint is null order by cint, ctinyint limit 5
 PREHOOK: type: CREATETABLE_AS_SELECT
 PREHOOK: Input: default@alltypesorc
 PREHOOK: Output: database:default
 PREHOOK: Output: default@small_alltypesorc3a
-POSTHOOK: query: create table small_alltypesorc3a as select * from alltypesorc 
where cint is not null and ctinyint is null limit 5
+POSTHOOK: query: create table small_alltypesorc3a as select * from alltypesorc 
where cint is not null and ctinyint is null order by cint, ctinyint limit 5
 POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@alltypesorc
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@small_alltypesorc3a
-PREHOOK: query: create table small_alltypesorc4a as select * from alltypesorc 
where cint is null and ctinyint is null limit 5
+PREHOOK: query: create table small_alltypesorc4a as select * from alltypesorc 
where cint is null and ctinyint is null order by cint, ctinyint limit 5
 PREHOOK: type: CREATETABLE_AS_SELECT
 PREHOOK: Input: default@alltypesorc
 PREHOOK: Output: database:default
 PREHOOK: Output: default@small_alltypesorc4a
-POSTHOOK: query: create table small_alltypesorc4a as select * from alltypesorc 
where cint is null and ctinyint is null limit 5
+POSTHOOK: query: create table small_alltypesorc4a as select * from alltypesorc 
where cint is null and ctinyint is null order by cint, ctinyint limit 5
 POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@alltypesorc
 POSTHOOK: Output: database:default
@@ -121,11 +121,11 @@ STAGE PLANS:
         $hdt$_0:$hdt$_1:c 
           TableScan
             alias: c
-            Statistics: Num rows: 15 Data size: 2772 Basic stats: COMPLETE 
Column stats: NONE
+            Statistics: Num rows: 15 Data size: 3700 Basic stats: COMPLETE 
Column stats: NONE
             Select Operator
               expressions: cint (type: int)
               outputColumnNames: _col0
-              Statistics: Num rows: 15 Data size: 2772 Basic stats: COMPLETE 
Column stats: NONE
+              Statistics: Num rows: 15 Data size: 3700 Basic stats: COMPLETE 
Column stats: NONE
               HashTable Sink Operator
                 keys:
                   0 _col0 (type: int)
@@ -133,11 +133,11 @@ STAGE PLANS:
         $hdt$_0:$hdt$_2:c 
           TableScan
             alias: c
-            Statistics: Num rows: 15 Data size: 2772 Basic stats: COMPLETE 
Column stats: NONE
+            Statistics: Num rows: 15 Data size: 3700 Basic stats: COMPLETE 
Column stats: NONE
             Select Operator
               expressions: cbigint (type: bigint)
               outputColumnNames: _col0
-              Statistics: Num rows: 15 Data size: 2772 Basic stats: COMPLETE 
Column stats: NONE
+              Statistics: Num rows: 15 Data size: 3700 Basic stats: COMPLETE 
Column stats: NONE
               HashTable Sink Operator
                 keys:
                   0 _col1 (type: bigint)
@@ -148,11 +148,11 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: c
-            Statistics: Num rows: 15 Data size: 2772 Basic stats: COMPLETE 
Column stats: NONE
+            Statistics: Num rows: 15 Data size: 3700 Basic stats: COMPLETE 
Column stats: NONE
             Select Operator
               expressions: cint (type: int), cbigint (type: bigint)
               outputColumnNames: _col0, _col1
-              Statistics: Num rows: 15 Data size: 2772 Basic stats: COMPLETE 
Column stats: NONE
+              Statistics: Num rows: 15 Data size: 3700 Basic stats: COMPLETE 
Column stats: NONE
               Map Join Operator
                 condition map:
                      Left Outer Join0 to 1
@@ -160,7 +160,7 @@ STAGE PLANS:
                   0 _col0 (type: int)
                   1 _col0 (type: int)
                 outputColumnNames: _col1
-                Statistics: Num rows: 16 Data size: 3049 Basic stats: COMPLETE 
Column stats: NONE
+                Statistics: Num rows: 16 Data size: 4070 Basic stats: COMPLETE 
Column stats: NONE
                 Map Join Operator
                   condition map:
                        Left Outer Join0 to 1
@@ -168,11 +168,11 @@ STAGE PLANS:
                     0 _col1 (type: bigint)
                     1 _col0 (type: bigint)
                   outputColumnNames: _col1
-                  Statistics: Num rows: 17 Data size: 3353 Basic stats: 
COMPLETE Column stats: NONE
+                  Statistics: Num rows: 17 Data size: 4477 Basic stats: 
COMPLETE Column stats: NONE
                   Select Operator
                     expressions: _col1 (type: bigint)
                     outputColumnNames: _col0
-                    Statistics: Num rows: 17 Data size: 3353 Basic stats: 
COMPLETE Column stats: NONE
+                    Statistics: Num rows: 17 Data size: 4477 Basic stats: 
COMPLETE Column stats: NONE
                     Group By Operator
                       aggregations: count(), sum(_col0)
                       mode: hash
@@ -229,4 +229,4 @@ left outer join small_alltypesorc_a hd
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@small_alltypesorc_a
 #### A masked pattern was here ####
-105    -1197260954
+21     17110062350

http://git-wip-us.apache.org/repos/asf/hive/blob/6fdd9cdd/ql/src/test/results/clientpositive/vector_outer_join3.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/vector_outer_join3.q.out 
b/ql/src/test/results/clientpositive/vector_outer_join3.q.out
index a8ee829..901808c 100644
--- a/ql/src/test/results/clientpositive/vector_outer_join3.q.out
+++ b/ql/src/test/results/clientpositive/vector_outer_join3.q.out
@@ -1,39 +1,39 @@
-PREHOOK: query: create table small_alltypesorc1a as select * from alltypesorc 
where cint is not null and ctinyint is not null limit 5
+PREHOOK: query: create table small_alltypesorc1a as select * from alltypesorc 
where cint is not null and ctinyint is not null order by cint, ctinyint limit 5
 PREHOOK: type: CREATETABLE_AS_SELECT
 PREHOOK: Input: default@alltypesorc
 PREHOOK: Output: database:default
 PREHOOK: Output: default@small_alltypesorc1a
-POSTHOOK: query: create table small_alltypesorc1a as select * from alltypesorc 
where cint is not null and ctinyint is not null limit 5
+POSTHOOK: query: create table small_alltypesorc1a as select * from alltypesorc 
where cint is not null and ctinyint is not null order by cint, ctinyint limit 5
 POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@alltypesorc
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@small_alltypesorc1a
-PREHOOK: query: create table small_alltypesorc2a as select * from alltypesorc 
where cint is null and ctinyint is not null limit 5
+PREHOOK: query: create table small_alltypesorc2a as select * from alltypesorc 
where cint is null and ctinyint is not null order by cint, ctinyint limit 5
 PREHOOK: type: CREATETABLE_AS_SELECT
 PREHOOK: Input: default@alltypesorc
 PREHOOK: Output: database:default
 PREHOOK: Output: default@small_alltypesorc2a
-POSTHOOK: query: create table small_alltypesorc2a as select * from alltypesorc 
where cint is null and ctinyint is not null limit 5
+POSTHOOK: query: create table small_alltypesorc2a as select * from alltypesorc 
where cint is null and ctinyint is not null order by cint, ctinyint limit 5
 POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@alltypesorc
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@small_alltypesorc2a
-PREHOOK: query: create table small_alltypesorc3a as select * from alltypesorc 
where cint is not null and ctinyint is null limit 5
+PREHOOK: query: create table small_alltypesorc3a as select * from alltypesorc 
where cint is not null and ctinyint is null order by cint, ctinyint limit 5
 PREHOOK: type: CREATETABLE_AS_SELECT
 PREHOOK: Input: default@alltypesorc
 PREHOOK: Output: database:default
 PREHOOK: Output: default@small_alltypesorc3a
-POSTHOOK: query: create table small_alltypesorc3a as select * from alltypesorc 
where cint is not null and ctinyint is null limit 5
+POSTHOOK: query: create table small_alltypesorc3a as select * from alltypesorc 
where cint is not null and ctinyint is null order by cint, ctinyint limit 5
 POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@alltypesorc
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@small_alltypesorc3a
-PREHOOK: query: create table small_alltypesorc4a as select * from alltypesorc 
where cint is null and ctinyint is null limit 5
+PREHOOK: query: create table small_alltypesorc4a as select * from alltypesorc 
where cint is null and ctinyint is null order by cint, ctinyint limit 5
 PREHOOK: type: CREATETABLE_AS_SELECT
 PREHOOK: Input: default@alltypesorc
 PREHOOK: Output: database:default
 PREHOOK: Output: default@small_alltypesorc4a
-POSTHOOK: query: create table small_alltypesorc4a as select * from alltypesorc 
where cint is null and ctinyint is null limit 5
+POSTHOOK: query: create table small_alltypesorc4a as select * from alltypesorc 
where cint is null and ctinyint is null order by cint, ctinyint limit 5
 POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@alltypesorc
 POSTHOOK: Output: database:default
@@ -121,11 +121,11 @@ STAGE PLANS:
         $hdt$_0:$hdt$_1:c 
           TableScan
             alias: c
-            Statistics: Num rows: 15 Data size: 2772 Basic stats: COMPLETE 
Column stats: NONE
+            Statistics: Num rows: 15 Data size: 3700 Basic stats: COMPLETE 
Column stats: NONE
             Select Operator
               expressions: cint (type: int)
               outputColumnNames: _col0
-              Statistics: Num rows: 15 Data size: 2772 Basic stats: COMPLETE 
Column stats: NONE
+              Statistics: Num rows: 15 Data size: 3700 Basic stats: COMPLETE 
Column stats: NONE
               HashTable Sink Operator
                 keys:
                   0 _col0 (type: int)
@@ -133,11 +133,11 @@ STAGE PLANS:
         $hdt$_0:$hdt$_2:c 
           TableScan
             alias: c
-            Statistics: Num rows: 15 Data size: 2772 Basic stats: COMPLETE 
Column stats: NONE
+            Statistics: Num rows: 15 Data size: 3700 Basic stats: COMPLETE 
Column stats: NONE
             Select Operator
               expressions: cstring1 (type: string)
               outputColumnNames: _col0
-              Statistics: Num rows: 15 Data size: 2772 Basic stats: COMPLETE 
Column stats: NONE
+              Statistics: Num rows: 15 Data size: 3700 Basic stats: COMPLETE 
Column stats: NONE
               HashTable Sink Operator
                 keys:
                   0 _col1 (type: string)
@@ -148,11 +148,11 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: c
-            Statistics: Num rows: 15 Data size: 2772 Basic stats: COMPLETE 
Column stats: NONE
+            Statistics: Num rows: 15 Data size: 3700 Basic stats: COMPLETE 
Column stats: NONE
             Select Operator
               expressions: cint (type: int), cstring1 (type: string)
               outputColumnNames: _col0, _col1
-              Statistics: Num rows: 15 Data size: 2772 Basic stats: COMPLETE 
Column stats: NONE
+              Statistics: Num rows: 15 Data size: 3700 Basic stats: COMPLETE 
Column stats: NONE
               Map Join Operator
                 condition map:
                      Left Outer Join0 to 1
@@ -160,14 +160,14 @@ STAGE PLANS:
                   0 _col0 (type: int)
                   1 _col0 (type: int)
                 outputColumnNames: _col1
-                Statistics: Num rows: 16 Data size: 3049 Basic stats: COMPLETE 
Column stats: NONE
+                Statistics: Num rows: 16 Data size: 4070 Basic stats: COMPLETE 
Column stats: NONE
                 Map Join Operator
                   condition map:
                        Left Outer Join0 to 1
                   keys:
                     0 _col1 (type: string)
                     1 _col0 (type: string)
-                  Statistics: Num rows: 17 Data size: 3353 Basic stats: 
COMPLETE Column stats: NONE
+                  Statistics: Num rows: 17 Data size: 4477 Basic stats: 
COMPLETE Column stats: NONE
                   Group By Operator
                     aggregations: count()
                     mode: hash
@@ -224,7 +224,7 @@ left outer join small_alltypesorc_a hd
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@small_alltypesorc_a
 #### A masked pattern was here ####
-1005
+15
 PREHOOK: query: explain
 select count(*) from (select c.cstring1 
 from small_alltypesorc_a c
@@ -262,11 +262,11 @@ STAGE PLANS:
         $hdt$_0:$hdt$_1:c 
           TableScan
             alias: c
-            Statistics: Num rows: 15 Data size: 2772 Basic stats: COMPLETE 
Column stats: NONE
+            Statistics: Num rows: 15 Data size: 3700 Basic stats: COMPLETE 
Column stats: NONE
             Select Operator
               expressions: cstring2 (type: string)
               outputColumnNames: _col0
-              Statistics: Num rows: 15 Data size: 2772 Basic stats: COMPLETE 
Column stats: NONE
+              Statistics: Num rows: 15 Data size: 3700 Basic stats: COMPLETE 
Column stats: NONE
               HashTable Sink Operator
                 keys:
                   0 _col1 (type: string)
@@ -274,11 +274,11 @@ STAGE PLANS:
         $hdt$_0:$hdt$_2:c 
           TableScan
             alias: c
-            Statistics: Num rows: 15 Data size: 2772 Basic stats: COMPLETE 
Column stats: NONE
+            Statistics: Num rows: 15 Data size: 3700 Basic stats: COMPLETE 
Column stats: NONE
             Select Operator
               expressions: cstring1 (type: string)
               outputColumnNames: _col0
-              Statistics: Num rows: 15 Data size: 2772 Basic stats: COMPLETE 
Column stats: NONE
+              Statistics: Num rows: 15 Data size: 3700 Basic stats: COMPLETE 
Column stats: NONE
               HashTable Sink Operator
                 keys:
                   0 _col0 (type: string)
@@ -289,11 +289,11 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: c
-            Statistics: Num rows: 15 Data size: 2772 Basic stats: COMPLETE 
Column stats: NONE
+            Statistics: Num rows: 15 Data size: 3700 Basic stats: COMPLETE 
Column stats: NONE
             Select Operator
               expressions: cstring1 (type: string), cstring2 (type: string)
               outputColumnNames: _col0, _col1
-              Statistics: Num rows: 15 Data size: 2772 Basic stats: COMPLETE 
Column stats: NONE
+              Statistics: Num rows: 15 Data size: 3700 Basic stats: COMPLETE 
Column stats: NONE
               Map Join Operator
                 condition map:
                      Left Outer Join0 to 1
@@ -301,14 +301,14 @@ STAGE PLANS:
                   0 _col1 (type: string)
                   1 _col0 (type: string)
                 outputColumnNames: _col0
-                Statistics: Num rows: 16 Data size: 3049 Basic stats: COMPLETE 
Column stats: NONE
+                Statistics: Num rows: 16 Data size: 4070 Basic stats: COMPLETE 
Column stats: NONE
                 Map Join Operator
                   condition map:
                        Left Outer Join0 to 1
                   keys:
                     0 _col0 (type: string)
                     1 _col0 (type: string)
-                  Statistics: Num rows: 17 Data size: 3353 Basic stats: 
COMPLETE Column stats: NONE
+                  Statistics: Num rows: 17 Data size: 4477 Basic stats: 
COMPLETE Column stats: NONE
                   Group By Operator
                     aggregations: count()
                     mode: hash
@@ -365,7 +365,7 @@ left outer join small_alltypesorc_a hd
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@small_alltypesorc_a
 #### A masked pattern was here ####
-105
+21
 PREHOOK: query: explain
 select count(*) from (select c.cstring1 
 from small_alltypesorc_a c
@@ -403,11 +403,11 @@ STAGE PLANS:
         $hdt$_0:$hdt$_1:c 
           TableScan
             alias: c
-            Statistics: Num rows: 15 Data size: 2772 Basic stats: COMPLETE 
Column stats: NONE
+            Statistics: Num rows: 15 Data size: 3700 Basic stats: COMPLETE 
Column stats: NONE
             Select Operator
               expressions: cbigint (type: bigint), cstring2 (type: string)
               outputColumnNames: _col0, _col1
-              Statistics: Num rows: 15 Data size: 2772 Basic stats: COMPLETE 
Column stats: NONE
+              Statistics: Num rows: 15 Data size: 3700 Basic stats: COMPLETE 
Column stats: NONE
               HashTable Sink Operator
                 keys:
                   0 _col3 (type: string), _col1 (type: bigint)
@@ -415,11 +415,11 @@ STAGE PLANS:
         $hdt$_0:$hdt$_2:c 
           TableScan
             alias: c
-            Statistics: Num rows: 15 Data size: 2772 Basic stats: COMPLETE 
Column stats: NONE
+            Statistics: Num rows: 15 Data size: 3700 Basic stats: COMPLETE 
Column stats: NONE
             Select Operator
               expressions: cint (type: int), cstring1 (type: string)
               outputColumnNames: _col0, _col1
-              Statistics: Num rows: 15 Data size: 2772 Basic stats: COMPLETE 
Column stats: NONE
+              Statistics: Num rows: 15 Data size: 3700 Basic stats: COMPLETE 
Column stats: NONE
               HashTable Sink Operator
                 keys:
                   0 _col2 (type: string), _col0 (type: int)
@@ -430,11 +430,11 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: c
-            Statistics: Num rows: 15 Data size: 2772 Basic stats: COMPLETE 
Column stats: NONE
+            Statistics: Num rows: 15 Data size: 3700 Basic stats: COMPLETE 
Column stats: NONE
             Select Operator
               expressions: cint (type: int), cbigint (type: bigint), cstring1 
(type: string), cstring2 (type: string)
               outputColumnNames: _col0, _col1, _col2, _col3
-              Statistics: Num rows: 15 Data size: 2772 Basic stats: COMPLETE 
Column stats: NONE
+              Statistics: Num rows: 15 Data size: 3700 Basic stats: COMPLETE 
Column stats: NONE
               Map Join Operator
                 condition map:
                      Left Outer Join0 to 1
@@ -442,14 +442,14 @@ STAGE PLANS:
                   0 _col3 (type: string), _col1 (type: bigint)
                   1 _col1 (type: string), _col0 (type: bigint)
                 outputColumnNames: _col0, _col2
-                Statistics: Num rows: 16 Data size: 3049 Basic stats: COMPLETE 
Column stats: NONE
+                Statistics: Num rows: 16 Data size: 4070 Basic stats: COMPLETE 
Column stats: NONE
                 Map Join Operator
                   condition map:
                        Left Outer Join0 to 1
                   keys:
                     0 _col2 (type: string), _col0 (type: int)
                     1 _col1 (type: string), _col0 (type: int)
-                  Statistics: Num rows: 17 Data size: 3353 Basic stats: 
COMPLETE Column stats: NONE
+                  Statistics: Num rows: 17 Data size: 4477 Basic stats: 
COMPLETE Column stats: NONE
                   Group By Operator
                     aggregations: count()
                     mode: hash
@@ -506,4 +506,4 @@ left outer join small_alltypesorc_a hd
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@small_alltypesorc_a
 #### A masked pattern was here ####
-105
+21

http://git-wip-us.apache.org/repos/asf/hive/blob/6fdd9cdd/ql/src/test/results/clientpositive/vectorization_part_project.q.out
----------------------------------------------------------------------
diff --git 
a/ql/src/test/results/clientpositive/vectorization_part_project.q.out 
b/ql/src/test/results/clientpositive/vectorization_part_project.q.out
index 57012b2..f98e79c 100644
--- a/ql/src/test/results/clientpositive/vectorization_part_project.q.out
+++ b/ql/src/test/results/clientpositive/vectorization_part_project.q.out
@@ -6,11 +6,11 @@ POSTHOOK: query: CREATE TABLE alltypesorc_part(ctinyint 
tinyint, csmallint small
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@alltypesorc_part
-PREHOOK: query: insert overwrite table alltypesorc_part partition (ds='2011') 
select * from alltypesorc limit 100
+PREHOOK: query: insert overwrite table alltypesorc_part partition (ds='2011') 
select * from alltypesorc order by ctinyint, cint, cbigint limit 100
 PREHOOK: type: QUERY
 PREHOOK: Input: default@alltypesorc
 PREHOOK: Output: default@alltypesorc_part@ds=2011
-POSTHOOK: query: insert overwrite table alltypesorc_part partition (ds='2011') 
select * from alltypesorc limit 100
+POSTHOOK: query: insert overwrite table alltypesorc_part partition (ds='2011') 
select * from alltypesorc order by ctinyint, cint, cbigint limit 100
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@alltypesorc
 POSTHOOK: Output: default@alltypesorc_part@ds=2011
@@ -26,11 +26,11 @@ POSTHOOK: Lineage: alltypesorc_part 
PARTITION(ds=2011).cstring2 SIMPLE [(alltype
 POSTHOOK: Lineage: alltypesorc_part PARTITION(ds=2011).ctimestamp1 SIMPLE 
[(alltypesorc)alltypesorc.FieldSchema(name:ctimestamp1, type:timestamp, 
comment:null), ]
 POSTHOOK: Lineage: alltypesorc_part PARTITION(ds=2011).ctimestamp2 SIMPLE 
[(alltypesorc)alltypesorc.FieldSchema(name:ctimestamp2, type:timestamp, 
comment:null), ]
 POSTHOOK: Lineage: alltypesorc_part PARTITION(ds=2011).ctinyint SIMPLE 
[(alltypesorc)alltypesorc.FieldSchema(name:ctinyint, type:tinyint, 
comment:null), ]
-PREHOOK: query: insert overwrite table alltypesorc_part partition (ds='2012') 
select * from alltypesorc limit 100
+PREHOOK: query: insert overwrite table alltypesorc_part partition (ds='2012') 
select * from alltypesorc order by ctinyint, cint, cbigint limit 100
 PREHOOK: type: QUERY
 PREHOOK: Input: default@alltypesorc
 PREHOOK: Output: default@alltypesorc_part@ds=2012
-POSTHOOK: query: insert overwrite table alltypesorc_part partition (ds='2012') 
select * from alltypesorc limit 100
+POSTHOOK: query: insert overwrite table alltypesorc_part partition (ds='2012') 
select * from alltypesorc order by ctinyint, cint, cbigint limit 100
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@alltypesorc
 POSTHOOK: Output: default@alltypesorc_part@ds=2012
@@ -60,27 +60,27 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: alltypesorc_part
-            Statistics: Num rows: 200 Data size: 41576 Basic stats: COMPLETE 
Column stats: NONE
+            Statistics: Num rows: 200 Data size: 54496 Basic stats: COMPLETE 
Column stats: NONE
             Select Operator
               expressions: (cdouble + 2.0) (type: double)
               outputColumnNames: _col0
-              Statistics: Num rows: 200 Data size: 41576 Basic stats: COMPLETE 
Column stats: NONE
+              Statistics: Num rows: 200 Data size: 54496 Basic stats: COMPLETE 
Column stats: NONE
               Reduce Output Operator
                 key expressions: _col0 (type: double)
                 sort order: +
-                Statistics: Num rows: 200 Data size: 41576 Basic stats: 
COMPLETE Column stats: NONE
+                Statistics: Num rows: 200 Data size: 54496 Basic stats: 
COMPLETE Column stats: NONE
       Execution mode: vectorized
       Reduce Operator Tree:
         Select Operator
           expressions: KEY.reducesinkkey0 (type: double)
           outputColumnNames: _col0
-          Statistics: Num rows: 200 Data size: 41576 Basic stats: COMPLETE 
Column stats: NONE
+          Statistics: Num rows: 200 Data size: 54496 Basic stats: COMPLETE 
Column stats: NONE
           Limit
             Number of rows: 10
-            Statistics: Num rows: 10 Data size: 2070 Basic stats: COMPLETE 
Column stats: NONE
+            Statistics: Num rows: 10 Data size: 2720 Basic stats: COMPLETE 
Column stats: NONE
             File Output Operator
               compressed: false
-              Statistics: Num rows: 10 Data size: 2070 Basic stats: COMPLETE 
Column stats: NONE
+              Statistics: Num rows: 10 Data size: 2720 Basic stats: COMPLETE 
Column stats: NONE
               table:
                   input format: org.apache.hadoop.mapred.TextInputFormat
                   output format: 
org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
@@ -104,13 +104,13 @@ POSTHOOK: Input: default@alltypesorc_part
 POSTHOOK: Input: default@alltypesorc_part@ds=2011
 POSTHOOK: Input: default@alltypesorc_part@ds=2012
 #### A masked pattern was here ####
--15910.0
--15910.0
--15811.0
--15811.0
--15788.0
--15788.0
--15547.0
--15547.0
--15429.0
--15429.0
+NULL
+NULL
+-15863.0
+-15863.0
+-14988.0
+-14988.0
+-14646.0
+-14646.0
+-14236.0
+-14236.0

http://git-wip-us.apache.org/repos/asf/hive/blob/6fdd9cdd/ql/src/test/results/clientpositive/vectorized_distinct_gby.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/vectorized_distinct_gby.q.out 
b/ql/src/test/results/clientpositive/vectorized_distinct_gby.q.out
index 1c684ce..2e041a3 100644
--- a/ql/src/test/results/clientpositive/vectorized_distinct_gby.q.out
+++ b/ql/src/test/results/clientpositive/vectorized_distinct_gby.q.out
@@ -6,11 +6,11 @@ POSTHOOK: query: create table dtest(a int, b int) clustered 
by (a) sorted by (a)
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@dtest
-PREHOOK: query: insert into table dtest select c,b from (select 
array(300,300,300,300,300) as a, 1 as b from src limit 1) y lateral view  
explode(a) t1 as c
+PREHOOK: query: insert into table dtest select c,b from (select 
array(300,300,300,300,300) as a, 1 as b from src order by a limit 1) y lateral 
view  explode(a) t1 as c
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 PREHOOK: Output: default@dtest
-POSTHOOK: query: insert into table dtest select c,b from (select 
array(300,300,300,300,300) as a, 1 as b from src limit 1) y lateral view  
explode(a) t1 as c
+POSTHOOK: query: insert into table dtest select c,b from (select 
array(300,300,300,300,300) as a, 1 as b from src order by a limit 1) y lateral 
view  explode(a) t1 as c
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 POSTHOOK: Output: default@dtest

http://git-wip-us.apache.org/repos/asf/hive/blob/6fdd9cdd/ql/src/test/results/clientpositive/vectorized_mapjoin.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/vectorized_mapjoin.q.out 
b/ql/src/test/results/clientpositive/vectorized_mapjoin.q.out
index d042ae0..f33ddcf 100644
--- a/ql/src/test/results/clientpositive/vectorized_mapjoin.q.out
+++ b/ql/src/test/results/clientpositive/vectorized_mapjoin.q.out
@@ -1,8 +1,12 @@
-PREHOOK: query: EXPLAIN SELECT COUNT(t1.cint), MAX(t2.cint), MIN(t1.cint), 
AVG(t1.cint+t2.cint)
+PREHOOK: query: -- SORT_QUERY_RESULTS
+
+EXPLAIN SELECT COUNT(t1.cint), MAX(t2.cint), MIN(t1.cint), AVG(t1.cint+t2.cint)
   FROM alltypesorc t1
   JOIN alltypesorc t2 ON t1.cint = t2.cint
 PREHOOK: type: QUERY
-POSTHOOK: query: EXPLAIN SELECT COUNT(t1.cint), MAX(t2.cint), MIN(t1.cint), 
AVG(t1.cint+t2.cint)
+POSTHOOK: query: -- SORT_QUERY_RESULTS
+
+EXPLAIN SELECT COUNT(t1.cint), MAX(t2.cint), MIN(t1.cint), AVG(t1.cint+t2.cint)
   FROM alltypesorc t1
   JOIN alltypesorc t2 ON t1.cint = t2.cint
 POSTHOOK: type: QUERY

http://git-wip-us.apache.org/repos/asf/hive/blob/6fdd9cdd/ql/src/test/results/clientpositive/vectorized_nested_mapjoin.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/vectorized_nested_mapjoin.q.out 
b/ql/src/test/results/clientpositive/vectorized_nested_mapjoin.q.out
index c92dcf9..82e90da 100644
--- a/ql/src/test/results/clientpositive/vectorized_nested_mapjoin.q.out
+++ b/ql/src/test/results/clientpositive/vectorized_nested_mapjoin.q.out
@@ -1,6 +1,10 @@
-PREHOOK: query: explain select sum(t1.td) from (select  v1.csmallint as tsi, 
v1.cdouble as td from alltypesorc v1, alltypesorc v2 where 
v1.ctinyint=v2.ctinyint) t1 join alltypesorc v3 on t1.tsi=v3.csmallint
+PREHOOK: query: -- SORT_QUERY_RESULTS
+
+explain select sum(t1.td) from (select  v1.csmallint as tsi, v1.cdouble as td 
from alltypesorc v1, alltypesorc v2 where v1.ctinyint=v2.ctinyint) t1 join 
alltypesorc v3 on t1.tsi=v3.csmallint
 PREHOOK: type: QUERY
-POSTHOOK: query: explain select sum(t1.td) from (select  v1.csmallint as tsi, 
v1.cdouble as td from alltypesorc v1, alltypesorc v2 where 
v1.ctinyint=v2.ctinyint) t1 join alltypesorc v3 on t1.tsi=v3.csmallint
+POSTHOOK: query: -- SORT_QUERY_RESULTS
+
+explain select sum(t1.td) from (select  v1.csmallint as tsi, v1.cdouble as td 
from alltypesorc v1, alltypesorc v2 where v1.ctinyint=v2.ctinyint) t1 join 
alltypesorc v3 on t1.tsi=v3.csmallint
 POSTHOOK: type: QUERY
 STAGE DEPENDENCIES:
   Stage-8 is a root stage

http://git-wip-us.apache.org/repos/asf/hive/blob/6fdd9cdd/ql/src/test/results/clientpositive/vectorized_rcfile_columnar.q.out
----------------------------------------------------------------------
diff --git 
a/ql/src/test/results/clientpositive/vectorized_rcfile_columnar.q.out 
b/ql/src/test/results/clientpositive/vectorized_rcfile_columnar.q.out
index ee8959b..c35173e 100644
--- a/ql/src/test/results/clientpositive/vectorized_rcfile_columnar.q.out
+++ b/ql/src/test/results/clientpositive/vectorized_rcfile_columnar.q.out
@@ -23,12 +23,12 @@ POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@columnTable
 PREHOOK: query: FROM src
-INSERT OVERWRITE TABLE columnTable SELECT src.key, src.value LIMIT 10
+INSERT OVERWRITE TABLE columnTable SELECT src.key, src.value ORDER BY src.key, 
src.value LIMIT 10
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 PREHOOK: Output: default@columntable
 POSTHOOK: query: FROM src
-INSERT OVERWRITE TABLE columnTable SELECT src.key, src.value LIMIT 10
+INSERT OVERWRITE TABLE columnTable SELECT src.key, src.value ORDER BY src.key, 
src.value LIMIT 10
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 POSTHOOK: Output: default@columntable
@@ -50,13 +50,13 @@ POSTHOOK: query: SELECT key, value FROM columnTable ORDER 
BY key
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@columntable
 #### A masked pattern was here ####
-165    val_165
-238    val_238
-255    val_255
-27     val_27
-278    val_278
-311    val_311
-409    val_409
-484    val_484
-86     val_86
-98     val_98
+0      val_0
+0      val_0
+0      val_0
+10     val_10
+100    val_100
+100    val_100
+103    val_103
+103    val_103
+104    val_104
+104    val_104

http://git-wip-us.apache.org/repos/asf/hive/blob/6fdd9cdd/ql/src/test/results/clientpositive/vectorized_shufflejoin.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/vectorized_shufflejoin.q.out 
b/ql/src/test/results/clientpositive/vectorized_shufflejoin.q.out
index 959a762..f32cc38 100644
--- a/ql/src/test/results/clientpositive/vectorized_shufflejoin.q.out
+++ b/ql/src/test/results/clientpositive/vectorized_shufflejoin.q.out
@@ -1,15 +1,20 @@
-PREHOOK: query: EXPLAIN SELECT COUNT(t1.cint), MAX(t2.cint), MIN(t1.cint), 
AVG(t1.cint+t2.cint)
+PREHOOK: query: -- SORT_QUERY_RESULTS
+
+EXPLAIN SELECT COUNT(t1.cint) AS CNT, MAX(t2.cint) , MIN(t1.cint), 
AVG(t1.cint+t2.cint)
   FROM alltypesorc t1
-  JOIN alltypesorc t2 ON t1.cint = t2.cint
+  JOIN alltypesorc t2 ON t1.cint = t2.cint order by CNT
 PREHOOK: type: QUERY
-POSTHOOK: query: EXPLAIN SELECT COUNT(t1.cint), MAX(t2.cint), MIN(t1.cint), 
AVG(t1.cint+t2.cint)
+POSTHOOK: query: -- SORT_QUERY_RESULTS
+
+EXPLAIN SELECT COUNT(t1.cint) AS CNT, MAX(t2.cint) , MIN(t1.cint), 
AVG(t1.cint+t2.cint)
   FROM alltypesorc t1
-  JOIN alltypesorc t2 ON t1.cint = t2.cint
+  JOIN alltypesorc t2 ON t1.cint = t2.cint order by CNT
 POSTHOOK: type: QUERY
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-2 depends on stages: Stage-1
-  Stage-0 depends on stages: Stage-2
+  Stage-3 depends on stages: Stage-2
+  Stage-0 depends on stages: Stage-3
 
 STAGE PLANS:
   Stage: Stage-1
@@ -86,6 +91,27 @@ STAGE PLANS:
           Statistics: Num rows: 1 Data size: 24 Basic stats: COMPLETE Column 
stats: NONE
           File Output Operator
             compressed: false
+            table:
+                input format: org.apache.hadoop.mapred.SequenceFileInputFormat
+                output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe
+
+  Stage: Stage-3
+    Map Reduce
+      Map Operator Tree:
+          TableScan
+            Reduce Output Operator
+              key expressions: _col0 (type: bigint)
+              sort order: +
+              Statistics: Num rows: 1 Data size: 24 Basic stats: COMPLETE 
Column stats: NONE
+              value expressions: _col1 (type: int), _col2 (type: int), _col3 
(type: double)
+      Reduce Operator Tree:
+        Select Operator
+          expressions: KEY.reducesinkkey0 (type: bigint), VALUE._col0 (type: 
int), VALUE._col1 (type: int), VALUE._col2 (type: double)
+          outputColumnNames: _col0, _col1, _col2, _col3
+          Statistics: Num rows: 1 Data size: 24 Basic stats: COMPLETE Column 
stats: NONE
+          File Output Operator
+            compressed: false
             Statistics: Num rows: 1 Data size: 24 Basic stats: COMPLETE Column 
stats: NONE
             table:
                 input format: org.apache.hadoop.mapred.TextInputFormat
@@ -98,15 +124,15 @@ STAGE PLANS:
       Processor Tree:
         ListSink
 
-PREHOOK: query: SELECT COUNT(t1.cint), MAX(t2.cint), MIN(t1.cint), 
AVG(t1.cint+t2.cint)
+PREHOOK: query: SELECT COUNT(t1.cint), MAX(t2.cint) AS CNT, MIN(t1.cint), 
AVG(t1.cint+t2.cint)
   FROM alltypesorc t1
-  JOIN alltypesorc t2 ON t1.cint = t2.cint
+  JOIN alltypesorc t2 ON t1.cint = t2.cint order by CNT
 PREHOOK: type: QUERY
 PREHOOK: Input: default@alltypesorc
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT COUNT(t1.cint), MAX(t2.cint), MIN(t1.cint), 
AVG(t1.cint+t2.cint)
+POSTHOOK: query: SELECT COUNT(t1.cint), MAX(t2.cint) AS CNT, MIN(t1.cint), 
AVG(t1.cint+t2.cint)
   FROM alltypesorc t1
-  JOIN alltypesorc t2 ON t1.cint = t2.cint
+  JOIN alltypesorc t2 ON t1.cint = t2.cint order by CNT
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@alltypesorc
 #### A masked pattern was here ####

http://git-wip-us.apache.org/repos/asf/hive/blob/6fdd9cdd/ql/src/test/results/clientpositive/vectorized_timestamp_funcs.q.out
----------------------------------------------------------------------
diff --git 
a/ql/src/test/results/clientpositive/vectorized_timestamp_funcs.q.out 
b/ql/src/test/results/clientpositive/vectorized_timestamp_funcs.q.out
index 31a96c6..1fcee3e 100644
--- a/ql/src/test/results/clientpositive/vectorized_timestamp_funcs.q.out
+++ b/ql/src/test/results/clientpositive/vectorized_timestamp_funcs.q.out
@@ -18,18 +18,20 @@ POSTHOOK: Output: database:default
 POSTHOOK: Output: default@alltypesorc_string
 PREHOOK: query: INSERT OVERWRITE TABLE alltypesorc_string
 SELECT
-  to_utc_timestamp(ctimestamp1, 'America/Los_Angeles'),
-  CAST(to_utc_timestamp(ctimestamp1, 'America/Los_Angeles') AS STRING)
+  to_utc_timestamp(ctimestamp1, 'America/Los_Angeles') AS toutc,
+  CAST(to_utc_timestamp(ctimestamp1, 'America/Los_Angeles') AS STRING) as cst
 FROM alltypesorc
+ORDER BY toutc, cst
 LIMIT 40
 PREHOOK: type: QUERY
 PREHOOK: Input: default@alltypesorc
 PREHOOK: Output: default@alltypesorc_string
 POSTHOOK: query: INSERT OVERWRITE TABLE alltypesorc_string
 SELECT
-  to_utc_timestamp(ctimestamp1, 'America/Los_Angeles'),
-  CAST(to_utc_timestamp(ctimestamp1, 'America/Los_Angeles') AS STRING)
+  to_utc_timestamp(ctimestamp1, 'America/Los_Angeles') AS toutc,
+  CAST(to_utc_timestamp(ctimestamp1, 'America/Los_Angeles') AS STRING) as cst
 FROM alltypesorc
+ORDER BY toutc, cst
 LIMIT 40
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@alltypesorc
@@ -107,25 +109,25 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: alltypesorc_string
-            Statistics: Num rows: 40 Data size: 5694 Basic stats: COMPLETE 
Column stats: NONE
+            Statistics: Num rows: 40 Data size: 84 Basic stats: COMPLETE 
Column stats: NONE
             Select Operator
               expressions: to_unix_timestamp(ctimestamp1) (type: bigint), 
year(ctimestamp1) (type: int), month(ctimestamp1) (type: int), day(ctimestamp1) 
(type: int), dayofmonth(ctimestamp1) (type: int), weekofyear(ctimestamp1) 
(type: int), hour(ctimestamp1) (type: int), minute(ctimestamp1) (type: int), 
second(ctimestamp1) (type: int)
               outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, 
_col6, _col7, _col8
-              Statistics: Num rows: 40 Data size: 5694 Basic stats: COMPLETE 
Column stats: NONE
+              Statistics: Num rows: 40 Data size: 84 Basic stats: COMPLETE 
Column stats: NONE
               Reduce Output Operator
                 key expressions: _col0 (type: bigint)
                 sort order: +
-                Statistics: Num rows: 40 Data size: 5694 Basic stats: COMPLETE 
Column stats: NONE
+                Statistics: Num rows: 40 Data size: 84 Basic stats: COMPLETE 
Column stats: NONE
                 value expressions: _col1 (type: int), _col2 (type: int), _col3 
(type: int), _col4 (type: int), _col5 (type: int), _col6 (type: int), _col7 
(type: int), _col8 (type: int)
       Execution mode: vectorized
       Reduce Operator Tree:
         Select Operator
           expressions: KEY.reducesinkkey0 (type: bigint), VALUE._col0 (type: 
int), VALUE._col1 (type: int), VALUE._col2 (type: int), VALUE._col3 (type: 
int), VALUE._col4 (type: int), VALUE._col5 (type: int), VALUE._col6 (type: 
int), VALUE._col7 (type: int)
           outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, 
_col7, _col8
-          Statistics: Num rows: 40 Data size: 5694 Basic stats: COMPLETE 
Column stats: NONE
+          Statistics: Num rows: 40 Data size: 84 Basic stats: COMPLETE Column 
stats: NONE
           File Output Operator
             compressed: false
-            Statistics: Num rows: 40 Data size: 5694 Basic stats: COMPLETE 
Column stats: NONE
+            Statistics: Num rows: 40 Data size: 84 Basic stats: COMPLETE 
Column stats: NONE
             table:
                 input format: org.apache.hadoop.mapred.TextInputFormat
                 output format: 
org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
@@ -168,45 +170,45 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@alltypesorc_string
 #### A masked pattern was here ####
 NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
-28784  1969    12      31      31      1       23      59      44
-28784  1969    12      31      31      1       23      59      44
-28784  1969    12      31      31      1       23      59      44
-28784  1969    12      31      31      1       23      59      44
-28785  1969    12      31      31      1       23      59      45
-28786  1969    12      31      31      1       23      59      46
-28787  1969    12      31      31      1       23      59      47
-28788  1969    12      31      31      1       23      59      48
-28789  1969    12      31      31      1       23      59      49
-28789  1969    12      31      31      1       23      59      49
-28790  1969    12      31      31      1       23      59      50
-28792  1969    12      31      31      1       23      59      52
-28792  1969    12      31      31      1       23      59      52
-28792  1969    12      31      31      1       23      59      52
-28792  1969    12      31      31      1       23      59      52
-28795  1969    12      31      31      1       23      59      55
-28795  1969    12      31      31      1       23      59      55
-28795  1969    12      31      31      1       23      59      55
-28798  1969    12      31      31      1       23      59      58
-28798  1969    12      31      31      1       23      59      58
-28800  1970    1       1       1       1       0       0       0
-28800  1970    1       1       1       1       0       0       0
-28802  1970    1       1       1       1       0       0       2
-28803  1970    1       1       1       1       0       0       3
-28804  1970    1       1       1       1       0       0       4
-28804  1970    1       1       1       1       0       0       4
-28805  1970    1       1       1       1       0       0       5
-28805  1970    1       1       1       1       0       0       5
-28806  1970    1       1       1       1       0       0       6
-28807  1970    1       1       1       1       0       0       7
-28807  1970    1       1       1       1       0       0       7
-28807  1970    1       1       1       1       0       0       7
-28808  1970    1       1       1       1       0       0       8
-28808  1970    1       1       1       1       0       0       8
-28809  1970    1       1       1       1       0       0       9
-28811  1970    1       1       1       1       0       0       11
-28813  1970    1       1       1       1       0       0       13
-28814  1970    1       1       1       1       0       0       14
-28815  1970    1       1       1       1       0       0       15
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
 PREHOOK: query: EXPLAIN SELECT
   to_unix_timestamp(stimestamp1) AS c1,
   year(stimestamp1),
@@ -243,25 +245,25 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: alltypesorc_string
-            Statistics: Num rows: 40 Data size: 5694 Basic stats: COMPLETE 
Column stats: NONE
+            Statistics: Num rows: 40 Data size: 84 Basic stats: COMPLETE 
Column stats: NONE
             Select Operator
               expressions: to_unix_timestamp(stimestamp1) (type: bigint), 
year(stimestamp1) (type: int), month(stimestamp1) (type: int), day(stimestamp1) 
(type: int), dayofmonth(stimestamp1) (type: int), weekofyear(stimestamp1) 
(type: int), hour(stimestamp1) (type: int), minute(stimestamp1) (type: int), 
second(stimestamp1) (type: int)
               outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, 
_col6, _col7, _col8
-              Statistics: Num rows: 40 Data size: 5694 Basic stats: COMPLETE 
Column stats: NONE
+              Statistics: Num rows: 40 Data size: 84 Basic stats: COMPLETE 
Column stats: NONE
               Reduce Output Operator
                 key expressions: _col0 (type: bigint)
                 sort order: +
-                Statistics: Num rows: 40 Data size: 5694 Basic stats: COMPLETE 
Column stats: NONE
+                Statistics: Num rows: 40 Data size: 84 Basic stats: COMPLETE 
Column stats: NONE
                 value expressions: _col1 (type: int), _col2 (type: int), _col3 
(type: int), _col4 (type: int), _col5 (type: int), _col6 (type: int), _col7 
(type: int), _col8 (type: int)
       Execution mode: vectorized
       Reduce Operator Tree:
         Select Operator
           expressions: KEY.reducesinkkey0 (type: bigint), VALUE._col0 (type: 
int), VALUE._col1 (type: int), VALUE._col2 (type: int), VALUE._col3 (type: 
int), VALUE._col4 (type: int), VALUE._col5 (type: int), VALUE._col6 (type: 
int), VALUE._col7 (type: int)
           outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, 
_col7, _col8
-          Statistics: Num rows: 40 Data size: 5694 Basic stats: COMPLETE 
Column stats: NONE
+          Statistics: Num rows: 40 Data size: 84 Basic stats: COMPLETE Column 
stats: NONE
           File Output Operator
             compressed: false
-            Statistics: Num rows: 40 Data size: 5694 Basic stats: COMPLETE 
Column stats: NONE
+            Statistics: Num rows: 40 Data size: 84 Basic stats: COMPLETE 
Column stats: NONE
             table:
                 input format: org.apache.hadoop.mapred.TextInputFormat
                 output format: 
org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
@@ -304,45 +306,45 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@alltypesorc_string
 #### A masked pattern was here ####
 NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
-28784  1969    12      31      31      1       23      59      44
-28784  1969    12      31      31      1       23      59      44
-28784  1969    12      31      31      1       23      59      44
-28784  1969    12      31      31      1       23      59      44
-28785  1969    12      31      31      1       23      59      45
-28786  1969    12      31      31      1       23      59      46
-28787  1969    12      31      31      1       23      59      47
-28788  1969    12      31      31      1       23      59      48
-28789  1969    12      31      31      1       23      59      49
-28789  1969    12      31      31      1       23      59      49
-28790  1969    12      31      31      1       23      59      50
-28792  1969    12      31      31      1       23      59      52
-28792  1969    12      31      31      1       23      59      52
-28792  1969    12      31      31      1       23      59      52
-28792  1969    12      31      31      1       23      59      52
-28795  1969    12      31      31      1       23      59      55
-28795  1969    12      31      31      1       23      59      55
-28795  1969    12      31      31      1       23      59      55
-28798  1969    12      31      31      1       23      59      58
-28798  1969    12      31      31      1       23      59      58
-28800  1970    1       1       1       1       0       0       0
-28800  1970    1       1       1       1       0       0       0
-28802  1970    1       1       1       1       0       0       2
-28803  1970    1       1       1       1       0       0       3
-28804  1970    1       1       1       1       0       0       4
-28804  1970    1       1       1       1       0       0       4
-28805  1970    1       1       1       1       0       0       5
-28805  1970    1       1       1       1       0       0       5
-28806  1970    1       1       1       1       0       0       6
-28807  1970    1       1       1       1       0       0       7
-28807  1970    1       1       1       1       0       0       7
-28807  1970    1       1       1       1       0       0       7
-28808  1970    1       1       1       1       0       0       8
-28808  1970    1       1       1       1       0       0       8
-28809  1970    1       1       1       1       0       0       9
-28811  1970    1       1       1       1       0       0       11
-28813  1970    1       1       1       1       0       0       13
-28814  1970    1       1       1       1       0       0       14
-28815  1970    1       1       1       1       0       0       15
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
 PREHOOK: query: EXPLAIN SELECT
   to_unix_timestamp(ctimestamp1) = to_unix_timestamp(stimestamp1) AS c1,
   year(ctimestamp1) = year(stimestamp1),
@@ -379,25 +381,25 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: alltypesorc_string
-            Statistics: Num rows: 40 Data size: 5694 Basic stats: COMPLETE 
Column stats: NONE
+            Statistics: Num rows: 40 Data size: 84 Basic stats: COMPLETE 
Column stats: NONE
             Select Operator
               expressions: (to_unix_timestamp(ctimestamp1) = 
to_unix_timestamp(stimestamp1)) (type: boolean), (year(ctimestamp1) = 
year(stimestamp1)) (type: boolean), (month(ctimestamp1) = month(stimestamp1)) 
(type: boolean), (day(ctimestamp1) = day(stimestamp1)) (type: boolean), 
(dayofmonth(ctimestamp1) = dayofmonth(stimestamp1)) (type: boolean), 
(weekofyear(ctimestamp1) = weekofyear(stimestamp1)) (type: boolean), 
(hour(ctimestamp1) = hour(stimestamp1)) (type: boolean), (minute(ctimestamp1) = 
minute(stimestamp1)) (type: boolean), (second(ctimestamp1) = 
second(stimestamp1)) (type: boolean)
               outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, 
_col6, _col7, _col8
-              Statistics: Num rows: 40 Data size: 5694 Basic stats: COMPLETE 
Column stats: NONE
+              Statistics: Num rows: 40 Data size: 84 Basic stats: COMPLETE 
Column stats: NONE
               Reduce Output Operator
                 key expressions: _col0 (type: boolean)
                 sort order: +
-                Statistics: Num rows: 40 Data size: 5694 Basic stats: COMPLETE 
Column stats: NONE
+                Statistics: Num rows: 40 Data size: 84 Basic stats: COMPLETE 
Column stats: NONE
                 value expressions: _col1 (type: boolean), _col2 (type: 
boolean), _col3 (type: boolean), _col4 (type: boolean), _col5 (type: boolean), 
_col6 (type: boolean), _col7 (type: boolean), _col8 (type: boolean)
       Execution mode: vectorized
       Reduce Operator Tree:
         Select Operator
           expressions: KEY.reducesinkkey0 (type: boolean), VALUE._col0 (type: 
boolean), VALUE._col1 (type: boolean), VALUE._col2 (type: boolean), VALUE._col3 
(type: boolean), VALUE._col4 (type: boolean), VALUE._col5 (type: boolean), 
VALUE._col6 (type: boolean), VALUE._col7 (type: boolean)
           outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, 
_col7, _col8
-          Statistics: Num rows: 40 Data size: 5694 Basic stats: COMPLETE 
Column stats: NONE
+          Statistics: Num rows: 40 Data size: 84 Basic stats: COMPLETE Column 
stats: NONE
           File Output Operator
             compressed: false
-            Statistics: Num rows: 40 Data size: 5694 Basic stats: COMPLETE 
Column stats: NONE
+            Statistics: Num rows: 40 Data size: 84 Basic stats: COMPLETE 
Column stats: NONE
             table:
                 input format: org.apache.hadoop.mapred.TextInputFormat
                 output format: 
org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
@@ -442,45 +444,45 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@alltypesorc_string
 #### A masked pattern was here ####
 NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
-true   true    true    true    true    true    true    true    true
-true   true    true    true    true    true    true    true    true
-true   true    true    true    true    true    true    true    true
-true   true    true    true    true    true    true    true    true
-true   true    true    true    true    true    true    true    true
-true   true    true    true    true    true    true    true    true
-true   true    true    true    true    true    true    true    true
-true   true    true    true    true    true    true    true    true
-true   true    true    true    true    true    true    true    true
-true   true    true    true    true    true    true    true    true
-true   true    true    true    true    true    true    true    true
-true   true    true    true    true    true    true    true    true
-true   true    true    true    true    true    true    true    true
-true   true    true    true    true    true    true    true    true
-true   true    true    true    true    true    true    true    true
-true   true    true    true    true    true    true    true    true
-true   true    true    true    true    true    true    true    true
-true   true    true    true    true    true    true    true    true
-true   true    true    true    true    true    true    true    true
-true   true    true    true    true    true    true    true    true
-true   true    true    true    true    true    true    true    true
-true   true    true    true    true    true    true    true    true
-true   true    true    true    true    true    true    true    true
-true   true    true    true    true    true    true    true    true
-true   true    true    true    true    true    true    true    true
-true   true    true    true    true    true    true    true    true
-true   true    true    true    true    true    true    true    true
-true   true    true    true    true    true    true    true    true
-true   true    true    true    true    true    true    true    true
-true   true    true    true    true    true    true    true    true
-true   true    true    true    true    true    true    true    true
-true   true    true    true    true    true    true    true    true
-true   true    true    true    true    true    true    true    true
-true   true    true    true    true    true    true    true    true
-true   true    true    true    true    true    true    true    true
-true   true    true    true    true    true    true    true    true
-true   true    true    true    true    true    true    true    true
-true   true    true    true    true    true    true    true    true
-true   true    true    true    true    true    true    true    true
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
 PREHOOK: query: -- Wrong format. Should all be NULL.
 EXPLAIN SELECT
   to_unix_timestamp(stimestamp1) AS c1,
@@ -606,11 +608,11 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: alltypesorc_string
-            Statistics: Num rows: 40 Data size: 5694 Basic stats: COMPLETE 
Column stats: NONE
+            Statistics: Num rows: 40 Data size: 84 Basic stats: COMPLETE 
Column stats: NONE
             Select Operator
               expressions: ctimestamp1 (type: timestamp)
               outputColumnNames: _col0
-              Statistics: Num rows: 40 Data size: 5694 Basic stats: COMPLETE 
Column stats: NONE
+              Statistics: Num rows: 40 Data size: 84 Basic stats: COMPLETE 
Column stats: NONE
               Group By Operator
                 aggregations: min(_col0), max(_col0), count(_col0), count()
                 mode: hash
@@ -659,7 +661,7 @@ FROM alltypesorc_string
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@alltypesorc_string
 #### A masked pattern was here ####
-1969-12-31 23:59:44.088        1970-01-01 00:00:15.007 39      40
+NULL   NULL    0       40
 PREHOOK: query: -- SUM of timestamps are not vectorized reduce-side because 
they produce a double instead of a long (HIVE-8211)...
 EXPLAIN SELECT
   sum(ctimestamp1)
@@ -680,11 +682,11 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: alltypesorc_string
-            Statistics: Num rows: 40 Data size: 5694 Basic stats: COMPLETE 
Column stats: NONE
+            Statistics: Num rows: 40 Data size: 84 Basic stats: COMPLETE 
Column stats: NONE
             Select Operator
               expressions: ctimestamp1 (type: timestamp)
               outputColumnNames: _col0
-              Statistics: Num rows: 40 Data size: 5694 Basic stats: COMPLETE 
Column stats: NONE
+              Statistics: Num rows: 40 Data size: 84 Basic stats: COMPLETE 
Column stats: NONE
               Group By Operator
                 aggregations: sum(_col0)
                 mode: hash
@@ -726,7 +728,7 @@ FROM alltypesorc_string
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@alltypesorc_string
 #### A masked pattern was here ####
-1123143.8569999998
+NULL
 PREHOOK: query: EXPLAIN SELECT
   avg(ctimestamp1),
   variance(ctimestamp1),
@@ -759,11 +761,11 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: alltypesorc_string
-            Statistics: Num rows: 40 Data size: 5694 Basic stats: COMPLETE 
Column stats: NONE
+            Statistics: Num rows: 40 Data size: 84 Basic stats: COMPLETE 
Column stats: NONE
             Select Operator
               expressions: ctimestamp1 (type: timestamp)
               outputColumnNames: _col0
-              Statistics: Num rows: 40 Data size: 5694 Basic stats: COMPLETE 
Column stats: NONE
+              Statistics: Num rows: 40 Data size: 84 Basic stats: COMPLETE 
Column stats: NONE
               Group By Operator
                 aggregations: avg(_col0), variance(_col0), var_pop(_col0), 
var_samp(_col0), std(_col0), stddev(_col0), stddev_pop(_col0), 
stddev_samp(_col0)
                 mode: hash
@@ -820,4 +822,4 @@ FROM alltypesorc_string
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@alltypesorc_string
 #### A masked pattern was here ####
-2.8798560435897438E13  8.970772952794212E19    8.970772952794212E19    
9.206845925236166E19    9.471416447815084E9     9.471416447815084E9     
9.471416447815084E9     9.595231068211002E9
+NULL   NULL    NULL    NULL    NULL    NULL    NULL    NULL

Reply via email to