http://git-wip-us.apache.org/repos/asf/hive/blob/9350b693/ql/src/test/results/clientpositive/spark/router_join_ppr.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/router_join_ppr.q.out 
b/ql/src/test/results/clientpositive/spark/router_join_ppr.q.out
index 7d32a79..853c454 100644
--- a/ql/src/test/results/clientpositive/spark/router_join_ppr.q.out
+++ b/ql/src/test/results/clientpositive/spark/router_join_ppr.q.out
@@ -131,6 +131,7 @@ STAGE PLANS:
                       Statistics: Num rows: 55 Data size: 584 Basic stats: 
COMPLETE Column stats: NONE
                       Reduce Output Operator
                         key expressions: _col0 (type: string)
+                        null sort order: a
                         sort order: +
                         Map-reduce partition columns: _col0 (type: string)
                         Statistics: Num rows: 55 Data size: 584 Basic stats: 
COMPLETE Column stats: NONE
@@ -202,6 +203,7 @@ STAGE PLANS:
                       Statistics: Num rows: 222 Data size: 2358 Basic stats: 
COMPLETE Column stats: NONE
                       Reduce Output Operator
                         key expressions: _col0 (type: string)
+                        null sort order: a
                         sort order: +
                         Map-reduce partition columns: _col0 (type: string)
                         Statistics: Num rows: 222 Data size: 2358 Basic stats: 
COMPLETE Column stats: NONE
@@ -620,6 +622,7 @@ STAGE PLANS:
                       Statistics: Num rows: 111 Data size: 1179 Basic stats: 
COMPLETE Column stats: NONE
                       Reduce Output Operator
                         key expressions: _col0 (type: string)
+                        null sort order: a
                         sort order: +
                         Map-reduce partition columns: _col0 (type: string)
                         Statistics: Num rows: 111 Data size: 1179 Basic stats: 
COMPLETE Column stats: NONE
@@ -740,6 +743,7 @@ STAGE PLANS:
                       Statistics: Num rows: 55 Data size: 584 Basic stats: 
COMPLETE Column stats: NONE
                       Reduce Output Operator
                         key expressions: _col0 (type: string)
+                        null sort order: a
                         sort order: +
                         Map-reduce partition columns: _col0 (type: string)
                         Statistics: Num rows: 55 Data size: 584 Basic stats: 
COMPLETE Column stats: NONE
@@ -1010,6 +1014,7 @@ STAGE PLANS:
                       Statistics: Num rows: 55 Data size: 584 Basic stats: 
COMPLETE Column stats: NONE
                       Reduce Output Operator
                         key expressions: _col0 (type: string)
+                        null sort order: a
                         sort order: +
                         Map-reduce partition columns: _col0 (type: string)
                         Statistics: Num rows: 55 Data size: 584 Basic stats: 
COMPLETE Column stats: NONE
@@ -1081,6 +1086,7 @@ STAGE PLANS:
                       Statistics: Num rows: 111 Data size: 1179 Basic stats: 
COMPLETE Column stats: NONE
                       Reduce Output Operator
                         key expressions: _col0 (type: string)
+                        null sort order: a
                         sort order: +
                         Map-reduce partition columns: _col0 (type: string)
                         Statistics: Num rows: 111 Data size: 1179 Basic stats: 
COMPLETE Column stats: NONE
@@ -1396,6 +1402,7 @@ STAGE PLANS:
                       Statistics: Num rows: 12 Data size: 127 Basic stats: 
COMPLETE Column stats: NONE
                       Reduce Output Operator
                         key expressions: _col0 (type: string)
+                        null sort order: a
                         sort order: +
                         Map-reduce partition columns: _col0 (type: string)
                         Statistics: Num rows: 12 Data size: 127 Basic stats: 
COMPLETE Column stats: NONE
@@ -1516,6 +1523,7 @@ STAGE PLANS:
                       Statistics: Num rows: 6 Data size: 63 Basic stats: 
COMPLETE Column stats: NONE
                       Reduce Output Operator
                         key expressions: _col0 (type: string)
