http://git-wip-us.apache.org/repos/asf/hive/blob/0427ffa5/ql/src/test/results/clientpositive/llap/vector_windowing.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/vector_windowing.q.out 
b/ql/src/test/results/clientpositive/llap/vector_windowing.q.out
index a5d6167..ebc437e 100644
--- a/ql/src/test/results/clientpositive/llap/vector_windowing.q.out
+++ b/ql/src/test/results/clientpositive/llap/vector_windowing.q.out
@@ -88,7 +88,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col1 ASC NULLS FIRST
+                        order by: _col1 ASC NULLS LAST
                         partition by: _col2
                         raw input shape:
                         window functions:
@@ -292,7 +292,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col1 ASC NULLS FIRST
+                        order by: _col1 ASC NULLS LAST
                         partition by: _col0
                         raw input shape:
                         window functions:
@@ -499,7 +499,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col1 ASC NULLS FIRST
+                        order by: _col1 ASC NULLS LAST
                         partition by: _col0
                         raw input shape:
                         window functions:
@@ -659,7 +659,7 @@ STAGE PLANS:
             Reduce Vectorization:
                 enabled: true
                 enableConditionsMet: hive.vectorized.execution.reduce.enabled 
IS true, hive.execution.engine tez IN [tez, spark] IS true
-                reduceColumnNullOrder: aa
+                reduceColumnNullOrder: az
                 reduceColumnSortOrder: ++
                 allNative: false
                 usesVectorUDFAdaptor: false
@@ -687,7 +687,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col1 ASC NULLS FIRST
+                        order by: _col1 ASC NULLS LAST
                         partition by: _col2
                         raw input shape:
                         window functions:
@@ -869,7 +869,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col1 ASC NULLS FIRST
+                        order by: _col1 ASC NULLS LAST
                         partition by: _col2
                         raw input shape:
                         window functions:
@@ -1070,7 +1070,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col1 ASC NULLS FIRST
+                        order by: _col1 ASC NULLS LAST
                         partition by: _col2
                         raw input shape:
                         window functions:
@@ -1321,7 +1321,7 @@ STAGE PLANS:
                       Partition table definition
                         input alias: abc
                         name: noop
-                        order by: _col1 ASC NULLS FIRST
+                        order by: _col1 ASC NULLS LAST
                         output shape: _col0: int, _col1: string, _col2: 
string, _col5: int, _col7: double
                         partition by: _col2
                         raw input shape:
@@ -1373,7 +1373,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col1 ASC NULLS FIRST
+                        order by: _col1 ASC NULLS LAST
                         partition by: _col2
                         raw input shape:
                         window functions:
@@ -1561,7 +1561,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col1 ASC NULLS FIRST, _col5 DESC NULLS LAST
+                        order by: _col1 ASC NULLS LAST, _col5 DESC NULLS LAST
                         partition by: _col2
                         raw input shape:
                         window functions:
@@ -1720,7 +1720,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col1 ASC NULLS FIRST
+                        order by: _col1 ASC NULLS LAST
                         partition by: _col2
                         raw input shape:
                         window functions:
@@ -1896,7 +1896,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col1 ASC NULLS FIRST
+                        order by: _col1 ASC NULLS LAST
                         partition by: _col2
                         raw input shape:
                         window functions:
@@ -2074,7 +2074,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col1 ASC NULLS FIRST
+                        order by: _col1 ASC NULLS LAST
                         partition by: _col2
                         raw input shape:
                         window functions:
@@ -2264,7 +2264,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col1 ASC NULLS FIRST
+                        order by: _col1 ASC NULLS LAST
                         partition by: 'Manufacturer#3'
                         raw input shape:
                         window functions:
@@ -2430,7 +2430,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col1 ASC NULLS FIRST
+                        order by: _col1 ASC NULLS LAST
                         partition by: _col2
                         raw input shape:
                         window functions:
@@ -2580,7 +2580,7 @@ STAGE PLANS:
             Reduce Vectorization:
                 enabled: true
                 enableConditionsMet: hive.vectorized.execution.reduce.enabled 
IS true, hive.execution.engine tez IN [tez, spark] IS true
-                reduceColumnNullOrder: aa
+                reduceColumnNullOrder: az
                 reduceColumnSortOrder: ++
                 allNative: false
                 usesVectorUDFAdaptor: false
@@ -2608,7 +2608,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col1 ASC NULLS FIRST
+                        order by: _col1 ASC NULLS LAST
                         partition by: _col2
                         raw input shape:
                         window functions:
@@ -2815,7 +2815,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col1 ASC NULLS FIRST
+                        order by: _col1 ASC NULLS LAST
                         partition by: _col2
                         raw input shape:
                         window functions:
@@ -2916,7 +2916,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col12 ASC NULLS FIRST, _col11 ASC NULLS 
FIRST
+                        order by: _col12 ASC NULLS LAST, _col11 ASC NULLS LAST
                         partition by: _col12
                         raw input shape:
                         window functions:
@@ -3106,7 +3106,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col1 ASC NULLS FIRST
+                        order by: _col1 ASC NULLS LAST
                         partition by: _col2
                         raw input shape:
                         window functions:
@@ -3169,7 +3169,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col9 ASC NULLS FIRST
+                        order by: _col9 ASC NULLS LAST
                         partition by: _col6
                         raw input shape:
                         window functions:
@@ -3211,7 +3211,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col7 ASC NULLS FIRST, _col6 ASC NULLS FIRST
+                        order by: _col7 ASC NULLS LAST, _col6 ASC NULLS LAST
                         partition by: _col7
                         raw input shape:
                         window functions:
@@ -3368,7 +3368,7 @@ STAGE PLANS:
             Reduce Vectorization:
                 enabled: true
                 enableConditionsMet: hive.vectorized.execution.reduce.enabled 
IS true, hive.execution.engine tez IN [tez, spark] IS true
-                reduceColumnNullOrder: aa
+                reduceColumnNullOrder: az
                 reduceColumnSortOrder: ++
                 allNative: true
                 usesVectorUDFAdaptor: false
@@ -3396,7 +3396,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col1 ASC NULLS FIRST
+                        order by: _col1 ASC NULLS LAST
                         partition by: _col2
                         raw input shape:
                         window functions:
@@ -3468,7 +3468,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col4 ASC NULLS FIRST, _col3 ASC NULLS FIRST
+                        order by: _col4 ASC NULLS LAST, _col3 ASC NULLS LAST
                         partition by: _col4
                         raw input shape:
                         window functions:
@@ -3636,7 +3636,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col2 ASC NULLS FIRST, _col1 ASC NULLS FIRST
+                        order by: _col2 ASC NULLS LAST, _col1 ASC NULLS LAST
                         partition by: _col2
                         raw input shape:
                         window functions:
@@ -3892,7 +3892,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col1 ASC NULLS FIRST, _col0 ASC NULLS FIRST
+                        order by: _col1 ASC NULLS LAST, _col0 ASC NULLS LAST
                         partition by: _col1
                         raw input shape:
                         window functions:
@@ -4073,7 +4073,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col2 ASC NULLS FIRST, _col1 ASC NULLS FIRST
+                        order by: _col2 ASC NULLS LAST, _col1 ASC NULLS LAST
                         partition by: _col2
                         raw input shape:
                         window functions:
@@ -4269,7 +4269,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col2 ASC NULLS FIRST, _col1 ASC NULLS FIRST
+                        order by: _col2 ASC NULLS LAST, _col1 ASC NULLS LAST
                         partition by: _col2
                         raw input shape:
                         window functions:
@@ -4538,7 +4538,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col0 ASC NULLS FIRST
+                        order by: _col0 ASC NULLS LAST
                         partition by: _col0
                         raw input shape:
                         window functions:
