This is an automated email from the ASF dual-hosted git repository.

krisztiankasa pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hive.git


The following commit(s) were added to refs/heads/master by this push:
     new 14c0150283b HIVE-27527: Order of records is not ensured in delete 
delta files when reduce deduplication is off (Krisztian Kasa, reviewed by Denys 
Kuzmenko)
14c0150283b is described below

commit 14c0150283b70f8801c807d0a96ac634e67cbb83
Author: Krisztian Kasa <[email protected]>
AuthorDate: Thu Jul 27 18:31:02 2023 +0200

    HIVE-27527: Order of records is not ensured in delete delta files when 
reduce deduplication is off (Krisztian Kasa, reviewed by Denys Kuzmenko)
---
 .../hadoop/hive/ql/parse/SemanticAnalyzer.java     |   3 +-
 .../clientpositive/delete_reducesinkdedup_off.q    |   8 ++
 .../clientpositive/llap/acid_no_buckets.q.out      |  18 ++--
 .../llap/delete_reducesinkdedup_off.q.out          | 101 +++++++++++++++++++++
 .../explainanalyze_acid_with_direct_insert.q.out   |  12 ++-
 .../llap/materialized_view_create_rewrite_4.q.out  |   4 +-
 .../llap/materialized_view_create_rewrite_5.q.out  |   4 +-
 .../llap/materialized_view_create_rewrite_6.q.out  |  12 +--
 .../llap/materialized_view_create_rewrite_7.q.out  |   2 +-
 .../llap/materialized_view_create_rewrite_8.q.out  |   2 +-
 .../llap/materialized_view_create_rewrite_9.q.out  |  12 +--
 .../materialized_view_create_rewrite_nulls.q.out   |   2 +-
 ...erialized_view_create_rewrite_one_key_gby.q.out |   2 +-
 .../clientpositive/llap/runtime_stats_merge.q.out  |  16 ++--
 14 files changed, 156 insertions(+), 42 deletions(-)