+                        null sort order: a
                         sort order: +
                         Map-reduce partition columns: _col0 (type: string)
                         Statistics: Num rows: 6 Data size: 63 Basic stats: 
COMPLETE Column stats: NONE

http://git-wip-us.apache.org/repos/asf/hive/blob/9350b693/ql/src/test/results/clientpositive/spark/sample10.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/sample10.q.out 
b/ql/src/test/results/clientpositive/spark/sample10.q.out
index 372545a..3130d69 100644
--- a/ql/src/test/results/clientpositive/spark/sample10.q.out
+++ b/ql/src/test/results/clientpositive/spark/sample10.q.out
@@ -77,8 +77,9 @@ TOK_QUERY
             ds
       TOK_ORDERBY
          TOK_TABSORTCOLNAMEASC
-            TOK_TABLE_OR_COL
-               ds
+            TOK_NULLS_FIRST
+               TOK_TABLE_OR_COL
+                  ds
 
 
 STAGE DEPENDENCIES:
@@ -116,6 +117,7 @@ STAGE PLANS:
                         Statistics: Num rows: 20 Data size: 120 Basic stats: 
COMPLETE Column stats: NONE
                         Reduce Output Operator
                           key expressions: _col0 (type: string)
+                          null sort order: a
                           sort order: +
                           Map-reduce partition columns: _col0 (type: string)
                           Statistics: Num rows: 20 Data size: 120 Basic stats: 
COMPLETE Column stats: NONE
@@ -333,6 +335,7 @@ STAGE PLANS:
                 Statistics: Num rows: 10 Data size: 60 Basic stats: COMPLETE 
Column stats: NONE
                 Reduce Output Operator
                   key expressions: _col0 (type: string)
+                  null sort order: a
                   sort order: +
                   Statistics: Num rows: 10 Data size: 60 Basic stats: COMPLETE 
Column stats: NONE
                   tag: -1

http://git-wip-us.apache.org/repos/asf/hive/blob/9350b693/ql/src/test/results/clientpositive/spark/sample6.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/sample6.q.out 
b/ql/src/test/results/clientpositive/spark/sample6.q.out
index 70537de..42dc25b 100644
--- a/ql/src/test/results/clientpositive/spark/sample6.q.out
+++ b/ql/src/test/results/clientpositive/spark/sample6.q.out
@@ -469,11 +469,13 @@ TOK_QUERY
                   s
       TOK_ORDERBY
          TOK_TABSORTCOLNAMEASC
-            TOK_TABLE_OR_COL
-               key
+            TOK_NULLS_FIRST
+               TOK_TABLE_OR_COL
+                  key
          TOK_TABSORTCOLNAMEASC
-            TOK_TABLE_OR_COL
-               value
+            TOK_NULLS_FIRST
+               TOK_TABLE_OR_COL
+                  value
 
 
 STAGE DEPENDENCIES:
@@ -504,6 +506,7 @@ STAGE PLANS:
                       Statistics: Num rows: 500 Data size: 5301 Basic stats: 
COMPLETE Column stats: NONE
                       Reduce Output Operator
                         key expressions: _col0 (type: int), _col1 (type: 
string)
+                        null sort order: aa
                         sort order: ++
                         Statistics: Num rows: 500 Data size: 5301 Basic stats: 
COMPLETE Column stats: NONE
                         tag: -1
@@ -874,11 +877,13 @@ TOK_QUERY
                   s
       TOK_ORDERBY
          TOK_TABSORTCOLNAMEASC
-            TOK_TABLE_OR_COL
-               key
+            TOK_NULLS_FIRST
+               TOK_TABLE_OR_COL
+                  key
          TOK_TABSORTCOLNAMEASC
-            TOK_TABLE_OR_COL
-               value
+            TOK_NULLS_FIRST
+               TOK_TABLE_OR_COL
+                  value
 
 
 STAGE DEPENDENCIES:
@@ -909,6 +914,7 @@ STAGE PLANS:
                       Statistics: Num rows: 500 Data size: 5301 Basic stats: 
COMPLETE Column stats: NONE
                       Reduce Output Operator
                         key expressions: _col0 (type: int), _col1 (type: 
string)
+                        null sort order: aa
                         sort order: ++
                         Statistics: Num rows: 500 Data size: 5301 Basic stats: 