@@ -4563,7 +4563,7 @@ STAGE PLANS:
             Reduce Vectorization:
                 enabled: true
                 enableConditionsMet: hive.vectorized.execution.reduce.enabled 
IS true, hive.execution.engine tez IN [tez, spark] IS true
-                reduceColumnNullOrder: aa
+                reduceColumnNullOrder: zz
                 reduceColumnSortOrder: ++
                 allNative: false
                 usesVectorUDFAdaptor: false
@@ -4817,7 +4817,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col1 ASC NULLS FIRST
+                        order by: _col1 ASC NULLS LAST
                         partition by: _col2
                         raw input shape:
                         window functions:
@@ -4983,7 +4983,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col2 ASC NULLS FIRST, _col4 ASC NULLS FIRST
+                        order by: _col2 ASC NULLS LAST, _col4 ASC NULLS LAST
                         partition by: _col0
                         raw input shape:
                         window functions:
@@ -5351,7 +5351,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col1 ASC NULLS FIRST
+                        order by: _col1 ASC NULLS LAST
                         partition by: _col2
                         raw input shape:
                         window functions:
@@ -5442,7 +5442,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col1 ASC NULLS FIRST
+                        order by: _col1 ASC NULLS LAST
                         partition by: _col2
                         raw input shape:
                         window functions:
@@ -5499,7 +5499,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col8 ASC NULLS FIRST
+                        order by: _col8 ASC NULLS LAST
                         partition by: _col5
                         raw input shape:
                         window functions:
@@ -5541,7 +5541,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col6 ASC NULLS FIRST, _col5 ASC NULLS FIRST
+                        order by: _col6 ASC NULLS LAST, _col5 ASC NULLS LAST
                         partition by: _col6
                         raw input shape:
                         window functions:
@@ -5602,7 +5602,7 @@ STAGE PLANS:
             Reduce Vectorization:
                 enabled: true
                 enableConditionsMet: hive.vectorized.execution.reduce.enabled 
IS true, hive.execution.engine tez IN [tez, spark] IS true
-                reduceColumnNullOrder: aa
+                reduceColumnNullOrder: az
                 reduceColumnSortOrder: ++
                 allNative: true
                 usesVectorUDFAdaptor: false
@@ -5630,7 +5630,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col1 ASC NULLS FIRST
+                        order by: _col1 ASC NULLS LAST
                         partition by: _col2
                         raw input shape:
                         window functions:
@@ -5702,7 +5702,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col4 ASC NULLS FIRST, _col3 ASC NULLS FIRST
+                        order by: _col4 ASC NULLS LAST, _col3 ASC NULLS LAST
                         partition by: _col4
                         raw input shape:
                         window functions:
@@ -6089,7 +6089,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col1 ASC NULLS FIRST
+                        order by: _col1 ASC NULLS LAST
                         partition by: _col0
                         raw input shape:
                         window functions:
@@ -6269,7 +6269,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col5 ASC NULLS FIRST
+                        order by: _col5 ASC NULLS LAST
                         partition by: _col2
                         raw input shape:
                         window functions:
@@ -6433,7 +6433,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col1 ASC NULLS FIRST
+                        order by: _col1 ASC NULLS LAST
                         partition by: _col2
                         raw input shape:
                         window functions:
@@ -6589,7 +6589,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col1 ASC NULLS FIRST
+                        order by: _col1 ASC NULLS LAST
                         partition by: _col2
                         raw input shape:
                         window functions:
@@ -6751,7 +6751,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col1 ASC NULLS FIRST
+                        order by: _col1 ASC NULLS LAST
                         partition by: _col2
                         raw input shape:
                         window functions:
@@ -6923,7 +6923,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col1 ASC NULLS FIRST
+                        order by: _col1 ASC NULLS LAST
                         partition by: _col2
                         raw input shape:
                         window functions:
@@ -7089,7 +7089,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col1 ASC NULLS FIRST
+                        order by: _col1 ASC NULLS LAST
                         partition by: _col2
                         raw input shape:
                         window functions:
@@ -7265,7 +7265,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col1 ASC NULLS FIRST
+                        order by: _col1 ASC NULLS LAST
                         partition by: _col2
                         raw input shape:
                         window functions:
@@ -7445,7 +7445,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col1 ASC NULLS FIRST
+                        order by: _col1 ASC NULLS LAST
                         partition by: _col2
                         raw input shape:
                         window functions:
@@ -7624,7 +7624,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col1 ASC NULLS FIRST
+                        order by: _col1 ASC NULLS LAST
                         partition by: _col2
                         raw input shape:
                         window functions:
@@ -7805,7 +7805,7 @@ STAGE PLANS:
             Reduce Vectorization:
                 enabled: true
                 enableConditionsMet: hive.vectorized.execution.reduce.enabled 
IS true, hive.execution.engine tez IN [tez, spark] IS true
-                reduceColumnNullOrder: aa
+                reduceColumnNullOrder: az
                 reduceColumnSortOrder: ++
                 allNative: false
                 usesVectorUDFAdaptor: false
@@ -7833,7 +7833,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col1 ASC NULLS FIRST
+                        order by: _col1 ASC NULLS LAST
                         partition by: _col2
                         raw input shape:
                         window functions:
@@ -7955,6 +7955,7 @@ STAGE PLANS:
 #### A masked pattern was here ####
       Edges:
         Reducer 2 <- Map 1 (SIMPLE_EDGE)
+        Reducer 3 <- Reducer 2 (SIMPLE_EDGE)
 #### A masked pattern was here ####
       Vertices:
         Map 1 
@@ -8000,16 +8001,16 @@ STAGE PLANS:
             Reduce Vectorization:
                 enabled: true
                 enableConditionsMet: hive.vectorized.execution.reduce.enabled 
IS true, hive.execution.engine tez IN [tez, spark] IS true
-                reduceColumnNullOrder: a
+                reduceColumnNullOrder: z
                 reduceColumnSortOrder: +
-                allNative: false
+                allNative: true
                 usesVectorUDFAdaptor: false
                 vectorized: true
                 rowBatchContext:
                     dataColumnCount: 2
                     dataColumns: KEY.reducesinkkey0:string, VALUE._col6:double
                     partitionColumnCount: 0
-                    scratchColumnTypeNames: [double, double, double, double, 
bigint, double, double]
+                    scratchColumnTypeNames: [double, double]
             Reduce Operator Tree:
               Select Operator
                 expressions: KEY.reducesinkkey0 (type: string), VALUE._col6 
(type: double)
@@ -8028,7 +8029,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col2 ASC NULLS FIRST
+                        order by: _col2 ASC NULLS LAST
                         partition by: _col2
                         raw input shape:
                         window functions:
@@ -8039,50 +8040,121 @@ STAGE PLANS:
                               window function: GenericUDAFSumDouble
                               window frame: RANGE PRECEDING(MAX)~CURRENT
                             window function definition
-                              alias: min_window_1
-                              arguments: _col7
-                              name: min
-                              window function: GenericUDAFMinEvaluator
-                              window frame: ROWS PRECEDING(MAX)~FOLLOWING(MAX)
-                            window function definition
                               alias: max_window_2
                               arguments: _col7
                               name: max
                               window function: GenericUDAFMaxEvaluator
                               window frame: RANGE PRECEDING(MAX)~CURRENT