diff --git a/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java 
b/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
index 61821340921..a331f893d0d 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
@@ -6937,7 +6937,6 @@ public class SemanticAnalyzer extends 
BaseSemanticAnalyzer {
     boolean enforceBucketing = false;
     List<ExprNodeDesc> partnCols = new ArrayList<>();
     List<ExprNodeDesc> sortCols = new ArrayList<>();
-    List<Integer> sortOrders = new ArrayList<>();
     boolean multiFileSpray = false;
     int numFiles = 1;
     int totalFiles = 1;
@@ -6961,6 +6960,8 @@ public class SemanticAnalyzer extends 
BaseSemanticAnalyzer {
       // Non-native acid tables should handle their own bucketing for 
updates/deletes
       if ((updating(dest) || deleting(dest)) && 
!AcidUtils.isNonNativeAcidTable(dest_tab, true)) {
         partnCols = getPartitionColsFromBucketColsForUpdateDelete(input, true);
+        sortCols = getPartitionColsFromBucketColsForUpdateDelete(input, false);
+        createSortOrderForUpdateDelete(sortCols, order, nullOrder);
         enforceBucketing = true;
       }
     }
diff --git a/ql/src/test/queries/clientpositive/delete_reducesinkdedup_off.q 
b/ql/src/test/queries/clientpositive/delete_reducesinkdedup_off.q
new file mode 100644
index 00000000000..690116f2bd3
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/delete_reducesinkdedup_off.q
@@ -0,0 +1,8 @@
+set hive.support.concurrency=true;
+set hive.txn.manager=org.apache.hadoop.hive.ql.lockmgr.DbTxnManager;
+set hive.optimize.reducededuplication=false;
+
+create table t1(a int) stored as orc TBLPROPERTIES ('transactional'='true');
+
+explain
+delete from t1 where a = 3;
diff --git a/ql/src/test/results/clientpositive/llap/acid_no_buckets.q.out 
b/ql/src/test/results/clientpositive/llap/acid_no_buckets.q.out
index 0677800ac2f..0abf4aa76c4 100644
--- a/ql/src/test/results/clientpositive/llap/acid_no_buckets.q.out
+++ b/ql/src/test/results/clientpositive/llap/acid_no_buckets.q.out
@@ -160,8 +160,8 @@ STAGE PLANS:
                           null sort order: z
                           sort order: +
                           Map-reduce partition columns: UDFToInteger(_col0) 
(type: int)
-                          Statistics: Num rows: 500 Data size: 130000 Basic 
stats: COMPLETE Column stats: PARTIAL
-                          value expressions: _col1 (type: string)
+                          Statistics: Num rows: 500 Data size: 173000 Basic 
stats: COMPLETE Column stats: PARTIAL
+                          value expressions: _col1 (type: string), '11' (type: 
string)
                       Select Operator
                         expressions: _col3 (type: string), _col4 (type: 
string), _col1 (type: string), '11' (type: string)
                         outputColumnNames: _col0, _col1, _col2, _col3
@@ -181,7 +181,7 @@ STAGE PLANS:
             Execution mode: llap
             Reduce Operator Tree:
               Select Operator
-                expressions: KEY.reducesinkkey0 (type: 
struct<writeid:bigint,bucketid:int,rowid:bigint>), VALUE._col0 (type: string), 
'11' (type: string)
+                expressions: KEY.reducesinkkey0 (type: 
struct<writeid:bigint,bucketid:int,rowid:bigint>), VALUE._col0 (type: string), 
VALUE._col1 (type: string)
                 outputColumnNames: _col0, _col1, _col2
                 Statistics: Num rows: 500 Data size: 173000 Basic stats: 
COMPLETE Column stats: PARTIAL
                 File Output Operator
@@ -1467,7 +1467,8 @@ STAGE PLANS:
                               native: true
                               nativeConditionsMet: 
hive.vectorized.execution.reducesink.new.enabled IS true, hive.execution.engine 
tez IN [tez] IS true, No PTF TopN IS true, No DISTINCT columns IS true, 
BinarySortableSerDe for keys IS true, LazyBinarySerDe for values IS true
                               partitionColumns: 6:int
-                              valueColumns: 2:string
+                              valueColumns: 2:string, 9:string
+                              valueExpressions: ConstantVectorExpression(val 
11) -> 9:string
                         Select Vectorization:
                             className: VectorSelectOperator
                             native: true
@@ -1494,7 +1495,7 @@ STAGE PLANS:
                     neededVirtualColumns: [ROWID]
                     partitionColumnCount: 2
                     partitionColumns: ds:string, hr:string
-                    scratchColumnTypeNames: [bigint, string, string]
+                    scratchColumnTypeNames: [bigint, string, string, string]
         Reducer 2 
             Execution mode: vectorized, llap
             Reduce Vectorization:
@@ -1506,16 +1507,15 @@ STAGE PLANS:
                 usesVectorUDFAdaptor: false
                 vectorized: true
                 rowBatchContext:
-                    dataColumnCount: 2
-                    dataColumns: 
KEY.reducesinkkey0:struct<writeid:bigint,bucketid:int,rowid:bigint>, 
VALUE._col0:string
+                    dataColumnCount: 3
+                    dataColumns: 
KEY.reducesinkkey0:struct<writeid:bigint,bucketid:int,rowid:bigint>, 
VALUE._col0:string, VALUE._col1:string
                     partitionColumnCount: 0
-                    scratchColumnTypeNames: [string]
+                    scratchColumnTypeNames: []
             Reduce Operator Tree:
                 Select Vectorization:
                     className: VectorSelectOperator
                     native: true
                     projectedOutputColumnNums: [0, 1, 2]
-                    selectExpressions: ConstantVectorExpression(val 11) -> 
2:string
                   File Sink Vectorization:
                       className: VectorFileSinkOperator
                       native: false
diff --git 
a/ql/src/test/results/clientpositive/llap/delete_reducesinkdedup_off.q.out 
b/ql/src/test/results/clientpositive/llap/delete_reducesinkdedup_off.q.out
new file mode 100644
index 00000000000..cb7a49b242e
--- /dev/null
+++ b/ql/src/test/results/clientpositive/llap/delete_reducesinkdedup_off.q.out
@@ -0,0 +1,101 @@
+PREHOOK: query: create table t1(a int) stored as orc TBLPROPERTIES 
('transactional'='true')
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@t1
+POSTHOOK: query: create table t1(a int) stored as orc TBLPROPERTIES 
('transactional'='true')
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@t1
+PREHOOK: query: explain
+delete from t1 where a = 3
+PREHOOK: type: QUERY
+PREHOOK: Input: default@t1
+PREHOOK: Output: default@t1
+POSTHOOK: query: explain
+delete from t1 where a = 3
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1
+POSTHOOK: Output: default@t1
+STAGE DEPENDENCIES:
+  Stage-1 is a root stage
+  Stage-2 depends on stages: Stage-1
+  Stage-0 depends on stages: Stage-2
+  Stage-3 depends on stages: Stage-0
+
+STAGE PLANS:
+  Stage: Stage-1
+    Tez
+#### 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 
+            Map Operator Tree:
+                TableScan
+                  alias: t1
+                  filterExpr: (a = 3) (type: boolean)
+                  Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE 
Column stats: NONE
+                  Filter Operator
+                    predicate: (a = 3) (type: boolean)
+                    Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE 
Column stats: NONE
+                    Select Operator
+                      expressions: ROW__ID (type: 
struct<writeid:bigint,bucketid:int,rowid:bigint>)
+                      outputColumnNames: _col0
+                      Statistics: Num rows: 1 Data size: 4 Basic stats: 
COMPLETE Column stats: NONE
+                      Reduce Output Operator
+                        key expressions: _col0 (type: 
struct<writeid:bigint,bucketid:int,rowid:bigint>)
+                        null sort order: z
+                        sort order: +
+                        Statistics: Num rows: 1 Data size: 4 Basic stats: 
COMPLETE Column stats: NONE
+            Execution mode: vectorized, llap
+            LLAP IO: may be used (ACID table)
+        Reducer 2 
+            Execution mode: vectorized, llap
+            Reduce Operator Tree:
+              Select Operator
+                expressions: KEY.reducesinkkey0 (type: 
struct<writeid:bigint,bucketid:int,rowid:bigint>)
+                outputColumnNames: _col0
+                Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE 
Column stats: NONE
+                Reduce Output Operator
+                  key expressions: _col0 (type: 
struct<writeid:bigint,bucketid:int,rowid:bigint>)
+                  null sort order: z
+                  sort order: +
+                  Map-reduce partition columns: UDFToInteger(_col0) (type: int)
+                  Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE 
Column stats: NONE
+        Reducer 3 
+            Execution mode: vectorized, llap
+            Reduce Operator Tree:
+              Select Operator
+                expressions: KEY.reducesinkkey0 (type: 
struct<writeid:bigint,bucketid:int,rowid:bigint>)
+                outputColumnNames: _col0
+                Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE 
Column stats: NONE
+                File Output Operator
+                  compressed: false
+                  Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE 
Column stats: NONE
+                  table:
+                      input format: 
org.apache.hadoop.hive.ql.io.orc.OrcInputFormat
+                      output format: 
org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
+                      serde: org.apache.hadoop.hive.ql.io.orc.OrcSerde
+                      name: default.t1
+                  Write Type: DELETE
+
+  Stage: Stage-2
+    Dependency Collection
+
+  Stage: Stage-0
+    Move Operator
+      tables:
+          replace: false
+          table:
+              input format: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat
+              output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
+              serde: org.apache.hadoop.hive.ql.io.orc.OrcSerde
+              name: default.t1
+          Write Type: DELETE
+
+  Stage: Stage-3
+    Stats Work
+      Basic Stats Work:
+
diff --git 
a/ql/src/test/results/clientpositive/llap/explainanalyze_acid_with_direct_insert.q.out
 
b/ql/src/test/results/clientpositive/llap/explainanalyze_acid_with_direct_insert.q.out
index 6b33ee77b2d..769a92839f5 100644
--- 
a/ql/src/test/results/clientpositive/llap/explainanalyze_acid_with_direct_insert.q.out
+++ 
b/ql/src/test/results/clientpositive/llap/explainanalyze_acid_with_direct_insert.q.out
@@ -690,6 +690,7 @@ STAGE PLANS:
                       sort order: +
                       Map-reduce partition columns: UDFToInteger(_col0) (type: 
int)
                       Statistics: Num rows: 3/3 Data size: 6434 Basic stats: 
COMPLETE Column stats: NONE
+                      value expressions: 3 (type: int)
                     Select Operator
                       expressions: 11 (type: int), 3 (type: int)
                       outputColumnNames: _col0, _col1
@@ -709,7 +710,7 @@ STAGE PLANS:
             Execution mode: vectorized, llap
             Reduce Operator Tree:
               Select Operator
-                expressions: KEY.reducesinkkey0 (type: 
struct<writeid:bigint,bucketid:int,rowid:bigint>), 3 (type: int)
+                expressions: KEY.reducesinkkey0 (type: 
struct<writeid:bigint,bucketid:int,rowid:bigint>), VALUE._col0 (type: int)
                 outputColumnNames: _col0, _col1
                 Statistics: Num rows: 3/3 Data size: 6434 Basic stats: 
COMPLETE Column stats: NONE
                 File Output Operator
@@ -829,13 +830,14 @@ STAGE PLANS:
                       sort order: +
                       Map-reduce partition columns: UDFToInteger(_col0) (type: 
int)
                       Statistics: Num rows: 2/2 Data size: 6386 Basic stats: 
COMPLETE Column stats: NONE
+                      value expressions: 1 (type: int)
             Execution mode: vectorized, llap
             LLAP IO: may be used (ACID table)
         Reducer 2 
             Execution mode: vectorized, llap
             Reduce Operator Tree:
               Select Operator
-                expressions: KEY.reducesinkkey0 (type: 
struct<writeid:bigint,bucketid:int,rowid:bigint>), 1 (type: int)
+                expressions: KEY.reducesinkkey0 (type: 
struct<writeid:bigint,bucketid:int,rowid:bigint>), VALUE._col0 (type: int)
                 outputColumnNames: _col0, _col1
                 Statistics: Num rows: 2/2 Data size: 6386 Basic stats: 
COMPLETE Column stats: NONE
                 File Output Operator
@@ -1650,6 +1652,7 @@ STAGE PLANS:
                       sort order: +
                       Map-reduce partition columns: UDFToInteger(_col0) (type: 
int)
                       Statistics: Num rows: 3/3 Data size: 6434 Basic stats: 
COMPLETE Column stats: NONE
+                      value expressions: 3 (type: int)
                     Select Operator
                       expressions: 11 (type: int), 3 (type: int)
                       outputColumnNames: _col0, _col1
@@ -1669,7 +1672,7 @@ STAGE PLANS:
             Execution mode: vectorized, llap
             Reduce Operator Tree:
               Select Operator
-                expressions: KEY.reducesinkkey0 (type: 
struct<writeid:bigint,bucketid:int,rowid:bigint>), 3 (type: int)
+                expressions: KEY.reducesinkkey0 (type: 
struct<writeid:bigint,bucketid:int,rowid:bigint>), VALUE._col0 (type: int)
                 outputColumnNames: _col0, _col1
                 Statistics: Num rows: 3/3 Data size: 6434 Basic stats: 
COMPLETE Column stats: NONE
                 File Output Operator
@@ -1789,13 +1792,14 @@ STAGE PLANS:
                       sort order: +
                       Map-reduce partition columns: UDFToInteger(_col0) (type: 
int)
                       Statistics: Num rows: 2/2 Data size: 6386 Basic stats: 
COMPLETE Column stats: NONE
+                      value expressions: 1 (type: int)
             Execution mode: vectorized, llap
             LLAP IO: may be used (ACID table)
         Reducer 2 
             Execution mode: vectorized, llap
             Reduce Operator Tree:
               Select Operator
-                expressions: KEY.reducesinkkey0 (type: 
struct<writeid:bigint,bucketid:int,rowid:bigint>), 1 (type: int)
+                expressions: KEY.reducesinkkey0 (type: 
struct<writeid:bigint,bucketid:int,rowid:bigint>), VALUE._col0 (type: int)
                 outputColumnNames: _col0, _col1
                 Statistics: Num rows: 2/2 Data size: 6386 Basic stats: 
COMPLETE Column stats: NONE
                 File Output Operator
diff --git 
a/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_4.q.out
 
b/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_4.q.out
index 4bc9d5e760c..c7225b9c6df 100644
--- 
a/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_4.q.out
+++ 
b/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_4.q.out
@@ -837,7 +837,7 @@ STAGE PLANS:
                     Statistics: Num rows: 1 Data size: 76 Basic stats: 
COMPLETE Column stats: COMPLETE
                     Reduce Output Operator
                       key expressions: _col0 (type: 
struct<writeid:bigint,bucketid:int,rowid:bigint>)
-                      null sort order: a
+                      null sort order: z
                       sort order: +
                       Map-reduce partition columns: UDFToInteger(_col0) (type: 
int)
                       Statistics: Num rows: 1 Data size: 76 Basic stats: 
COMPLETE Column stats: COMPLETE
@@ -1949,7 +1949,7 @@ STAGE PLANS:
                     Statistics: Num rows: 1 Data size: 76 Basic stats: 
COMPLETE Column stats: COMPLETE
                     Reduce Output Operator
                       key expressions: _col0 (type: 
struct<writeid:bigint,bucketid:int,rowid:bigint>)
-                      null sort order: a
+                      null sort order: z
                       sort order: +
                       Map-reduce partition columns: UDFToInteger(_col0) (type: 
int)
                       Statistics: Num rows: 1 Data size: 76 Basic stats: 
COMPLETE Column stats: COMPLETE
diff --git 
a/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_5.q.out
 
b/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_5.q.out
index f8f128cc062..482c113239b 100644
--- 
a/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_5.q.out
+++ 
b/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_5.q.out
@@ -615,7 +615,7 @@ STAGE PLANS:
                     Statistics: Num rows: 1 Data size: 76 Basic stats: 
COMPLETE Column stats: COMPLETE
                     Reduce Output Operator
                       key expressions: _col0 (type: 
struct<writeid:bigint,bucketid:int,rowid:bigint>)
-                      null sort order: a
+                      null sort order: z
                       sort order: +
                       Map-reduce partition columns: UDFToInteger(_col0) (type: 
int)
                       Statistics: Num rows: 1 Data size: 76 Basic stats: 
COMPLETE Column stats: COMPLETE
@@ -955,7 +955,7 @@ STAGE PLANS:
                     Statistics: Num rows: 1 Data size: 76 Basic stats: 
COMPLETE Column stats: COMPLETE
                     Reduce Output Operator
                       key expressions: _col0 (type: 
struct<writeid:bigint,bucketid:int,rowid:bigint>)
-                      null sort order: a
+                      null sort order: z
                       sort order: +
                       Map-reduce partition columns: UDFToInteger(_col0) (type: 
int)
                       Statistics: Num rows: 1 Data size: 76 Basic stats: 
COMPLETE Column stats: COMPLETE
diff --git 
a/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_6.q.out
 
b/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_6.q.out
index 95ba11a7dd3..49c23f6da6d 100644
--- 
a/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_6.q.out
+++ 
b/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_6.q.out
@@ -298,7 +298,7 @@ STAGE PLANS:
       Edges:
         Reducer 2 <- Map 1 (SIMPLE_EDGE), Reducer 9 (SIMPLE_EDGE)
         Reducer 3 <- Reducer 2 (SIMPLE_EDGE)
-        Reducer 4 <- Reducer 2 (CUSTOM_SIMPLE_EDGE)
+        Reducer 4 <- Reducer 2 (SIMPLE_EDGE)
         Reducer 5 <- Reducer 2 (CUSTOM_SIMPLE_EDGE)
         Reducer 6 <- Reducer 2 (CUSTOM_SIMPLE_EDGE)
         Reducer 8 <- Map 10 (SIMPLE_EDGE), Map 7 (SIMPLE_EDGE)
@@ -392,7 +392,7 @@ STAGE PLANS:
                     Statistics: Num rows: 1 Data size: 76 Basic stats: 
COMPLETE Column stats: COMPLETE
                     Reduce Output Operator
                       key expressions: _col0 (type: 
struct<writeid:bigint,bucketid:int,rowid:bigint>)
-                      null sort order: a
+                      null sort order: z
                       sort order: +
                       Map-reduce partition columns: UDFToInteger(_col0) (type: 
int)
                       Statistics: Num rows: 1 Data size: 76 Basic stats: 
COMPLETE Column stats: COMPLETE
@@ -404,11 +404,11 @@ STAGE PLANS:
                     outputColumnNames: _col0
                     Statistics: Num rows: 1 Data size: 76 Basic stats: 
COMPLETE Column stats: COMPLETE
                     Reduce Output Operator
-                      null sort order: 
-                      sort order: 
+                      key expressions: _col0 (type: 
struct<writeid:bigint,bucketid:int,rowid:bigint>)
+                      null sort order: z
+                      sort order: +
                       Map-reduce partition columns: UDFToInteger(_col0) (type: 
int)
                       Statistics: Num rows: 1 Data size: 76 Basic stats: 
COMPLETE Column stats: COMPLETE
-                      value expressions: _col0 (type: 
struct<writeid:bigint,bucketid:int,rowid:bigint>)
                 Filter Operator
                   predicate: (_col4 and ((_col3 is null and (_col9 > 0L)) or 
(((_col9 + _col3) > 0) and _col3 is not null))) (type: boolean)
                   Statistics: Num rows: 1 Data size: 429 Basic stats: COMPLETE 
Column stats: COMPLETE
@@ -491,7 +491,7 @@ STAGE PLANS:
             Execution mode: vectorized, llap
             Reduce Operator Tree:
               Select Operator
-                expressions: VALUE._col0 (type: 
struct<writeid:bigint,bucketid:int,rowid:bigint>)
+                expressions: KEY.reducesinkkey0 (type: 
struct<writeid:bigint,bucketid:int,rowid:bigint>)
                 outputColumnNames: _col0
                 Statistics: Num rows: 1 Data size: 76 Basic stats: COMPLETE 
Column stats: COMPLETE
                 File Output Operator
diff --git 
a/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_7.q.out
 
b/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_7.q.out
index bc996ec1c32..000f07b5a1d 100644
--- 
a/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_7.q.out
+++ 
b/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_7.q.out
@@ -215,7 +215,7 @@ STAGE PLANS:
                     Statistics: Num rows: 1 Data size: 76 Basic stats: 
COMPLETE Column stats: COMPLETE
                     Reduce Output Operator
                       key expressions: _col0 (type: 
struct<writeid:bigint,bucketid:int,rowid:bigint>)
-                      null sort order: a
+                      null sort order: z
                       sort order: +
                       Map-reduce partition columns: UDFToInteger(_col0) (type: 
int)
                       Statistics: Num rows: 1 Data size: 76 Basic stats: 
COMPLETE Column stats: COMPLETE
diff --git 
a/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_8.q.out
 
b/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_8.q.out
index 93f519af220..6fa072efb47 100644
--- 
a/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_8.q.out
+++ 
b/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_8.q.out
@@ -485,7 +485,7 @@ STAGE PLANS:
                     Statistics: Num rows: 1 Data size: 76 Basic stats: 
COMPLETE Column stats: COMPLETE
                     Reduce Output Operator
                       key expressions: _col0 (type: 
struct<writeid:bigint,bucketid:int,rowid:bigint>)
-                      null sort order: a
+                      null sort order: z
                       sort order: +
                       Map-reduce partition columns: UDFToInteger(_col0) (type: 
int)
                       Statistics: Num rows: 1 Data size: 76 Basic stats: 
COMPLETE Column stats: COMPLETE
diff --git 
a/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_9.q.out
 
b/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_9.q.out
index 026c70f365a..69e1a97dd6e 100644
--- 
a/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_9.q.out
+++ 
b/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_9.q.out
@@ -296,7 +296,7 @@ STAGE PLANS:
       Edges:
         Reducer 2 <- Map 1 (SIMPLE_EDGE), Reducer 9 (SIMPLE_EDGE)
         Reducer 3 <- Reducer 2 (SIMPLE_EDGE)
-        Reducer 4 <- Reducer 2 (CUSTOM_SIMPLE_EDGE)
+        Reducer 4 <- Reducer 2 (SIMPLE_EDGE)
         Reducer 5 <- Reducer 2 (CUSTOM_SIMPLE_EDGE)
         Reducer 6 <- Reducer 2 (CUSTOM_SIMPLE_EDGE)
         Reducer 8 <- Map 10 (SIMPLE_EDGE), Map 7 (SIMPLE_EDGE)
@@ -390,7 +390,7 @@ STAGE PLANS:
                     Statistics: Num rows: 1 Data size: 76 Basic stats: 
COMPLETE Column stats: COMPLETE
                     Reduce Output Operator
                       key expressions: _col0 (type: 
struct<writeid:bigint,bucketid:int,rowid:bigint>)
-                      null sort order: a
+                      null sort order: z
                       sort order: +
                       Map-reduce partition columns: UDFToInteger(_col0) (type: 
int)
                       Statistics: Num rows: 1 Data size: 76 Basic stats: 
COMPLETE Column stats: COMPLETE
@@ -402,11 +402,11 @@ STAGE PLANS:
                     outputColumnNames: _col0
                     Statistics: Num rows: 1 Data size: 76 Basic stats: 
COMPLETE Column stats: COMPLETE
                     Reduce Output Operator
-                      null sort order: 
-                      sort order: 
+                      key expressions: _col0 (type: 
struct<writeid:bigint,bucketid:int,rowid:bigint>)
+                      null sort order: z
+                      sort order: +
                       Map-reduce partition columns: UDFToInteger(_col0) (type: 
int)
                       Statistics: Num rows: 1 Data size: 76 Basic stats: 
COMPLETE Column stats: COMPLETE
-                      value expressions: _col0 (type: 
struct<writeid:bigint,bucketid:int,rowid:bigint>)
                 Filter Operator
                   predicate: (_col3 and ((_col2 is null and (_col7 > 0L)) or 
(((_col7 + _col2) > 0) and _col2 is not null))) (type: boolean)
                   Statistics: Num rows: 1 Data size: 205 Basic stats: COMPLETE 
Column stats: COMPLETE
@@ -489,7 +489,7 @@ STAGE PLANS:
             Execution mode: vectorized, llap
             Reduce Operator Tree:
               Select Operator
-                expressions: VALUE._col0 (type: 
struct<writeid:bigint,bucketid:int,rowid:bigint>)
+                expressions: KEY.reducesinkkey0 (type: 
struct<writeid:bigint,bucketid:int,rowid:bigint>)
                 outputColumnNames: _col0
                 Statistics: Num rows: 1 Data size: 76 Basic stats: COMPLETE 
Column stats: COMPLETE
                 File Output Operator
diff --git 
a/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_nulls.q.out
 
b/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_nulls.q.out
index 1a9418539cc..53978961bfa 100644
--- 
a/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_nulls.q.out
+++ 
b/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_nulls.q.out
@@ -232,7 +232,7 @@ STAGE PLANS:
                     Statistics: Num rows: 1 Data size: 76 Basic stats: 
COMPLETE Column stats: COMPLETE
                     Reduce Output Operator
                       key expressions: _col0 (type: 
struct<writeid:bigint,bucketid:int,rowid:bigint>)
-                      null sort order: a
+                      null sort order: z
                       sort order: +
                       Map-reduce partition columns: UDFToInteger(_col0) (type: 
int)
                       Statistics: Num rows: 1 Data size: 76 Basic stats: 
COMPLETE Column stats: COMPLETE
diff --git 
a/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_one_key_gby.q.out
 
b/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_one_key_gby.q.out
index c50ae464b87..25fe6711ccc 100644
--- 
a/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_one_key_gby.q.out
+++ 
b/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_one_key_gby.q.out
@@ -210,7 +210,7 @@ STAGE PLANS:
                     Statistics: Num rows: 1 Data size: 76 Basic stats: 
COMPLETE Column stats: COMPLETE
                     Reduce Output Operator
                       key expressions: _col0 (type: 
struct<writeid:bigint,bucketid:int,rowid:bigint>)
-                      null sort order: a
+                      null sort order: z
                       sort order: +
                       Map-reduce partition columns: UDFToInteger(_col0) (type: 
int)
                       Statistics: Num rows: 1 Data size: 76 Basic stats: 
COMPLETE Column stats: COMPLETE
diff --git a/ql/src/test/results/clientpositive/llap/runtime_stats_merge.q.out 
b/ql/src/test/results/clientpositive/llap/runtime_stats_merge.q.out
index 8e4d33895f5..837a5577d7f 100644
--- a/ql/src/test/results/clientpositive/llap/runtime_stats_merge.q.out
+++ b/ql/src/test/results/clientpositive/llap/runtime_stats_merge.q.out
@@ -121,12 +121,12 @@ Stage-4
           Dependency Collection{}
             Stage-2
               Reducer 2 vectorized, llap
-              File Output Operator [FS_55]
+              File Output Operator [FS_54]
                 table:{"name:":"default.lineitem2"}
-                Select Operator [SEL_54] (runtime: rows=1 width=76)
+                Select Operator [SEL_53] (runtime: rows=1 width=76)
                   Output:["_col0"]
                 <-Map 1 [SIMPLE_EDGE] llap
-                  SHUFFLE [RS_12]
+                  SHUFFLE [RS_14]
                     PartitionCols:UDFToInteger(_col0)
                     Select Operator [SEL_11] (runtime: rows=1 width=76)
                       Output:["_col0"]
@@ -134,14 +134,14 @@ Stage-4
                         predicate:(_col1 = _col2)
                         Select Operator [SEL_9] (runtime: rows=1 width=84)
                           Output:["_col0","_col1","_col2"]
-                          Map Join Operator [MAPJOIN_40] (runtime: rows=1 
width=84)
-                            
Conds:SEL_2._col1=RS_44._col0(Inner),Output:["_col0","_col1","_col2"]
+                          Map Join Operator [MAPJOIN_39] (runtime: rows=1 
width=84)
+                            
Conds:SEL_2._col1=RS_43._col0(Inner),Output:["_col0","_col1","_col2"]
                           <-Map 4 [BROADCAST_EDGE] vectorized, llap
-                            BROADCAST [RS_44]
+                            BROADCAST [RS_43]
                               PartitionCols:_col0
-                              Select Operator [SEL_43] (runtime: rows=1 
width=4)
+                              Select Operator [SEL_42] (runtime: rows=1 
width=4)
                                 Output:["_col0"]
-                                Filter Operator [FIL_42] (runtime: rows=1 
width=4)
+                                Filter Operator [FIL_41] (runtime: rows=1 
width=4)
                                   predicate:l_orderkey is not null
                                   TableScan [TS_3] (runtime: rows=1 width=4)
                                     default@lineitem_stage,lineitem_stage, 
ACID table,Tbl:COMPLETE,Col:COMPLETE,Output:["l_orderkey"]

Reply via email to