COMPLETE Column stats: NONE
                         tag: -1
@@ -1533,11 +1539,13 @@ TOK_QUERY
                   s
       TOK_ORDERBY
          TOK_TABSORTCOLNAMEASC
-            TOK_TABLE_OR_COL
-               key
+            TOK_NULLS_FIRST
+               TOK_TABLE_OR_COL
+                  key
          TOK_TABSORTCOLNAMEASC
-            TOK_TABLE_OR_COL
-               value
+            TOK_NULLS_FIRST
+               TOK_TABLE_OR_COL
+                  value
 
 
 STAGE DEPENDENCIES:
@@ -1567,6 +1575,7 @@ STAGE PLANS:
                       Statistics: Num rows: 500 Data size: 5301 Basic stats: 
COMPLETE Column stats: NONE
                       Reduce Output Operator
                         key expressions: _col0 (type: int), _col1 (type: 
string)
+                        null sort order: aa
                         sort order: ++
                         Statistics: Num rows: 500 Data size: 5301 Basic stats: 
COMPLETE Column stats: NONE
                         tag: -1
@@ -2034,11 +2043,13 @@ TOK_QUERY
                   s
       TOK_ORDERBY
          TOK_TABSORTCOLNAMEASC
-            TOK_TABLE_OR_COL
-               key
+            TOK_NULLS_FIRST
+               TOK_TABLE_OR_COL
+                  key
          TOK_TABSORTCOLNAMEASC
-            TOK_TABLE_OR_COL
-               value
+            TOK_NULLS_FIRST
+               TOK_TABLE_OR_COL
+                  value
 
 
 STAGE DEPENDENCIES:
@@ -2068,6 +2079,7 @@ STAGE PLANS:
                       Statistics: Num rows: 500 Data size: 5301 Basic stats: 
COMPLETE Column stats: NONE
                       Reduce Output Operator
                         key expressions: _col0 (type: int), _col1 (type: 
string)
+                        null sort order: aa
                         sort order: ++
                         Statistics: Num rows: 500 Data size: 5301 Basic stats: 
COMPLETE Column stats: NONE
                         tag: -1
@@ -2521,11 +2533,13 @@ TOK_QUERY
                   s
       TOK_ORDERBY
          TOK_TABSORTCOLNAMEASC
-            TOK_TABLE_OR_COL
-               key
+            TOK_NULLS_FIRST
+               TOK_TABLE_OR_COL
+                  key
          TOK_TABSORTCOLNAMEASC
-            TOK_TABLE_OR_COL
-               value
+            TOK_NULLS_FIRST
+               TOK_TABLE_OR_COL
+                  value
 
 
 STAGE DEPENDENCIES:
@@ -2556,6 +2570,7 @@ STAGE PLANS:
                       Statistics: Num rows: 250 Data size: 2656 Basic stats: 
COMPLETE Column stats: NONE
                       Reduce Output Operator
                         key expressions: _col0 (type: int), _col1 (type: 
string)
+                        null sort order: aa
                         sort order: ++
                         Statistics: Num rows: 250 Data size: 2656 Basic stats: 
COMPLETE Column stats: NONE
                         tag: -1
@@ -2856,11 +2871,13 @@ TOK_QUERY
                   s
       TOK_ORDERBY
          TOK_TABSORTCOLNAMEASC
-            TOK_TABLE_OR_COL
-               key
+            TOK_NULLS_FIRST
+               TOK_TABLE_OR_COL
+                  key
          TOK_TABSORTCOLNAMEASC
-            TOK_TABLE_OR_COL
-               value
+            TOK_NULLS_FIRST
+               TOK_TABLE_OR_COL
+                  value
 
 
 STAGE DEPENDENCIES:
@@ -2891,6 +2908,7 @@ STAGE PLANS:
                       Statistics: Num rows: 250 Data size: 2656 Basic stats: 