+                  PTF Vectorization:
+                      className: VectorPTFOperator
+                      evaluatorClasses: [VectorPTFEvaluatorDoubleSum, 
VectorPTFEvaluatorDoubleMax]
+                      functionInputExpressions: [col 1:double, col 1:double]
+                      functionNames: [sum, max]
+                      keyInputColumns: [0]
+                      native: true
+                      nonKeyInputColumns: [1]
+                      orderExpressions: [col 0:string]
+                      outputColumns: [2, 3, 0, 1]
+                      outputTypes: [double, double, string, double]
+                      streamingColumns: []
+                  Statistics: Num rows: 26 Data size: 9724 Basic stats: 
COMPLETE Column stats: COMPLETE
+                  Select Operator
+                    expressions: sum_window_0 (type: double), max_window_2 
(type: double), _col2 (type: string), _col7 (type: double)
+                    outputColumnNames: sum_window_0, max_window_2, _col2, _col7
+                    Select Vectorization:
+                        className: VectorSelectOperator
+                        native: true
+                        projectedOutputColumnNums: [2, 3, 0, 1]
+                    Statistics: Num rows: 26 Data size: 9724 Basic stats: 
COMPLETE Column stats: COMPLETE
+                    Reduce Output Operator
+                      key expressions: _col2 (type: string)
+                      sort order: +
+                      Map-reduce partition columns: _col2 (type: string)
+                      Reduce Sink Vectorization:
+                          className: VectorReduceSinkObjectHashOperator
+                          keyColumnNums: [0]
+                          native: true
+                          nativeConditionsMet: 
hive.vectorized.execution.reducesink.new.enabled IS true, hive.execution.engine 
tez IN [tez, spark] IS true, No PTF TopN IS true, No DISTINCT columns IS true, 
BinarySortableSerDe for keys IS true, LazyBinarySerDe for values IS true
+                          partitionColumnNums: [0]
+                          valueColumnNums: [2, 3, 1]
+                      Statistics: Num rows: 26 Data size: 9724 Basic stats: 
COMPLETE Column stats: COMPLETE
+                      value expressions: sum_window_0 (type: double), 
max_window_2 (type: double), _col7 (type: double)
+        Reducer 3 
+            Execution mode: vectorized, llap
+            Reduce Vectorization:
+                enabled: true
+                enableConditionsMet: hive.vectorized.execution.reduce.enabled 
IS true, hive.execution.engine tez IN [tez, spark] IS true
+                reduceColumnNullOrder: a
+                reduceColumnSortOrder: +
+                allNative: false
+                usesVectorUDFAdaptor: false
+                vectorized: true
+                rowBatchContext:
+                    dataColumnCount: 4
+                    dataColumns: KEY.reducesinkkey0:string, 
VALUE._col0:double, VALUE._col1:double, VALUE._col8:double
+                    partitionColumnCount: 0
+                    scratchColumnTypeNames: [double, double, bigint, double, 
double]
+            Reduce Operator Tree:
+              Select Operator
+                expressions: VALUE._col0 (type: double), VALUE._col1 (type: 
double), KEY.reducesinkkey0 (type: string), VALUE._col8 (type: double)
+                outputColumnNames: _col0, _col1, _col4, _col9
+                Select Vectorization:
+                    className: VectorSelectOperator
+                    native: true
+                    projectedOutputColumnNums: [1, 2, 0, 3]
+                Statistics: Num rows: 26 Data size: 10140 Basic stats: 
COMPLETE Column stats: COMPLETE
+                PTF Operator
+                  Function definitions:
+                      Input definition
+                        input alias: ptf_0
+                        output shape: _col0: double, _col1: double, _col4: 
string, _col9: double
+                        type: WINDOWING
+                      Windowing table definition
+                        input alias: ptf_1
+                        name: windowingtablefunction
+                        order by: _col4 ASC NULLS FIRST
+                        partition by: _col4
+                        raw input shape:
+                        window functions:
+                            window function definition
+                              alias: min_window_1
+                              arguments: _col9
+                              name: min
+                              window function: GenericUDAFMinEvaluator
+                              window frame: ROWS PRECEDING(MAX)~FOLLOWING(MAX)
                             window function definition
                               alias: avg_window_3
-                              arguments: _col7
+                              arguments: _col9
                               name: avg
                               window function: 
GenericUDAFAverageEvaluatorDouble
                               window frame: ROWS PRECEDING(MAX)~FOLLOWING(MAX)
                             window function definition
                               alias: count_window_4
-                              arguments: _col7
+                              arguments: _col9
                               name: count
                               window function: GenericUDAFCountEvaluator
                               window frame: ROWS PRECEDING(MAX)~FOLLOWING(MAX)
                   PTF Vectorization:
                       className: VectorPTFOperator
-                      evaluatorClasses: [VectorPTFEvaluatorDoubleSum, 
VectorPTFEvaluatorDoubleMin, VectorPTFEvaluatorDoubleMax, 
VectorPTFEvaluatorDoubleAvg, VectorPTFEvaluatorCount]
-                      functionInputExpressions: [col 1:double, col 1:double, 
col 1:double, col 1:double, col 1:double]
-                      functionNames: [sum, min, max, avg, count]
+                      evaluatorClasses: [VectorPTFEvaluatorDoubleMin, 
VectorPTFEvaluatorDoubleAvg, VectorPTFEvaluatorCount]
+                      functionInputExpressions: [col 3:double, col 3:double, 
col 3:double]
+                      functionNames: [min, avg, count]
                       keyInputColumns: [0]
                       native: true
-                      nonKeyInputColumns: [1]
+                      nonKeyInputColumns: [1, 2, 3]
                       orderExpressions: [col 0:string]
-                      outputColumns: [2, 3, 4, 5, 6, 0, 1]
-                      outputTypes: [double, double, double, double, bigint, 
string, double]
+                      outputColumns: [4, 5, 6, 1, 2, 0, 3]
+                      outputTypes: [double, double, bigint, double, double, 
string, double]
                       streamingColumns: []
-                  Statistics: Num rows: 26 Data size: 9724 Basic stats: 
COMPLETE Column stats: COMPLETE
+                  Statistics: Num rows: 26 Data size: 10140 Basic stats: 
COMPLETE Column stats: COMPLETE
                   Select Operator
-                    expressions: _col2 (type: string), round(sum_window_0, 2) 
(type: double), min_window_1 (type: double), max_window_2 (type: double), 
round(avg_window_3, 2) (type: double), count_window_4 (type: bigint)
+                    expressions: _col4 (type: string), round(_col0, 2) (type: 
double), min_window_1 (type: double), _col1 (type: double), round(avg_window_3, 
2) (type: double), count_window_4 (type: bigint)
                     outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
                     Select Vectorization:
                         className: VectorSelectOperator
                         native: true
-                        projectedOutputColumnNums: [0, 7, 3, 4, 8, 6]
-                        selectExpressions: 
RoundWithNumDigitsDoubleToDouble(col 2, decimalPlaces 2) -> 7:double, 
RoundWithNumDigitsDoubleToDouble(col 5, decimalPlaces 2) -> 8:double
+                        projectedOutputColumnNums: [0, 7, 4, 2, 8, 6]
+                        selectExpressions: 
RoundWithNumDigitsDoubleToDouble(col 1, decimalPlaces 2) -> 7:double, 
RoundWithNumDigitsDoubleToDouble(col 5, decimalPlaces 2) -> 8:double
                     Statistics: Num rows: 26 Data size: 3588 Basic stats: 
COMPLETE Column stats: COMPLETE
                     File Output Operator
                       compressed: false
@@ -8239,7 +8311,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col2 ASC NULLS FIRST, _col1 ASC NULLS FIRST
+                        order by: _col2 ASC NULLS LAST, _col1 ASC NULLS LAST
                         partition by: _col2, _col1
                         raw input shape:
                         window functions:
@@ -8271,7 +8343,7 @@ STAGE PLANS:
             Reduce Vectorization:
                 enabled: true
                 enableConditionsMet: hive.vectorized.execution.reduce.enabled 
IS true, hive.execution.engine tez IN [tez, spark] IS true
-                reduceColumnNullOrder: aa
+                reduceColumnNullOrder: az
                 reduceColumnSortOrder: ++
                 allNative: false
                 usesVectorUDFAdaptor: false
