hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From omal...@apache.org
Subject [02/50] [abbrv] hive git commit: HIVE-14959: Fix DISTINCT with windowing when CBO is enabled/disabled (Jesus Camacho Rodriguez, reviewed by Ashutosh Chauhan)
Date Tue, 28 Mar 2017 21:09:19 GMT
http://git-wip-us.apache.org/repos/asf/hive/blob/f84e9f15/ql/src/test/results/clientpositive/windowing.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/windowing.q.out b/ql/src/test/results/clientpositive/windowing.q.out
index b9391d2..f5082dc 100644
--- a/ql/src/test/results/clientpositive/windowing.q.out
+++ b/ql/src/test/results/clientpositive/windowing.q.out
@@ -1805,6 +1805,106 @@ Manufacturer#5	almond antique medium spring khaki	6	6	37	85
 Manufacturer#5	almond antique sky peru orange	2	2	39	108
 Manufacturer#5	almond aquamarine dodger light gainsboro	46	46	85	77
 Manufacturer#5	almond azure blanched chiffon midnight	23	23	108	71
+PREHOOK: query: explain
+select DISTINCT p_mfgr, p_name, p_size,
+sum(p_size) over w1 as s
+from part
+window w1 as (distribute by p_mfgr sort by p_name rows between 2 preceding and 2 following)
+PREHOOK: type: QUERY
+POSTHOOK: query: explain
+select DISTINCT p_mfgr, p_name, p_size,
+sum(p_size) over w1 as s
+from part
+window w1 as (distribute by p_mfgr sort by p_name rows between 2 preceding and 2 following)
+POSTHOOK: type: QUERY
+STAGE DEPENDENCIES:
+  Stage-1 is a root stage
+  Stage-2 depends on stages: Stage-1
+  Stage-0 depends on stages: Stage-2
+
+STAGE PLANS:
+  Stage: Stage-1
+    Map Reduce
+      Map Operator Tree:
+          TableScan
+            alias: part
+            Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats:
NONE
+            Reduce Output Operator
+              key expressions: p_mfgr (type: string), p_name (type: string)
+              sort order: ++
+              Map-reduce partition columns: p_mfgr (type: string)
+              Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats:
NONE
+              value expressions: p_size (type: int)
+      Reduce Operator Tree:
+        Select Operator
+          expressions: KEY.reducesinkkey1 (type: string), KEY.reducesinkkey0 (type: string),
VALUE._col3 (type: int)
+          outputColumnNames: _col1, _col2, _col5
+          Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats: NONE
+          PTF Operator
+            Function definitions:
+                Input definition
+                  input alias: ptf_0
+                  output shape: _col1: string, _col2: string, _col5: int
+                  type: WINDOWING
+                Windowing table definition
+                  input alias: ptf_1
+                  name: windowingtablefunction
+                  order by: _col1 ASC NULLS FIRST
+                  partition by: _col2
+                  raw input shape:
+                  window functions:
+                      window function definition
+                        alias: sum_window_0
+                        arguments: _col5
+                        name: sum
+                        window function: GenericUDAFSumLong
+                        window frame: PRECEDING(2)~FOLLOWING(2)
+            Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats:
NONE
+            Select Operator
+              expressions: _col2 (type: string), _col1 (type: string), _col5 (type: int),
sum_window_0 (type: bigint)
+              outputColumnNames: _col0, _col1, _col2, _col3
+              Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats:
NONE
+              Group By Operator
+                keys: _col0 (type: string), _col1 (type: string), _col2 (type: int), _col3
(type: bigint)
+                mode: hash
+                outputColumnNames: _col0, _col1, _col2, _col3
+                Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats:
NONE
+                File Output Operator
+                  compressed: false
+                  table:
+                      input format: org.apache.hadoop.mapred.SequenceFileInputFormat
+                      output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                      serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe
+
+  Stage: Stage-2
+    Map Reduce
+      Map Operator Tree:
+          TableScan
+            Reduce Output Operator
+              key expressions: _col0 (type: string), _col1 (type: string), _col2 (type: int),
_col3 (type: bigint)
+              sort order: ++++
+              Map-reduce partition columns: _col0 (type: string), _col1 (type: string), _col2
(type: int), _col3 (type: bigint)
+              Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats:
NONE
+      Reduce Operator Tree:
+        Group By Operator
+          keys: KEY._col0 (type: string), KEY._col1 (type: string), KEY._col2 (type: int),
KEY._col3 (type: bigint)
+          mode: mergepartial
+          outputColumnNames: _col0, _col1, _col2, _col3
+          Statistics: Num rows: 13 Data size: 1573 Basic stats: COMPLETE Column stats: NONE
+          File Output Operator
+            compressed: false
+            Statistics: Num rows: 13 Data size: 1573 Basic stats: COMPLETE Column stats:
NONE
+            table:
+                input format: org.apache.hadoop.mapred.SequenceFileInputFormat
+                output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+
+  Stage: Stage-0
+    Fetch Operator
+      limit: -1
+      Processor Tree:
+        ListSink
+
 PREHOOK: query: select DISTINCT p_mfgr, p_name, p_size,
 sum(p_size) over w1 as s
 from part
@@ -1819,8 +1919,9 @@ window w1 as (distribute by p_mfgr sort by p_name rows between 2 preceding
and 2
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@part
 #### A masked pattern was here ####
-Manufacturer#1	almond antique burnished rose metallic	2	42
-Manufacturer#1	almond antique chartreuse lavender yellow	34	70
+Manufacturer#1	almond antique burnished rose metallic	2	38
+Manufacturer#1	almond antique burnished rose metallic	2	44
+Manufacturer#1	almond antique chartreuse lavender yellow	34	72
 Manufacturer#1	almond antique salmon chartreuse burlywood	6	112
 Manufacturer#1	almond aquamarine burnished black steel	28	110
 Manufacturer#1	almond aquamarine pink moccasin thistle	42	76


Mime
View raw message