COMPLETE Column stats: NONE
                       Reduce Output Operator
                         key expressions: _col0 (type: int), _col1 (type: 
string)
+                        null sort order: aa
                         sort order: ++
                         Statistics: Num rows: 250 Data size: 2656 Basic stats: 
COMPLETE Column stats: NONE
                         tag: -1
@@ -3068,11 +3086,13 @@ TOK_QUERY
                   s
       TOK_ORDERBY
          TOK_TABSORTCOLNAMEASC
-            TOK_TABLE_OR_COL
-               key
+            TOK_NULLS_FIRST
+               TOK_TABLE_OR_COL
+                  key
          TOK_TABSORTCOLNAMEASC
-            TOK_TABLE_OR_COL
-               value
+            TOK_NULLS_FIRST
+               TOK_TABLE_OR_COL
+                  value
 
 
 STAGE DEPENDENCIES:
@@ -3103,6 +3123,7 @@ STAGE PLANS:
                       Statistics: Num rows: 1 Data size: 0 Basic stats: 
PARTIAL Column stats: NONE
                       Reduce Output Operator
                         key expressions: _col0 (type: int), _col1 (type: 
string)
+                        null sort order: aa
                         sort order: ++
                         Statistics: Num rows: 1 Data size: 0 Basic stats: 
PARTIAL Column stats: NONE
                         tag: -1

http://git-wip-us.apache.org/repos/asf/hive/blob/9350b693/ql/src/test/results/clientpositive/spark/sample8.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/sample8.q.out 
b/ql/src/test/results/clientpositive/spark/sample8.q.out
index 48293e1..1734361 100644
--- a/ql/src/test/results/clientpositive/spark/sample8.q.out
+++ b/ql/src/test/results/clientpositive/spark/sample8.q.out
@@ -107,6 +107,7 @@ STAGE PLANS:
                     Statistics: Num rows: 125 Data size: 1328 Basic stats: 
COMPLETE Column stats: NONE
                     Reduce Output Operator
                       key expressions: key (type: string), value (type: string)
+                      null sort order: aa
                       sort order: ++
                       Map-reduce partition columns: key (type: string), value 
(type: string)
                       Statistics: Num rows: 125 Data size: 1328 Basic stats: 
COMPLETE Column stats: NONE
@@ -175,6 +176,7 @@ STAGE PLANS:
                     Statistics: Num rows: 500 Data size: 5312 Basic stats: 
COMPLETE Column stats: NONE
                     Reduce Output Operator
                       key expressions: key (type: string), value (type: string)
+                      null sort order: aa
                       sort order: ++
                       Map-reduce partition columns: key (type: string), value 
(type: string)
                       Statistics: Num rows: 500 Data size: 5312 Basic stats: 
COMPLETE Column stats: NONE

http://git-wip-us.apache.org/repos/asf/hive/blob/9350b693/ql/src/test/results/clientpositive/spark/smb_mapjoin_11.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/smb_mapjoin_11.q.out 
b/ql/src/test/results/clientpositive/spark/smb_mapjoin_11.q.out
index 2ff157e..a14ca28 100644
--- a/ql/src/test/results/clientpositive/spark/smb_mapjoin_11.q.out
+++ b/ql/src/test/results/clientpositive/spark/smb_mapjoin_11.q.out
@@ -156,6 +156,7 @@ STAGE PLANS:
                         outputColumnNames: _col0, _col1
                         Statistics: Num rows: 550 Data size: 5843 Basic stats: 
COMPLETE Column stats: NONE
                         Reduce Output Operator
+                          null sort order: 
                           sort order: 
                           Map-reduce partition columns: _col0 (type: int)
                           Statistics: Num rows: 550 Data size: 5843 Basic 
stats: COMPLETE Column stats: NONE

http://git-wip-us.apache.org/repos/asf/hive/blob/9350b693/ql/src/test/results/clientpositive/spark/smb_mapjoin_12.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/smb_mapjoin_12.q.out 
b/ql/src/test/results/clientpositive/spark/smb_mapjoin_12.q.out
index f6c92ef..59ad406 100644
--- a/ql/src/test/results/clientpositive/spark/smb_mapjoin_12.q.out
+++ b/ql/src/test/results/clientpositive/spark/smb_mapjoin_12.q.out
@@ -169,6 +169,7 @@ STAGE PLANS:
                         Statistics: Num rows: 1650 Data size: 17529 Basic 