@@ -8299,7 +8371,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col3 ASC NULLS FIRST
+                        order by: _col3 ASC NULLS LAST
                         partition by: _col4, _col3
                         raw input shape:
                         window functions:
@@ -8463,7 +8535,7 @@ STAGE PLANS:
             Reduce Vectorization:
                 enabled: true
                 enableConditionsMet: hive.vectorized.execution.reduce.enabled 
IS true, hive.execution.engine tez IN [tez, spark] IS true
-                reduceColumnNullOrder: aa
+                reduceColumnNullOrder: az
                 reduceColumnSortOrder: ++
                 allNative: false
                 usesVectorUDFAdaptor: false
@@ -8491,7 +8563,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: substr(_col4, 2) ASC NULLS FIRST
+                        order by: substr(_col4, 2) ASC NULLS LAST
                         partition by: _col2
                         raw input shape:
                         window functions:
@@ -8667,7 +8739,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col1 ASC NULLS FIRST
+                        order by: _col1 ASC NULLS LAST
                         partition by: _col2
                         raw input shape:
                         window functions:
@@ -8805,7 +8877,7 @@ STAGE PLANS:
             Reduce Vectorization:
                 enabled: true
                 enableConditionsMet: hive.vectorized.execution.reduce.enabled 
IS true, hive.execution.engine tez IN [tez, spark] IS true
-                reduceColumnNullOrder: aa
+                reduceColumnNullOrder: az
                 reduceColumnSortOrder: ++
                 allNative: false
                 usesVectorUDFAdaptor: false
@@ -8833,7 +8905,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col5 ASC NULLS FIRST
+                        order by: _col5 ASC NULLS LAST
                         partition by: _col2
                         raw input shape:
                         window functions:
@@ -9008,7 +9080,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col1 ASC NULLS FIRST
+                        order by: _col1 ASC NULLS LAST
                         partition by: _col2
                         raw input shape:
                         window functions:
@@ -9162,7 +9234,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col5 ASC NULLS FIRST
+                        order by: _col5 ASC NULLS LAST
                         partition by: _col2
                         raw input shape:
                         window functions:
@@ -9380,7 +9452,7 @@ STAGE PLANS:
             Reduce Vectorization:
                 enabled: true
                 enableConditionsMet: hive.vectorized.execution.reduce.enabled 
IS true, hive.execution.engine tez IN [tez, spark] IS true
-                reduceColumnNullOrder: a
+                reduceColumnNullOrder: z
                 reduceColumnSortOrder: +
                 allNative: false
                 usesVectorUDFAdaptor: false
@@ -9552,7 +9624,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col5 ASC NULLS FIRST
+                        order by: _col5 ASC NULLS LAST
                         partition by: 'Manufacturer#6'
                         raw input shape:
                         window functions:
@@ -9692,7 +9764,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col1 ASC NULLS FIRST
+                        order by: _col1 ASC NULLS LAST
                         partition by: 'Manufacturer#1'
                         raw input shape:
                         window functions:

http://git-wip-us.apache.org/repos/asf/hive/blob/0427ffa5/ql/src/test/results/clientpositive/llap/vector_windowing_expressions.q.out
----------------------------------------------------------------------
diff --git 
a/ql/src/test/results/clientpositive/llap/vector_windowing_expressions.q.out 
b/ql/src/test/results/clientpositive/llap/vector_windowing_expressions.q.out
index 2bb7730..234b0a4 100644
--- a/ql/src/test/results/clientpositive/llap/vector_windowing_expressions.q.out
+++ b/ql/src/test/results/clientpositive/llap/vector_windowing_expressions.q.out
@@ -134,7 +134,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col7 ASC NULLS FIRST
+                        order by: _col7 ASC NULLS LAST
                         partition by: _col2
                         raw input shape:
                         window functions:
@@ -327,7 +327,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col7 ASC NULLS FIRST
+                        order by: _col7 ASC NULLS LAST
                         partition by: _col2
                         raw input shape:
                         window functions:
@@ -487,7 +487,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col6 ASC NULLS FIRST, _col7 ASC NULLS 
FIRST, _col1 ASC NULLS FIRST, _col4 DESC NULLS LAST
+                        order by: _col6 ASC NULLS LAST, _col7 ASC NULLS LAST, 
_col1 ASC NULLS LAST, _col4 DESC NULLS LAST
                         partition by: _col0
                         raw input shape:
                         window functions:
@@ -710,7 +710,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col2 ASC NULLS FIRST, _col7 ASC NULLS FIRST
+                        order by: _col2 ASC NULLS LAST, _col7 ASC NULLS LAST
                         partition by: _col1
                         raw input shape:
                         window functions:
@@ -933,7 +933,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col1 ASC NULLS FIRST, _col7 ASC NULLS 
FIRST, _col5 ASC NULLS FIRST
+                        order by: _col1 ASC NULLS LAST, _col7 ASC NULLS LAST, 
_col5 ASC NULLS LAST
                         partition by: _col3
                         raw input shape:
                         window functions:
@@ -1157,7 +1157,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col3 ASC NULLS FIRST
+                        order by: _col3 ASC NULLS LAST
                         partition by: _col4
                         raw input shape:
                         window functions:
@@ -1364,7 +1364,7 @@ STAGE PLANS:
             Reduce Vectorization:
                 enabled: true
                 enableConditionsMet: hive.vectorized.execution.reduce.enabled 
IS true, hive.execution.engine tez IN [tez, spark] IS true
-                reduceColumnNullOrder: aa
+                reduceColumnNullOrder: za
                 reduceColumnSortOrder: ++
                 allNative: false
                 usesVectorUDFAdaptor: false
@@ -1392,7 +1392,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col2 ASC NULLS FIRST
+                        order by: _col2 ASC NULLS LAST
                         partition by: _col2, _col4
                         raw input shape:
                         window functions:
@@ -1450,32 +1450,32 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@part
 #### A masked pattern was here ####
 p_mfgr avg_window_0
-Manufacturer#1 1753.76
-Manufacturer#3 1410.39
-Manufacturer#4 1620.67
-Manufacturer#5 1018.1
-Manufacturer#5 1788.73
-Manufacturer#1 1173.15
-Manufacturer#1 1173.15
-Manufacturer#2 1800.7
-Manufacturer#2 1690.68
-Manufacturer#3 1922.98
-Manufacturer#4 1844.92
-Manufacturer#4 1290.35
-Manufacturer#5 1789.69
+Manufacturer#1 1632.66
 Manufacturer#1 1414.42
+Manufacturer#2 1800.7
 Manufacturer#2 1701.6
 Manufacturer#3 1190.27
 Manufacturer#3 1337.29
-Manufacturer#4 1206.26
-Manufacturer#5 1611.66
-Manufacturer#1 1632.66
+Manufacturer#1 1173.15
+Manufacturer#1 1173.15
+Manufacturer#4 1290.35
+Manufacturer#5 1464.48
+Manufacturer#5 1789.69
+Manufacturer#1 1753.76
 Manufacturer#1 1602.59
+Manufacturer#2 1690.68
 Manufacturer#2 2031.98
-Manufacturer#2 1698.66
+Manufacturer#3 1410.39
 Manufacturer#3 1671.68
 Manufacturer#4 1375.42
-Manufacturer#5 1464.48
+Manufacturer#5 1788.73
+Manufacturer#2 1698.66
+Manufacturer#3 1922.98
+Manufacturer#4 1844.92
+Manufacturer#4 1620.67
+Manufacturer#4 1206.26
+Manufacturer#5 1018.1
+Manufacturer#5 1611.66
 PREHOOK: query: explain vectorization detail
 select p_mfgr, avg(p_retailprice) over(partition by p_mfgr order by 
p_type,p_mfgr rows between unbounded preceding and current row) from part
 PREHOOK: type: QUERY
@@ -1558,7 +1558,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col4 ASC NULLS FIRST, _col2 ASC NULLS FIRST
+                        order by: _col4 ASC NULLS LAST, _col2 ASC NULLS LAST
                         partition by: _col2
                         raw input shape:
                         window functions:
@@ -1708,7 +1708,7 @@ STAGE PLANS:
             Reduce Vectorization:
                 enabled: true
                 enableConditionsMet: hive.vectorized.execution.reduce.enabled 
IS true, hive.execution.engine tez IN [tez, spark] IS true
-                reduceColumnNullOrder: aa
+                reduceColumnNullOrder: az
                 reduceColumnSortOrder: ++
                 allNative: false
                 usesVectorUDFAdaptor: false
@@ -1736,7 +1736,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col2 ASC NULLS FIRST
+                        order by: _col2 ASC NULLS LAST
                         partition by: _col8
                         raw input shape:
                         window functions:
@@ -1967,7 +1967,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col7 ASC NULLS FIRST
+                        order by: _col7 ASC NULLS LAST
                         partition by: _col2
                         raw input shape:
                         window functions:
@@ -2135,32 +2135,32 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@part
 #### A masked pattern was here ####
 p_mfgr avg_window_0
-Manufacturer#1 1753.76
-Manufacturer#3 1410.39
-Manufacturer#4 1620.67
-Manufacturer#5 1018.1
-Manufacturer#5 1788.73
-Manufacturer#1 1173.15
-Manufacturer#1 1173.15
-Manufacturer#2 1800.7
-Manufacturer#2 1690.68
-Manufacturer#3 1922.98
-Manufacturer#4 1844.92
-Manufacturer#4 1290.35
-Manufacturer#5 1789.69
+Manufacturer#1 1632.66
 Manufacturer#1 1414.42
+Manufacturer#2 1800.7
 Manufacturer#2 1701.6
 Manufacturer#3 1190.27
 Manufacturer#3 1337.29
-Manufacturer#4 1206.26
-Manufacturer#5 1611.66
-Manufacturer#1 1632.66
+Manufacturer#1 1173.15
+Manufacturer#1 1173.15
+Manufacturer#4 1290.35
+Manufacturer#5 1464.48
+Manufacturer#5 1789.69
+Manufacturer#1 1753.76
 Manufacturer#1 1602.59
+Manufacturer#2 1690.68
 Manufacturer#2 2031.98
-Manufacturer#2 1698.66
+Manufacturer#3 1410.39
 Manufacturer#3 1671.68
 Manufacturer#4 1375.42
-Manufacturer#5 1464.48
+Manufacturer#5 1788.73
+Manufacturer#2 1698.66
+Manufacturer#3 1922.98
+Manufacturer#4 1844.92
+Manufacturer#4 1620.67
+Manufacturer#4 1206.26
+Manufacturer#5 1018.1
+Manufacturer#5 1611.66
 PREHOOK: query: select p_mfgr, avg(p_retailprice) over(partition by p_mfgr 
order by p_type,p_mfgr rows between unbounded preceding and current row) from 
part
 PREHOOK: type: QUERY
 PREHOOK: Input: default@part

http://git-wip-us.apache.org/repos/asf/hive/blob/0427ffa5/ql/src/test/results/clientpositive/llap/vector_windowing_gby.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/vector_windowing_gby.q.out 
b/ql/src/test/results/clientpositive/llap/vector_windowing_gby.q.out
index 993ea61..c978dae 100644
--- a/ql/src/test/results/clientpositive/llap/vector_windowing_gby.q.out
+++ b/ql/src/test/results/clientpositive/llap/vector_windowing_gby.q.out
@@ -213,7 +213,7 @@ STAGE PLANS:
             Reduce Vectorization:
                 enabled: true
                 enableConditionsMet: hive.vectorized.execution.reduce.enabled 
IS true, hive.execution.engine tez IN [tez, spark] IS true
-                reduceColumnNullOrder: aa
+                reduceColumnNullOrder: az
                 reduceColumnSortOrder: ++
                 allNative: false
                 usesVectorUDFAdaptor: false
@@ -241,7 +241,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: (UDFToDouble(_col1) / UDFToDouble(_col2)) 
ASC NULLS FIRST
+                        order by: (UDFToDouble(_col1) / UDFToDouble(_col2)) 
ASC NULLS LAST
                         partition by: 0
                         raw input shape:
                         window functions:

http://git-wip-us.apache.org/repos/asf/hive/blob/0427ffa5/ql/src/test/results/clientpositive/llap/vector_windowing_gby2.q.out
----------------------------------------------------------------------
diff --git 
a/ql/src/test/results/clientpositive/llap/vector_windowing_gby2.q.out 
b/ql/src/test/results/clientpositive/llap/vector_windowing_gby2.q.out
index 493d404..8bc8b4a 100644
--- a/ql/src/test/results/clientpositive/llap/vector_windowing_gby2.q.out
+++ b/ql/src/test/results/clientpositive/llap/vector_windowing_gby2.q.out
@@ -141,7 +141,7 @@ STAGE PLANS:
             Reduce Vectorization:
                 enabled: true
                 enableConditionsMet: hive.vectorized.execution.reduce.enabled 
IS true, hive.execution.engine tez IN [tez, spark] IS true
-                reduceColumnNullOrder: aa
+                reduceColumnNullOrder: az
                 reduceColumnSortOrder: ++
                 allNative: false
                 usesVectorUDFAdaptor: false
@@ -169,7 +169,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col1 ASC NULLS FIRST
+                        order by: _col1 ASC NULLS LAST
                         partition by: 0
                         raw input shape:
                         window functions:
@@ -233,11 +233,11 @@ POSTHOOK: Input: default@cbo_t3
 #### A masked pattern was here ####
 return_rank
 1
-2
-2
-2
-5
-5
+1
+1
+4
+4
+6
 7
 PREHOOK: query: explain vectorization detail
 select avg(cast(ws.key as int)) over (partition by min(ws.value) order by 
sum(ws.c_int)) as return_rank
@@ -375,7 +375,7 @@ STAGE PLANS:
             Reduce Vectorization:
                 enabled: true
                 enableConditionsMet: hive.vectorized.execution.reduce.enabled 
IS true, hive.execution.engine tez IN [tez, spark] IS true
-                reduceColumnNullOrder: aa
+                reduceColumnNullOrder: az
                 reduceColumnSortOrder: ++
                 allNative: false
                 usesVectorUDFAdaptor: false
@@ -403,7 +403,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col2 ASC NULLS FIRST
+                        order by: _col2 ASC NULLS LAST
                         partition by: _col1
                         raw input shape:
                         window functions:
@@ -1053,7 +1053,7 @@ STAGE PLANS:
             Reduce Vectorization:
                 enabled: true
                 enableConditionsMet: hive.vectorized.execution.reduce.enabled 
IS true, hive.execution.engine tez IN [tez, spark] IS true
-                reduceColumnNullOrder: aa
+                reduceColumnNullOrder: az
                 reduceColumnSortOrder: ++
                 allNative: false
                 usesVectorUDFAdaptor: false
@@ -1081,7 +1081,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: (UDFToDouble(_col1) / UDFToDouble(_col2)) 
ASC NULLS FIRST
+                        order by: (UDFToDouble(_col1) / UDFToDouble(_col2)) 
ASC NULLS LAST
                         partition by: 0
                         raw input shape:
                         window functions:

http://git-wip-us.apache.org/repos/asf/hive/blob/0427ffa5/ql/src/test/results/clientpositive/llap/vector_windowing_multipartitioning.q.out
----------------------------------------------------------------------
diff --git 
a/ql/src/test/results/clientpositive/llap/vector_windowing_multipartitioning.q.out
 