stats: COMPLETE Column stats: NONE
                         Reduce Output Operator
                           key expressions: _col0 (type: int)
+                          null sort order: a
                           sort order: +
                           Map-reduce partition columns: _col0 (type: int)
                           Statistics: Num rows: 1650 Data size: 17529 Basic 
stats: COMPLETE Column stats: NONE
@@ -453,6 +454,7 @@ STAGE PLANS:
                         Statistics: Num rows: 3392 Data size: 36194 Basic 
stats: COMPLETE Column stats: NONE
                         Reduce Output Operator
                           key expressions: _col0 (type: int)
+                          null sort order: a
                           sort order: +
                           Map-reduce partition columns: _col0 (type: int)
                           Statistics: Num rows: 3392 Data size: 36194 Basic 
stats: COMPLETE Column stats: NONE

http://git-wip-us.apache.org/repos/asf/hive/blob/9350b693/ql/src/test/results/clientpositive/spark/smb_mapjoin_13.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/smb_mapjoin_13.q.out 
b/ql/src/test/results/clientpositive/spark/smb_mapjoin_13.q.out
index 41379b6..eee4ddb 100644
--- a/ql/src/test/results/clientpositive/spark/smb_mapjoin_13.q.out
+++ b/ql/src/test/results/clientpositive/spark/smb_mapjoin_13.q.out
@@ -112,10 +112,11 @@ TOK_QUERY
             TOK_ALLCOLREF
       TOK_ORDERBY
          TOK_TABSORTCOLNAMEASC
-            .
-               TOK_TABLE_OR_COL
-                  a
-               key
+            TOK_NULLS_FIRST
+               .
+                  TOK_TABLE_OR_COL
+                     a
+                  key
       TOK_LIMIT
          10
 
@@ -157,6 +158,7 @@ STAGE PLANS:
                         Statistics: Num rows: 550 Data size: 5843 Basic stats: 
COMPLETE Column stats: NONE
                         Reduce Output Operator
                           key expressions: _col0 (type: int)
+                          null sort order: a
                           sort order: +
                           Statistics: Num rows: 550 Data size: 5843 Basic 
stats: COMPLETE Column stats: NONE
                           tag: -1
@@ -322,10 +324,11 @@ TOK_QUERY
             TOK_ALLCOLREF
       TOK_ORDERBY
          TOK_TABSORTCOLNAMEASC
-            .
-               TOK_TABLE_OR_COL
-                  a
-               key
+            TOK_NULLS_FIRST
+               .
+                  TOK_TABLE_OR_COL
+                     a
+                  key
       TOK_LIMIT
          10
 
@@ -444,6 +447,7 @@ STAGE PLANS:
                         Statistics: Num rows: 550 Data size: 5843 Basic stats: 
COMPLETE Column stats: NONE
                         Reduce Output Operator
                           key expressions: _col0 (type: int)
+                          null sort order: a
                           sort order: +
                           Statistics: Num rows: 550 Data size: 5843 Basic 
stats: COMPLETE Column stats: NONE
                           tag: -1

http://git-wip-us.apache.org/repos/asf/hive/blob/9350b693/ql/src/test/results/clientpositive/spark/smb_mapjoin_15.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/smb_mapjoin_15.q.out 
b/ql/src/test/results/clientpositive/spark/smb_mapjoin_15.q.out
index 3779fb6..bafa636 100644
--- a/ql/src/test/results/clientpositive/spark/smb_mapjoin_15.q.out
+++ b/ql/src/test/results/clientpositive/spark/smb_mapjoin_15.q.out
@@ -84,10 +84,11 @@ TOK_QUERY
             TOK_ALLCOLREF
       TOK_ORDERBY
          TOK_TABSORTCOLNAMEASC
-            .
-               TOK_TABLE_OR_COL
-                  a
-               key
+            TOK_NULLS_FIRST
+               .
+                  TOK_TABLE_OR_COL
+                     a
+                  key
       TOK_LIMIT
          10
 