b/ql/src/test/results/clientpositive/llap/vector_windowing_multipartitioning.q.out
index 1a06f08..5cebdf9 100644
--- 
a/ql/src/test/results/clientpositive/llap/vector_windowing_multipartitioning.q.out
+++ 
b/ql/src/test/results/clientpositive/llap/vector_windowing_multipartitioning.q.out
@@ -110,7 +110,7 @@ STAGE PLANS:
             Reduce Vectorization:
                 enabled: true
                 enableConditionsMet: hive.vectorized.execution.reduce.enabled 
IS true, hive.execution.engine tez IN [tez, spark] IS true
-                reduceColumnNullOrder: aa
+                reduceColumnNullOrder: az
                 reduceColumnSortOrder: ++
                 allNative: false
                 usesVectorUDFAdaptor: false
@@ -138,7 +138,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col1 ASC NULLS FIRST
+                        order by: _col1 ASC NULLS LAST
                         partition by: _col7
                         raw input shape:
                         window functions:
@@ -10827,7 +10827,7 @@ STAGE PLANS:
             Reduce Vectorization:
                 enabled: true
                 enableConditionsMet: hive.vectorized.execution.reduce.enabled 
IS true, hive.execution.engine tez IN [tez, spark] IS true
-                reduceColumnNullOrder: aa
+                reduceColumnNullOrder: az
                 reduceColumnSortOrder: ++
                 allNative: true
                 usesVectorUDFAdaptor: false
@@ -10855,7 +10855,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col6 ASC NULLS FIRST
+                        order by: _col6 ASC NULLS LAST
                         partition by: _col7
                         raw input shape:
                         window functions:
@@ -11176,7 +11176,7 @@ STAGE PLANS:
             Reduce Vectorization:
                 enabled: true
                 enableConditionsMet: hive.vectorized.execution.reduce.enabled 
IS true, hive.execution.engine tez IN [tez, spark] IS true
-                reduceColumnNullOrder: aa
+                reduceColumnNullOrder: az
                 reduceColumnSortOrder: ++
                 allNative: false
                 usesVectorUDFAdaptor: false
@@ -11204,7 +11204,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col5 ASC NULLS FIRST
+                        order by: _col5 ASC NULLS LAST
                         partition by: 0
                         raw input shape:
                         window functions:
@@ -11378,7 +11378,7 @@ STAGE PLANS:
             Reduce Vectorization:
                 enabled: true
                 enableConditionsMet: hive.vectorized.execution.reduce.enabled 
IS true, hive.execution.engine tez IN [tez, spark] IS true
-                reduceColumnNullOrder: aa
+                reduceColumnNullOrder: az
                 reduceColumnSortOrder: ++
                 allNative: true
                 usesVectorUDFAdaptor: false
@@ -11406,7 +11406,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col9 ASC NULLS FIRST
+                        order by: _col9 ASC NULLS LAST
                         partition by: _col7
                         raw input shape:
                         window functions:
@@ -11457,7 +11457,7 @@ STAGE PLANS:
             Reduce Vectorization:
                 enabled: true
                 enableConditionsMet: hive.vectorized.execution.reduce.enabled 
IS true, hive.execution.engine tez IN [tez, spark] IS true
-                reduceColumnNullOrder: aa
+                reduceColumnNullOrder: az
                 reduceColumnSortOrder: ++
                 allNative: false
                 usesVectorUDFAdaptor: false
@@ -11485,7 +11485,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col5 ASC NULLS FIRST
+                        order by: _col5 ASC NULLS LAST
                         partition by: _col2
                         raw input shape:
                         window functions:

http://git-wip-us.apache.org/repos/asf/hive/blob/0427ffa5/ql/src/test/results/clientpositive/llap/vector_windowing_navfn.q.out
----------------------------------------------------------------------
diff --git 
a/ql/src/test/results/clientpositive/llap/vector_windowing_navfn.q.out 
b/ql/src/test/results/clientpositive/llap/vector_windowing_navfn.q.out
index 42e9694..5e8f1b9 100644
--- a/ql/src/test/results/clientpositive/llap/vector_windowing_navfn.q.out
+++ b/ql/src/test/results/clientpositive/llap/vector_windowing_navfn.q.out
@@ -261,7 +261,7 @@ STAGE PLANS:
             Reduce Vectorization:
                 enabled: true
                 enableConditionsMet: hive.vectorized.execution.reduce.enabled 
IS true, hive.execution.engine tez IN [tez, spark] IS true
-                reduceColumnNullOrder: aa
+                reduceColumnNullOrder: az
                 reduceColumnSortOrder: ++
                 allNative: false
                 usesVectorUDFAdaptor: false
@@ -289,7 +289,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col9 ASC NULLS FIRST
+                        order by: _col9 ASC NULLS LAST
                         partition by: _col5
                         raw input shape:
                         window functions:
@@ -535,7 +535,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col5 ASC NULLS FIRST, _col2 DESC NULLS LAST
+                        order by: _col5 ASC NULLS LAST, _col2 DESC NULLS LAST
                         partition by: _col10
                         raw input shape:
                         window functions:
@@ -758,7 +758,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col7 ASC NULLS FIRST, _col2 ASC NULLS 
FIRST, _col9 ASC NULLS FIRST
+                        order by: _col7 ASC NULLS LAST, _col2 ASC NULLS LAST, 
_col9 ASC NULLS LAST
                         partition by: _col2
                         raw input shape:
                         window functions:
@@ -966,7 +966,7 @@ STAGE PLANS:
             Reduce Vectorization:
                 enabled: true
                 enableConditionsMet: hive.vectorized.execution.reduce.enabled 
IS true, hive.execution.engine tez IN [tez, spark] IS true
-                reduceColumnNullOrder: aa
+                reduceColumnNullOrder: az
                 reduceColumnSortOrder: ++
                 allNative: false
                 usesVectorUDFAdaptor: false
@@ -994,7 +994,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col4 ASC NULLS FIRST
+                        order by: _col4 ASC NULLS LAST
                         partition by: _col5
                         raw input shape:
                         window functions:
@@ -1239,7 +1239,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col7 ASC NULLS FIRST
+                        order by: _col7 ASC NULLS LAST
                         partition by: _col6
                         raw input shape:
                         window functions:
@@ -1456,7 +1456,7 @@ STAGE PLANS:
             Reduce Vectorization:
                 enabled: true
                 enableConditionsMet: hive.vectorized.execution.reduce.enabled 
IS true, hive.execution.engine tez IN [tez, spark] IS true
-                reduceColumnNullOrder: aa
+                reduceColumnNullOrder: az
                 reduceColumnSortOrder: ++
                 allNative: false
                 usesVectorUDFAdaptor: false
@@ -1484,7 +1484,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col7 ASC NULLS FIRST
+                        order by: _col7 ASC NULLS LAST
                         partition by: UDFToByte(10)
                         raw input shape:
                         window functions:
@@ -1664,7 +1664,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col1 ASC NULLS FIRST
+                        order by: _col1 ASC NULLS LAST
                         partition by: _col0
                         raw input shape:
                         window functions:
@@ -1735,11 +1735,11 @@ a       b       first_value_window_0    
first_value_window_1    first_value_window_2    first_value_w
 1      NULL    NULL    NULL    NULL    NULL
 1      NULL    NULL    NULL    NULL    NULL
 1      NULL    NULL    NULL    NULL    NULL
-2      NULL    NULL    NULL    NULL    NULL
-2      NULL    NULL    1       NULL    1
-2      1       NULL    1       NULL    1
-2      2       1       1       NULL    1
-2      3       2       2       NULL    1
+2      1       1       1       1       1
+2      2       1       1       1       1
+2      3       2       2       1       1
+2      NULL    3       3       1       1
+2      NULL    NULL    NULL    1       1
 3      1       1       1       1       1
 3      2       1       1       1       1
 3      3       2       2       1       1