@@ -129,6 +130,7 @@ STAGE PLANS:
                         Statistics: Num rows: 550 Data size: 5843 Basic stats: 
COMPLETE Column stats: NONE
                         Reduce Output Operator
                           key expressions: _col0 (type: int)
+                          null sort order: a
                           sort order: +
                           Statistics: Num rows: 550 Data size: 5843 Basic 
stats: COMPLETE Column stats: NONE
                           tag: -1
@@ -356,10 +358,11 @@ TOK_QUERY
             TOK_ALLCOLREF
       TOK_ORDERBY
          TOK_TABSORTCOLNAMEASC
-            .
-               TOK_TABLE_OR_COL
-                  a
-               key
+            TOK_NULLS_FIRST
+               .
+                  TOK_TABLE_OR_COL
+                     a
+                  key
       TOK_LIMIT
          10
 
@@ -401,6 +404,7 @@ STAGE PLANS:
                         Statistics: Num rows: 550 Data size: 7939 Basic stats: 
COMPLETE Column stats: NONE
                         Reduce Output Operator
                           key expressions: _col0 (type: int)
+                          null sort order: a
                           sort order: +
                           Statistics: Num rows: 550 Data size: 7939 Basic 
stats: COMPLETE Column stats: NONE
                           tag: -1
@@ -576,10 +580,11 @@ TOK_QUERY
             TOK_ALLCOLREF
       TOK_ORDERBY
          TOK_TABSORTCOLNAMEASC
-            .
-               TOK_TABLE_OR_COL
-                  a
-               key
+            TOK_NULLS_FIRST
+               .
+                  TOK_TABLE_OR_COL
+                     a
+                  key
       TOK_LIMIT
          10
 
@@ -621,6 +626,7 @@ STAGE PLANS:
                         Statistics: Num rows: 550 Data size: 7939 Basic stats: 
COMPLETE Column stats: NONE
                         Reduce Output Operator
                           key expressions: _col0 (type: int)
+                          null sort order: a
                           sort order: +
                           Statistics: Num rows: 550 Data size: 7939 Basic 
stats: COMPLETE Column stats: NONE
                           tag: -1
@@ -796,10 +802,11 @@ TOK_QUERY
             TOK_ALLCOLREF
       TOK_ORDERBY
          TOK_TABSORTCOLNAMEASC
-            .
-               TOK_TABLE_OR_COL
-                  a
-               key
+            TOK_NULLS_FIRST
+               .
+                  TOK_TABLE_OR_COL
+                     a
+                  key
       TOK_LIMIT
          10
 
@@ -924,6 +931,7 @@ STAGE PLANS:
                         Statistics: Num rows: 550 Data size: 7939 Basic stats: 
COMPLETE Column stats: NONE
                         Reduce Output Operator
                           key expressions: _col0 (type: int)
+                          null sort order: a
                           sort order: +
                           Statistics: Num rows: 550 Data size: 7939 Basic 
stats: COMPLETE Column stats: NONE
                           tag: -1

http://git-wip-us.apache.org/repos/asf/hive/blob/9350b693/ql/src/test/results/clientpositive/spark/subquery_in.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/subquery_in.q.out 
b/ql/src/test/results/clientpositive/spark/subquery_in.q.out
index 62be682..eb6ff15 100644
--- a/ql/src/test/results/clientpositive/spark/subquery_in.q.out
+++ b/ql/src/test/results/clientpositive/spark/subquery_in.q.out
@@ -331,7 +331,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col5
+                        order by: _col5 ASC NULLS FIRST
                         partition by: _col2
                         raw input shape:
                         window functions:
@@ -507,7 +507,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col5
+                        order by: _col5 ASC NULLS FIRST
                         partition by: _col2
                         raw input shape:
                         window functions:

http://git-wip-us.apache.org/repos/asf/hive/blob/9350b693/ql/src/test/results/clientpositive/spark/transform_ppr1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/transform_ppr1.q.out 
b/ql/src/test/results/clientpositive/spark/transform_ppr1.q.out
index 2f88651..8b8bff6 100644
--- a/ql/src/test/results/clientpositive/spark/transform_ppr1.q.out
+++ b/ql/src/test/results/clientpositive/spark/transform_ppr1.q.out
@@ -135,6 +135,7 @@ STAGE PLANS:
                         Statistics: Num rows: 333 Data size: 3537 Basic stats: 
COMPLETE Column stats: NONE
                         Reduce Output Operator
                           key expressions: _col1 (type: string)
+                          null sort order: a
                           sort order: +
                           Map-reduce partition columns: _col1 (type: string)
                           Statistics: Num rows: 333 Data size: 3537 Basic 
stats: COMPLETE Column stats: NONE

http://git-wip-us.apache.org/repos/asf/hive/blob/9350b693/ql/src/test/results/clientpositive/spark/transform_ppr2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/transform_ppr2.q.out 
b/ql/src/test/results/clientpositive/spark/transform_ppr2.q.out
index dd1a38e..33f0d3e 100644
--- a/ql/src/test/results/clientpositive/spark/transform_ppr2.q.out
+++ b/ql/src/test/results/clientpositive/spark/transform_ppr2.q.out
@@ -137,6 +137,7 @@ STAGE PLANS:
                         Statistics: Num rows: 333 Data size: 3537 Basic stats: 
COMPLETE Column stats: NONE
                         Reduce Output Operator
                           key expressions: _col1 (type: string)
+                          null sort order: a
                           sort order: +
                           Map-reduce partition columns: _col1 (type: string)
                           Statistics: Num rows: 333 Data size: 3537 Basic 
stats: COMPLETE Column stats: NONE

http://git-wip-us.apache.org/repos/asf/hive/blob/9350b693/ql/src/test/results/clientpositive/spark/union24.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/union24.q.out 
b/ql/src/test/results/clientpositive/spark/union24.q.out
index 31f25b5..36ec00f 100644
--- a/ql/src/test/results/clientpositive/spark/union24.q.out
+++ b/ql/src/test/results/clientpositive/spark/union24.q.out
@@ -467,6 +467,7 @@ STAGE PLANS:
                         Statistics: Num rows: 103 Data size: 494 Basic stats: 
COMPLETE Column stats: NONE
                         Reduce Output Operator
                           key expressions: _col0 (type: string)
+                          null sort order: a
                           sort order: +
                           Map-reduce partition columns: _col0 (type: string)
                           Statistics: Num rows: 103 Data size: 494 Basic 
stats: COMPLETE Column stats: NONE
@@ -940,6 +941,7 @@ STAGE PLANS:
                       Statistics: Num rows: 103 Data size: 494 Basic stats: 
COMPLETE Column stats: NONE
                       Reduce Output Operator
                         key expressions: _col0 (type: string)
+                        null sort order: a
                         sort order: +
                         Map-reduce partition columns: _col0 (type: string)
                         Statistics: Num rows: 103 Data size: 494 Basic stats: 
COMPLETE Column stats: NONE
@@ -1010,6 +1012,7 @@ STAGE PLANS:
                       Statistics: Num rows: 103 Data size: 494 Basic stats: 
COMPLETE Column stats: NONE
                       Reduce Output Operator
                         key expressions: _col0 (type: string)
+                        null sort order: a
                         sort order: +
                         Map-reduce partition columns: _col0 (type: string)
                         Statistics: Num rows: 103 Data size: 494 Basic stats: 
COMPLETE Column stats: NONE
@@ -1481,6 +1484,7 @@ STAGE PLANS:
                       Statistics: Num rows: 103 Data size: 494 Basic stats: 
COMPLETE Column stats: NONE
                       Reduce Output Operator
                         key expressions: _col0 (type: string)
+                        null sort order: a
                         sort order: +
                         Map-reduce partition columns: _col0 (type: string)
                         Statistics: Num rows: 103 Data size: 494 Basic stats: 
COMPLETE Column stats: NONE
@@ -1551,6 +1555,7 @@ STAGE PLANS:
                       Statistics: Num rows: 103 Data size: 494 Basic stats: 