@@ -2008,7 +2008,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col1 ASC NULLS FIRST
+                        order by: _col1 ASC NULLS LAST
                         partition by: _col0
                         raw input shape:
                         window functions:
@@ -2079,11 +2079,11 @@ a       b       last_value_window_0     
last_value_window_1     last_value_window_2     last_value_windo
 1      NULL    NULL    NULL    NULL    NULL
 1      NULL    NULL    NULL    NULL    NULL
 1      NULL    NULL    NULL    NULL    NULL
-2      NULL    NULL    NULL    NULL    NULL
-2      NULL    1       1       1       1
 2      1       2       2       2       2
 2      2       3       3       3       3
-2      3       3       3       3       3
+2      3       NULL    3       NULL    3
+2      NULL    NULL    3       NULL    3
+2      NULL    NULL    NULL    NULL    3
 3      1       2       2       2       2
 3      2       3       3       3       3
 3      3       4       4       4       4

http://git-wip-us.apache.org/repos/asf/hive/blob/0427ffa5/ql/src/test/results/clientpositive/llap/vector_windowing_order_null.q.out
----------------------------------------------------------------------
diff --git 
a/ql/src/test/results/clientpositive/llap/vector_windowing_order_null.q.out 
b/ql/src/test/results/clientpositive/llap/vector_windowing_order_null.q.out
index 91b52e7..0b09bec 100644
--- a/ql/src/test/results/clientpositive/llap/vector_windowing_order_null.q.out
+++ b/ql/src/test/results/clientpositive/llap/vector_windowing_order_null.q.out
@@ -133,7 +133,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col7 ASC NULLS LAST, _col3 ASC NULLS FIRST
+                        order by: _col7 ASC NULLS LAST, _col3 ASC NULLS LAST
                         partition by: _col2
                         raw input shape:
                         window functions:
@@ -265,7 +265,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col7 ASC NULLS FIRST, _col4 DESC NULLS FIRST
+                        order by: _col7 ASC NULLS LAST, _col4 DESC NULLS FIRST
                         partition by: _col5
                         raw input shape:
                         window functions:
@@ -308,13 +308,13 @@ POSTHOOK: Input: default@over10k_n21
 d      s       f       sum_window_0
 NULL   alice ichabod   NULL    NULL
 NULL   calvin miller   NULL    NULL
-0.01   NULL    NULL    NULL
-0.01   NULL    NULL    NULL
 0.01   calvin miller   8.39    8.390000343322754
-0.02   NULL    NULL    NULL
+0.01   NULL    NULL    8.390000343322754
+0.01   NULL    NULL    8.390000343322754
 0.02   holly polk      5.29    5.289999961853027
 0.02   wendy quirinius 25.5    30.789999961853027
 0.02   yuri laertes    37.59   68.38000011444092
+0.02   NULL    NULL    68.38000011444092
 0.03   nick steinbeck  79.24   79.23999786376953
 PREHOOK: query: explain vectorization detail
 select ts, s, f, sum(f) over (partition by ts order by f asc nulls first range 
between current row and unbounded following) from over10k_n21 limit 10
@@ -530,7 +530,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col7 ASC NULLS FIRST, _col5 DESC NULLS FIRST
+                        order by: _col7 ASC NULLS LAST, _col5 DESC NULLS FIRST
                         partition by: _col0
                         raw input shape:
                         window functions:

http://git-wip-us.apache.org/repos/asf/hive/blob/0427ffa5/ql/src/test/results/clientpositive/llap/vector_windowing_range_multiorder.q.out
----------------------------------------------------------------------
diff --git 
a/ql/src/test/results/clientpositive/llap/vector_windowing_range_multiorder.q.out
 
b/ql/src/test/results/clientpositive/llap/vector_windowing_range_multiorder.q.out
index 782bd9b..c934839 100644
--- 
a/ql/src/test/results/clientpositive/llap/vector_windowing_range_multiorder.q.out
+++ 
b/ql/src/test/results/clientpositive/llap/vector_windowing_range_multiorder.q.out
@@ -110,7 +110,7 @@ STAGE PLANS:
             Reduce Vectorization:
                 enabled: true
                 enableConditionsMet: hive.vectorized.execution.reduce.enabled 
IS true, hive.execution.engine tez IN [tez, spark] IS true
-                reduceColumnNullOrder: aaa
+                reduceColumnNullOrder: azz
                 reduceColumnSortOrder: +++
                 allNative: false
                 usesVectorUDFAdaptor: false
@@ -138,7 +138,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col2 ASC NULLS FIRST, _col3 ASC NULLS FIRST
+                        order by: _col2 ASC NULLS LAST, _col3 ASC NULLS LAST
                         partition by: _col1
                         raw input shape:
                         window functions:
@@ -383,7 +383,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col2 ASC NULLS FIRST, _col4 DESC NULLS LAST
+                        order by: _col2 ASC NULLS LAST, _col4 DESC NULLS LAST
                         partition by: _col1, _col6
                         raw input shape:
                         window functions:
@@ -605,7 +605,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col2 ASC NULLS FIRST, _col4 DESC NULLS LAST
+                        order by: _col2 ASC NULLS LAST, _col4 DESC NULLS LAST
                         partition by: _col1, _col6
                         raw input shape:
                         window functions:
@@ -10960,7 +10960,7 @@ STAGE PLANS:
             Reduce Vectorization:
                 enabled: true
                 enableConditionsMet: hive.vectorized.execution.reduce.enabled 
IS true, hive.execution.engine tez IN [tez, spark] IS true
-                reduceColumnNullOrder: aaa
+                reduceColumnNullOrder: azz
                 reduceColumnSortOrder: +++
                 allNative: false
                 usesVectorUDFAdaptor: false
@@ -10988,7 +10988,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col1 ASC NULLS FIRST, _col2 ASC NULLS FIRST
+                        order by: _col1 ASC NULLS LAST, _col2 ASC NULLS LAST
                         partition by: _col7
                         raw input shape:
                         window functions:
@@ -11217,7 +11217,7 @@ STAGE PLANS:
             Reduce Vectorization:
                 enabled: true
                 enableConditionsMet: hive.vectorized.execution.reduce.enabled 
IS true, hive.execution.engine tez IN [tez, spark] IS true
-                reduceColumnNullOrder: aaa
+                reduceColumnNullOrder: azz
                 reduceColumnSortOrder: +++
                 allNative: false
                 usesVectorUDFAdaptor: false
@@ -11245,7 +11245,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col1 ASC NULLS FIRST, _col2 ASC NULLS FIRST
+                        order by: _col1 ASC NULLS LAST, _col2 ASC NULLS LAST
                         partition by: _col7
                         raw input shape:
                         window functions:
@@ -11474,7 +11474,7 @@ STAGE PLANS:
             Reduce Vectorization:
                 enabled: true
                 enableConditionsMet: hive.vectorized.execution.reduce.enabled 
IS true, hive.execution.engine tez IN [tez, spark] IS true
-                reduceColumnNullOrder: aaz
+                reduceColumnNullOrder: azz
                 reduceColumnSortOrder: ++-
                 allNative: false
                 usesVectorUDFAdaptor: false
@@ -11502,7 +11502,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col1 ASC NULLS FIRST, _col2 DESC NULLS LAST
+                        order by: _col1 ASC NULLS LAST, _col2 DESC NULLS LAST
                         partition by: _col7
                         raw input shape:
                         window functions:
@@ -11731,7 +11731,7 @@ STAGE PLANS:
             Reduce Vectorization:
                 enabled: true
                 enableConditionsMet: hive.vectorized.execution.reduce.enabled 
IS true, hive.execution.engine tez IN [tez, spark] IS true
-                reduceColumnNullOrder: aaaz
+                reduceColumnNullOrder: aazz
                 reduceColumnSortOrder: +++-
                 allNative: false
                 usesVectorUDFAdaptor: false
@@ -11759,7 +11759,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col2 ASC NULLS FIRST, _col4 DESC NULLS LAST
+                        order by: _col2 ASC NULLS LAST, _col4 DESC NULLS LAST
                         partition by: _col1, _col6
                         raw input shape:
                         window functions:

http://git-wip-us.apache.org/repos/asf/hive/blob/0427ffa5/ql/src/test/results/clientpositive/llap/vector_windowing_rank.q.out
----------------------------------------------------------------------
diff --git 
a/ql/src/test/results/clientpositive/llap/vector_windowing_rank.q.out 
b/ql/src/test/results/clientpositive/llap/vector_windowing_rank.q.out
index ff7cf6c..29a9c26 100644
--- a/ql/src/test/results/clientpositive/llap/vector_windowing_rank.q.out
+++ b/ql/src/test/results/clientpositive/llap/vector_windowing_rank.q.out
@@ -110,7 +110,7 @@ STAGE PLANS:
             Reduce Vectorization:
                 enabled: true
                 enableConditionsMet: hive.vectorized.execution.reduce.enabled 
IS true, hive.execution.engine tez IN [tez, spark] IS true
-                reduceColumnNullOrder: aa
+                reduceColumnNullOrder: az
                 reduceColumnSortOrder: ++
                 allNative: false
                 usesVectorUDFAdaptor: false
@@ -138,7 +138,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col0 ASC NULLS FIRST
+                        order by: _col0 ASC NULLS LAST
                         partition by: _col4
                         raw input shape:
                         window functions:
@@ -384,7 +384,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col2 ASC NULLS FIRST, _col7 DESC NULLS LAST
+                        order by: _col2 ASC NULLS LAST, _col7 DESC NULLS LAST
                         partition by: _col8
                         raw input shape:
                         window functions:
@@ -607,7 +607,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col3 ASC NULLS FIRST, _col7 ASC NULLS FIRST
+                        order by: _col3 ASC NULLS LAST, _col7 ASC NULLS LAST
                         partition by: _col6
                         raw input shape:
                         window functions:
@@ -831,7 +831,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col4 ASC NULLS FIRST
+                        order by: _col4 ASC NULLS LAST
                         partition by: _col9
                         raw input shape:
                         window functions:
@@ -1141,7 +1141,7 @@ STAGE PLANS:
             Reduce Vectorization:
                 enabled: true
                 enableConditionsMet: hive.vectorized.execution.reduce.enabled 
IS true, hive.execution.engine tez IN [tez, spark] IS true
-                reduceColumnNullOrder: aa
+                reduceColumnNullOrder: az
                 reduceColumnSortOrder: ++
                 allNative: false
                 usesVectorUDFAdaptor: false
@@ -1169,7 +1169,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col2 ASC NULLS FIRST
+                        order by: _col2 ASC NULLS LAST
                         partition by: _col1
                         raw input shape:
                         window functions:
@@ -1741,7 +1741,7 @@ STAGE PLANS:
             Reduce Vectorization:
                 enabled: true
                 enableConditionsMet: hive.vectorized.execution.reduce.enabled 
IS true, hive.execution.engine tez IN [tez, spark] IS true
-                reduceColumnNullOrder: aa
+                reduceColumnNullOrder: az
                 reduceColumnSortOrder: ++
                 allNative: false
                 usesVectorUDFAdaptor: false
@@ -1769,7 +1769,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col3 ASC NULLS FIRST
+                        order by: _col3 ASC NULLS LAST
                         partition by: _col2
                         raw input shape:
                         window functions:

http://git-wip-us.apache.org/repos/asf/hive/blob/0427ffa5/ql/src/test/results/clientpositive/llap/vector_windowing_streaming.q.out
----------------------------------------------------------------------
diff --git 
a/ql/src/test/results/clientpositive/llap/vector_windowing_streaming.q.out 
b/ql/src/test/results/clientpositive/llap/vector_windowing_streaming.q.out
index 55899ef..67f1b61 100644
--- a/ql/src/test/results/clientpositive/llap/vector_windowing_streaming.q.out
+++ b/ql/src/test/results/clientpositive/llap/vector_windowing_streaming.q.out
@@ -111,7 +111,7 @@ STAGE PLANS:
             Reduce Vectorization:
                 enabled: true
                 enableConditionsMet: hive.vectorized.execution.reduce.enabled 
IS true, hive.execution.engine tez IN [tez, spark] IS true
-                reduceColumnNullOrder: aa
+                reduceColumnNullOrder: az
                 reduceColumnSortOrder: ++
                 allNative: false
                 usesVectorUDFAdaptor: false
@@ -139,7 +139,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col1 ASC NULLS FIRST
+                        order by: _col1 ASC NULLS LAST
                         partition by: _col2
                         raw input shape:
                         window functions:
@@ -257,7 +257,7 @@ STAGE PLANS:
             Reduce Vectorization:
                 enabled: true
                 enableConditionsMet: hive.vectorized.execution.reduce.enabled 
IS true, hive.execution.engine tez IN [tez, spark] IS true
-                reduceColumnNullOrder: aa
+                reduceColumnNullOrder: az
                 reduceColumnSortOrder: ++
                 allNative: false
                 usesVectorUDFAdaptor: false
@@ -285,7 +285,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col1 ASC NULLS FIRST
+                        order by: _col1 ASC NULLS LAST
                         partition by: _col2
                         raw input shape:
                         window functions:
@@ -464,7 +464,7 @@ STAGE PLANS:
             Reduce Vectorization:
                 enabled: true
                 enableConditionsMet: hive.vectorized.execution.reduce.enabled 
IS true, hive.execution.engine tez IN [tez, spark] IS true
-                reduceColumnNullOrder: aa
+                reduceColumnNullOrder: az
                 reduceColumnSortOrder: ++
                 allNative: false
                 usesVectorUDFAdaptor: false
@@ -492,7 +492,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col4 ASC NULLS FIRST
+                        order by: _col4 ASC NULLS LAST
                         partition by: _col0
                         raw input shape:
                         window functions:
@@ -688,7 +688,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col5 ASC NULLS FIRST
+                        order by: _col5 ASC NULLS LAST
                         partition by: _col0
                         raw input shape:
                         window functions:
@@ -752,48 +752,10 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@sb
 #### A masked pattern was here ####
 sb.ctinyint    sb.cdouble      sb.r
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
+NULL   -16379.0        1
+NULL   -16310.0        2
+NULL   -16309.0        3
+NULL   -16307.0        4
 PREHOOK: query: drop table if exists sD
 PREHOOK: type: DROPTABLE
 POSTHOOK: query: drop table if exists sD
@@ -867,7 +829,7 @@ STAGE PLANS:
             Reduce Vectorization:
                 enabled: true
                 enableConditionsMet: hive.vectorized.execution.reduce.enabled 
IS true, hive.execution.engine tez IN [tez, spark] IS true
-                reduceColumnNullOrder: aa
+                reduceColumnNullOrder: az
                 reduceColumnSortOrder: ++
                 allNative: false
                 usesVectorUDFAdaptor: false
@@ -895,7 +857,7 @@ STAGE PLANS:
                       Windowing table definition
                         input alias: ptf_1
                         name: windowingtablefunction
-                        order by: _col5 ASC NULLS FIRST
+                        order by: _col5 ASC NULLS LAST
                         partition by: _col0
                         raw input shape:
                         window functions:
@@ -997,45 +959,7 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@sd
 #### A masked pattern was here ####
 sd.ctinyint    sd.cdouble      sd.r
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
-NULL   NULL    1
+NULL   -16379.0        1
+NULL   -16310.0        2
+NULL   -16309.0        3
+NULL   -16307.0        4

Reply via email to