COMPLETE Column stats: NONE
                       Reduce Output Operator
                         key expressions: _col0 (type: string)
+                        null sort order: a
                         sort order: +
                         Map-reduce partition columns: _col0 (type: string)
                         Statistics: Num rows: 103 Data size: 494 Basic stats: 
COMPLETE Column stats: NONE
@@ -1624,6 +1629,7 @@ STAGE PLANS:
                   Statistics: Num rows: 113 Data size: 543 Basic stats: 
COMPLETE Column stats: NONE
                   Reduce Output Operator
                     key expressions: _col0 (type: string)
+                    null sort order: a
                     sort order: +
                     Map-reduce partition columns: _col0 (type: string)
                     Statistics: Num rows: 113 Data size: 543 Basic stats: 
COMPLETE Column stats: NONE

http://git-wip-us.apache.org/repos/asf/hive/blob/9350b693/ql/src/test/results/clientpositive/spark/union_ppr.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/union_ppr.q.out 
b/ql/src/test/results/clientpositive/spark/union_ppr.q.out
index e951283..1d2120a 100644
--- a/ql/src/test/results/clientpositive/spark/union_ppr.q.out
+++ b/ql/src/test/results/clientpositive/spark/union_ppr.q.out
@@ -87,25 +87,29 @@ TOK_QUERY
             '2008-04-08'
       TOK_SORTBY
          TOK_TABSORTCOLNAMEASC
-            .
-               TOK_TABLE_OR_COL
-                  A
-               key
+            TOK_NULLS_FIRST
+               .
+                  TOK_TABLE_OR_COL
+                     A
+                  key
          TOK_TABSORTCOLNAMEASC
-            .
-               TOK_TABLE_OR_COL
-                  A
-               value
+            TOK_NULLS_FIRST
+               .
+                  TOK_TABLE_OR_COL
+                     A
+                  value
          TOK_TABSORTCOLNAMEASC
-            .
-               TOK_TABLE_OR_COL
-                  A
-               ds
+            TOK_NULLS_FIRST
+               .
+                  TOK_TABLE_OR_COL
+                     A
+                  ds
          TOK_TABSORTCOLNAMEASC
-            .
-               TOK_TABLE_OR_COL
-                  A
-               hr
+            TOK_NULLS_FIRST
+               .
+                  TOK_TABLE_OR_COL
+                     A
+                  hr
 
 
 STAGE DEPENDENCIES:
@@ -139,6 +143,7 @@ STAGE PLANS:
                         Statistics: Num rows: 666 Data size: 7074 Basic stats: 
COMPLETE Column stats: NONE
                         Reduce Output Operator
                           key expressions: _col0 (type: string), _col1 (type: 
string), '2008-04-08' (type: string), _col3 (type: string)
+                          null sort order: aaaa
                           sort order: ++++
                           Statistics: Num rows: 666 Data size: 7074 Basic 
stats: COMPLETE Column stats: NONE
                           tag: -1
@@ -261,6 +266,7 @@ STAGE PLANS:
                         Statistics: Num rows: 666 Data size: 7074 Basic stats: 
COMPLETE Column stats: NONE
                         Reduce Output Operator
                           key expressions: _col0 (type: string), _col1 (type: 
string), '2008-04-08' (type: string), _col3 (type: string)
+                          null sort order: aaaa
                           sort order: ++++
                           Statistics: Num rows: 666 Data size: 7074 Basic 
stats: COMPLETE Column stats: NONE
                           tag: -1

http://git-wip-us.apache.org/repos/asf/hive/blob/9350b693/ql/src/test/results/clientpositive/spark/union_remove_6_subq.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/union_remove_6_subq.q.out 
b/ql/src/test/results/clientpositive/spark/union_remove_6_subq.q.out
index 22b0fea..3c88c95 100644
--- a/ql/src/test/results/clientpositive/spark/union_remove_6_subq.q.out
+++ b/ql/src/test/results/clientpositive/spark/union_remove_6_subq.q.out
@@ -446,7 +446,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col1
+                        order by: _col1 ASC NULLS FIRST
                         partition by: _col0
                         raw input shape:
                         window functions:

Reply via email to