hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mmccl...@apache.org
Subject [5/5] hive git commit: HIVE-16510: Vectorization: Add vectorized PTF tests in preparation for HIVE-16369 (Matt McCline, reviewed by Gopal Vijayaraghavan)
Date Wed, 26 Apr 2017 02:27:59 GMT
HIVE-16510: Vectorization: Add vectorized PTF tests in preparation for HIVE-16369 (Matt McCline,
reviewed by Gopal Vijayaraghavan)


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/b271bcb7
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/b271bcb7
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/b271bcb7

Branch: refs/heads/master
Commit: b271bcb7ca8957e211a84d8e052c29f5c6657e7e
Parents: 1ed36f0
Author: Matt McCline <mmccline@hortonworks.com>
Authored: Tue Apr 25 21:27:45 2017 -0500
Committer: Matt McCline <mmccline@hortonworks.com>
Committed: Tue Apr 25 21:27:45 2017 -0500

----------------------------------------------------------------------
 data/files/vector_ptf_part_simple.txt           |   40 +
 .../test/resources/testconfiguration.properties |    1 +
 .../clientpositive/vector_ptf_part_simple.q     |  268 ++
 .../queries/clientpositive/vectorized_ptf.q     |   46 +-
 .../clientpositive/windowing_windowspec.q       |    2 +
 .../llap/vector_ptf_part_simple.q.out           | 3032 ++++++++++++++++++
 .../clientpositive/llap/vectorized_ptf.q.out    | 2514 +++------------
 .../clientpositive/spark/vectorized_ptf.q.out   | 2511 +++------------
 .../clientpositive/windowing_windowspec.q.out   |  108 +
 9 files changed, 4258 insertions(+), 4264 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/b271bcb7/data/files/vector_ptf_part_simple.txt
----------------------------------------------------------------------
diff --git a/data/files/vector_ptf_part_simple.txt b/data/files/vector_ptf_part_simple.txt
new file mode 100644
index 0000000..2bcc7a6
--- /dev/null
+++ b/data/files/vector_ptf_part_simple.txt
@@ -0,0 +1,40 @@
+Manufacturer#2	almond aquamarine rose maroon antique	900.66
+Manufacturer#1	almond aquamarine burnished black steel	1414.42
+Manufacturer#2	almond aquamarine rose maroon antique	1698.66
+Manufacturer#1	almond aquamarine pink moccasin thistle	\N
+Manufacturer#1	almond antique chartreuse lavender yellow	1753.76
+Manufacturer#5	almond antique medium spring khaki	1611.66
+Manufacturer#5	almond antique blue firebrick mint	1789.69
+Manufacturer#1	almond antique burnished rose metallic	1173.15
+Manufacturer#1	almond aquamarine pink moccasin thistle	1632.66
+Manufacturer#3	almond antique forest lavender goldenrod	1190.27
+Manufacturer#4	almond aquamarine yellow dodger mint	1844.92
+Manufacturer#1	almond antique chartreuse lavender yellow	1753.76
+Manufacturer#2	almond antique violet turquoise frosted	1800.7
+Manufacturer#3	almond antique forest lavender goldenrod	\N
+Manufacturer#2	almond antique violet chocolate turquoise	1690.68
+Manufacturer#4	almond antique violet mint lemon	1375.42
+Manufacturer#1	almond aquamarine pink moccasin thistle	1632.66
+Manufacturer#5	almond azure blanched chiffon midnight	1464.48
+Manufacturer#3	almond antique forest lavender goldenrod	590.27
+Manufacturer#1	almond antique chartreuse lavender yellow	1753.76
+Manufacturer#2	almond antique violet turquoise frosted	1800.7
+Manufacturer#5	almond antique sky peru orange	1788.73
+Manufacturer#1	almond aquamarine pink moccasin thistle	1632.66
+Manufacturer#3	almond antique chartreuse khaki white	99.68
+Manufacturer#4	almond antique gainsboro frosted violet	\N
+Manufacturer#1	almond antique chartreuse lavender yellow	1753.76
+Manufacturer#2	almond antique violet turquoise frosted	1800.7
+Manufacturer#3	almond antique olive coral navajo	1337.29
+Manufacturer#5	almond antique medium spring khaki	1611.66
+Manufacturer#1	almond antique salmon chartreuse burlywood	1602.59
+Manufacturer#3	almond antique misty red olive	1922.98
+Manufacturer#2	almond aquamarine sandy cyan gainsboro	1000.6
+Manufacturer#3	almond antique forest lavender goldenrod	1190.27
+Manufacturer#2	almond aquamarine midnight light salmon	2031.98
+Manufacturer#4	almond aquamarine floral ivory bisque	\N
+Manufacturer#5	almond aquamarine dodger light gainsboro	1018.1
+Manufacturer#4	almond azure aquamarine papaya violet	1290.35
+Manufacturer#3	almond antique metallic orange dim	55.39
+Manufacturer#1	almond antique burnished rose metallic	1173.15
+Manufacturer#4	almond aquamarine floral ivory bisque	1206.26

http://git-wip-us.apache.org/repos/asf/hive/blob/b271bcb7/itests/src/test/resources/testconfiguration.properties
----------------------------------------------------------------------
diff --git a/itests/src/test/resources/testconfiguration.properties b/itests/src/test/resources/testconfiguration.properties
index d684ba8..a53fc1a 100644
--- a/itests/src/test/resources/testconfiguration.properties
+++ b/itests/src/test/resources/testconfiguration.properties
@@ -637,6 +637,7 @@ minillaplocal.query.files=acid_globallimit.q,\
   vector_leftsemi_mapjoin.q,\
   vector_number_compare_projection.q,\
   vector_partitioned_date_time.q,\
+  vector_ptf_part_simple.q,\
   vector_udf1.q,\
   vectorization_short_regress.q,\
   vectorized_dynamic_partition_pruning.q,\

http://git-wip-us.apache.org/repos/asf/hive/blob/b271bcb7/ql/src/test/queries/clientpositive/vector_ptf_part_simple.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/vector_ptf_part_simple.q b/ql/src/test/queries/clientpositive/vector_ptf_part_simple.q
new file mode 100644
index 0000000..4f3a538
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/vector_ptf_part_simple.q
@@ -0,0 +1,268 @@
+set hive.cli.print.header=true;
+SET hive.vectorized.execution.enabled=true;
+set hive.fetch.task.conversion=none;
+
+create table vector_ptf_part_simple_text(p_mfgr string, p_name string, p_retailprice double)
+        ROW FORMAT DELIMITED
+        FIELDS TERMINATED BY '\t'
+        STORED AS TEXTFILE;
+LOAD DATA LOCAL INPATH '../../data/files/vector_ptf_part_simple.txt' OVERWRITE INTO TABLE
vector_ptf_part_simple_text;
+
+create table vector_ptf_part_simple_orc(p_mfgr string, p_name string, p_retailprice double)
stored as orc;
+INSERT INTO TABLE vector_ptf_part_simple_orc SELECT * FROM vector_ptf_part_simple_text;
+
+select * from vector_ptf_part_simple_orc;
+
+
+explain vectorization detail
+select p_mfgr,p_name, p_retailprice,
+row_number() over(partition by p_mfgr) as rn,
+rank() over(partition by p_mfgr) as r,
+dense_rank() over(partition by p_mfgr) as dr,
+first_value(p_retailprice) over(partition by p_mfgr) as fv,
+last_value(p_retailprice) over(partition by p_mfgr) as lv,
+count(p_retailprice) over(partition by p_mfgr) as c,
+count(*) over(partition by p_mfgr) as cs
+from vector_ptf_part_simple_orc;
+
+select p_mfgr,p_name, p_retailprice,
+row_number() over(partition by p_mfgr) as rn,
+rank() over(partition by p_mfgr) as r,
+dense_rank() over(partition by p_mfgr) as dr,
+first_value(p_retailprice) over(partition by p_mfgr) as fv,
+last_value(p_retailprice) over(partition by p_mfgr) as lv,
+count(p_retailprice) over(partition by p_mfgr) as c,
+count(*) over(partition by p_mfgr) as cs
+from vector_ptf_part_simple_orc;
+
+
+explain vectorization detail
+select p_mfgr,p_name, p_retailprice,
+row_number() over(partition by p_mfgr order by p_name) as rn,
+rank() over(partition by p_mfgr order by p_name) as r,
+dense_rank() over(partition by p_mfgr order by p_name) as dr,
+first_value(p_retailprice) over(partition by p_mfgr order by p_name) as fv,
+last_value(p_retailprice) over(partition by p_mfgr order by p_name) as lv,
+count(p_retailprice) over(partition by p_mfgr order by p_name) as c,
+count(*) over(partition by p_mfgr order by p_name) as cs
+from vector_ptf_part_simple_orc;
+
+select p_mfgr,p_name, p_retailprice,
+row_number() over(partition by p_mfgr order by p_name) as rn,
+rank() over(partition by p_mfgr order by p_name) as r,
+dense_rank() over(partition by p_mfgr order by p_name) as dr,
+first_value(p_retailprice) over(partition by p_mfgr order by p_name) as fv,
+last_value(p_retailprice) over(partition by p_mfgr order by p_name) as lv,
+count(p_retailprice) over(partition by p_mfgr order by p_name) as c,
+count(*) over(partition by p_mfgr order by p_name) as cs
+from vector_ptf_part_simple_orc;
+
+
+explain vectorization detail
+select p_mfgr,p_name, p_retailprice,
+row_number() over(partition by p_mfgr order by p_name range between unbounded preceding and
unbounded following) as rn,
+rank() over(partition by p_mfgr order by p_name range between unbounded preceding and unbounded
following) as r,
+dense_rank() over(partition by p_mfgr order by p_name range between unbounded preceding and
unbounded following) as dr,
+first_value(p_retailprice) over(partition by p_mfgr order by p_name range between unbounded
preceding and current row) as fv,
+last_value(p_retailprice) over(partition by p_mfgr order by p_name range between unbounded
preceding and current row) as lv,
+count(p_retailprice) over(partition by p_mfgr order by p_name range between unbounded preceding
and current row) as c,
+count(*) over(partition by p_mfgr order by p_name range between unbounded preceding and current
row) as cs
+from vector_ptf_part_simple_orc;
+
+select p_mfgr,p_name, p_retailprice,
+row_number() over(partition by p_mfgr order by p_name range between unbounded preceding and
unbounded following) as rn,
+rank() over(partition by p_mfgr order by p_name range between unbounded preceding and unbounded
following) as r,
+dense_rank() over(partition by p_mfgr order by p_name range between unbounded preceding and
unbounded following) as dr,
+first_value(p_retailprice) over(partition by p_mfgr order by p_name range between unbounded
preceding and current row) as fv,
+last_value(p_retailprice) over(partition by p_mfgr order by p_name range between unbounded
preceding and current row) as lv,
+count(p_retailprice) over(partition by p_mfgr order by p_name range between unbounded preceding
and current row) as c,
+count(*) over(partition by p_mfgr order by p_name range between unbounded preceding and current
row) as cs
+from vector_ptf_part_simple_orc;
+
+
+explain vectorization detail
+select p_mfgr,p_name, p_retailprice,
+sum(p_retailprice) over(partition by p_mfgr) as s,
+min(p_retailprice) over(partition by p_mfgr) as mi,
+max(p_retailprice) over(partition by p_mfgr) as ma,
+avg(p_retailprice) over(partition by p_mfgr) as av 
+from vector_ptf_part_simple_orc;
+
+select p_mfgr,p_name, p_retailprice,
+sum(p_retailprice) over(partition by p_mfgr) as s,
+min(p_retailprice) over(partition by p_mfgr) as mi,
+max(p_retailprice) over(partition by p_mfgr) as ma,
+avg(p_retailprice) over(partition by p_mfgr) as av 
+from vector_ptf_part_simple_orc;
+
+
+explain vectorization detail
+select p_mfgr,p_name, p_retailprice,
+sum(p_retailprice) over(partition by p_mfgr order by p_name) as s,
+min(p_retailprice) over(partition by p_mfgr order by p_name) as mi,
+max(p_retailprice) over(partition by p_mfgr order by p_name) as ma,
+avg(p_retailprice) over(partition by p_mfgr order by p_name) as av 
+from vector_ptf_part_simple_orc;
+
+select p_mfgr,p_name, p_retailprice,
+sum(p_retailprice) over(partition by p_mfgr order by p_name) as s,
+min(p_retailprice) over(partition by p_mfgr order by p_name) as mi,
+max(p_retailprice) over(partition by p_mfgr order by p_name) as ma,
+avg(p_retailprice) over(partition by p_mfgr order by p_name) as av 
+from vector_ptf_part_simple_orc;
+
+
+explain vectorization detail
+select p_mfgr,p_name, p_retailprice,
+sum(p_retailprice) over(partition by p_mfgr order by p_name range between unbounded preceding
and current row) as s,
+min(p_retailprice) over(partition by p_mfgr order by p_name range between unbounded preceding
and current row) as mi,
+max(p_retailprice) over(partition by p_mfgr order by p_name range between unbounded preceding
and current row) as ma,
+avg(p_retailprice) over(partition by p_mfgr order by p_name range between unbounded preceding
and current row) as av 
+from vector_ptf_part_simple_orc;
+
+select p_mfgr,p_name, p_retailprice,
+sum(p_retailprice) over(partition by p_mfgr order by p_name range between unbounded preceding
and current row) as s,
+min(p_retailprice) over(partition by p_mfgr order by p_name range between unbounded preceding
and current row) as mi,
+max(p_retailprice) over(partition by p_mfgr order by p_name range between unbounded preceding
and current row) as ma,
+avg(p_retailprice) over(partition by p_mfgr order by p_name range between unbounded preceding
and current row) as av 
+from vector_ptf_part_simple_orc;
+
+
+--
+-- ROW
+--
+explain vectorization detail
+select p_mfgr,p_name, p_retailprice,
+sum(p_retailprice) over(partition by p_mfgr order by p_name rows between unbounded preceding
and current row) as s,
+min(p_retailprice) over(partition by p_mfgr order by p_name rows between unbounded preceding
and current row) as mi,
+max(p_retailprice) over(partition by p_mfgr order by p_name rows between unbounded preceding
and current row) as ma,
+avg(p_retailprice) over(partition by p_mfgr order by p_name rows between unbounded preceding
and current row) as av 
+from vector_ptf_part_simple_orc;
+
+select p_mfgr,p_name, p_retailprice,
+sum(p_retailprice) over(partition by p_mfgr order by p_name rows between unbounded preceding
and current row) as s,
+min(p_retailprice) over(partition by p_mfgr order by p_name rows between unbounded preceding
and current row) as mi,
+max(p_retailprice) over(partition by p_mfgr order by p_name rows between unbounded preceding
and current row) as ma,
+avg(p_retailprice) over(partition by p_mfgr order by p_name rows between unbounded preceding
and current row) as av 
+from vector_ptf_part_simple_orc;
+
+
+create table vector_ptf_part_simple_text_decimal(p_mfgr string, p_name string, p_retailprice
decimal(38,18))
+        ROW FORMAT DELIMITED
+        FIELDS TERMINATED BY '\t'
+        STORED AS TEXTFILE;
+LOAD DATA LOCAL INPATH '../../data/files/vector_ptf_part_simple.txt' OVERWRITE INTO TABLE
vector_ptf_part_simple_text_decimal;
+
+create table vector_ptf_part_simple_orc_decimal(p_mfgr string, p_name string, p_retailprice
decimal(38,18)) stored as orc;
+INSERT INTO TABLE vector_ptf_part_simple_orc_decimal SELECT * FROM vector_ptf_part_simple_text_decimal;
+
+explain vectorization detail
+select p_mfgr,p_name, p_retailprice,
+sum(p_retailprice) over(partition by p_mfgr) as s,
+min(p_retailprice) over(partition by p_mfgr) as mi,
+max(p_retailprice) over(partition by p_mfgr) as ma,
+avg(p_retailprice) over(partition by p_mfgr) as av 
+from vector_ptf_part_simple_orc_decimal;
+
+select p_mfgr,p_name, p_retailprice,
+sum(p_retailprice) over(partition by p_mfgr) as s,
+min(p_retailprice) over(partition by p_mfgr) as mi,
+max(p_retailprice) over(partition by p_mfgr) as ma,
+avg(p_retailprice) over(partition by p_mfgr) as av 
+from vector_ptf_part_simple_orc_decimal;
+
+
+explain vectorization detail
+select p_mfgr,p_name, p_retailprice,
+sum(p_retailprice) over(partition by p_mfgr order by p_name) as s,
+min(p_retailprice) over(partition by p_mfgr order by p_name) as mi,
+max(p_retailprice) over(partition by p_mfgr order by p_name) as ma,
+avg(p_retailprice) over(partition by p_mfgr order by p_name) as av 
+from vector_ptf_part_simple_orc_decimal;
+
+select p_mfgr,p_name, p_retailprice,
+sum(p_retailprice) over(partition by p_mfgr order by p_name) as s,
+min(p_retailprice) over(partition by p_mfgr order by p_name) as mi,
+max(p_retailprice) over(partition by p_mfgr order by p_name) as ma,
+avg(p_retailprice) over(partition by p_mfgr order by p_name) as av 
+from vector_ptf_part_simple_orc_decimal;
+
+
+
+
+create table vector_ptf_part_simple_orc_long(p_mfgr string, p_name string, p_bigint bigint)
stored as orc;
+INSERT INTO TABLE vector_ptf_part_simple_orc_long SELECT p_mfgr, p_name, cast(p_retailprice
* 100 as bigint) FROM vector_ptf_part_simple_text_decimal;
+
+explain vectorization detail
+select p_mfgr,p_name, p_bigint,
+sum(p_bigint) over(partition by p_mfgr) as s,
+min(p_bigint) over(partition by p_mfgr) as mi,
+max(p_bigint) over(partition by p_mfgr) as ma,
+avg(p_bigint) over(partition by p_mfgr) as av 
+from vector_ptf_part_simple_orc_long;
+
+select p_mfgr,p_name, p_bigint,
+sum(p_bigint) over(partition by p_mfgr) as s,
+min(p_bigint) over(partition by p_mfgr) as mi,
+max(p_bigint) over(partition by p_mfgr) as ma,
+avg(p_bigint) over(partition by p_mfgr) as av 
+from vector_ptf_part_simple_orc_long;
+
+
+explain vectorization detail
+select p_mfgr,p_name, p_bigint,
+sum(p_bigint) over(partition by p_mfgr order by p_name) as s,
+min(p_bigint) over(partition by p_mfgr order by p_name) as mi,
+max(p_bigint) over(partition by p_mfgr order by p_name) as ma,
+avg(p_bigint) over(partition by p_mfgr order by p_name) as av 
+from vector_ptf_part_simple_orc_long;
+
+select p_mfgr,p_name, p_bigint,
+sum(p_bigint) over(partition by p_mfgr order by p_name) as s,
+min(p_bigint) over(partition by p_mfgr order by p_name) as mi,
+max(p_bigint) over(partition by p_mfgr order by p_name) as ma,
+avg(p_bigint) over(partition by p_mfgr order by p_name) as av 
+from vector_ptf_part_simple_orc_long;
+
+
+-- Omit p_name columns
+
+explain vectorization detail
+select p_mfgr, p_retailprice,
+rank() over(partition by p_mfgr) as r
+from vector_ptf_part_simple_orc;
+
+select p_mfgr, p_retailprice,
+rank() over(partition by p_mfgr) as r
+from vector_ptf_part_simple_orc;
+
+
+explain vectorization detail
+select p_mfgr, p_retailprice,
+rank() over(partition by p_mfgr order by p_name) as r
+from vector_ptf_part_simple_orc;
+
+select p_mfgr, p_retailprice,
+rank() over(partition by p_mfgr order by p_name) as r
+from vector_ptf_part_simple_orc;
+
+
+-- Calculated partition key
+
+explain vectorization detail
+select p_mfgr, p_name, p_retailprice,
+rank() over(partition by p_mfgr, case when p_mfgr == "Manufacturer#2" then timestamp "2000-01-01
00:00:00" end) as r
+from vector_ptf_part_simple_orc;
+
+select p_mfgr, p_name, p_retailprice,
+rank() over(partition by p_mfgr, case when p_mfgr == "Manufacturer#2" then timestamp "2000-01-01
00:00:00" end) as r
+from vector_ptf_part_simple_orc;
+
+explain vectorization detail
+select p_mfgr, p_name, p_retailprice,
+rank() over(partition by p_mfgr, case when p_mfgr == "Manufacturer#2" then timestamp "2000-01-01
00:00:00" end order by p_name) as r
+from vector_ptf_part_simple_orc;
+
+select p_mfgr, p_name, p_retailprice,
+rank() over(partition by p_mfgr, case when p_mfgr == "Manufacturer#2" then timestamp "2000-01-01
00:00:00" end order by p_name) as r
+from vector_ptf_part_simple_orc;

http://git-wip-us.apache.org/repos/asf/hive/blob/b271bcb7/ql/src/test/queries/clientpositive/vectorized_ptf.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/vectorized_ptf.q b/ql/src/test/queries/clientpositive/vectorized_ptf.q
index 232aa11..dbc7ca6 100644
--- a/ql/src/test/queries/clientpositive/vectorized_ptf.q
+++ b/ql/src/test/queries/clientpositive/vectorized_ptf.q
@@ -43,7 +43,7 @@ insert into table part_orc select * from part_staging;
 
 --1. test1
 
-explain vectorization extended
+explain vectorization detail
 select p_mfgr, p_name, p_size,
 rank() over (partition by p_mfgr order by p_name) as r,
 dense_rank() over (partition by p_mfgr order by p_name) as dr,
@@ -64,7 +64,7 @@ from noop(on part_orc
 
 -- 2. testJoinWithNoop
 
-explain vectorization extended
+explain vectorization detail
 select p_mfgr, p_name,
 p_size, p_size - lag(p_size,1,p_size) over (partition by p_mfgr order by p_name) as deltaSz
 from noop (on (select p1.* from part_orc p1 join part_orc p2 on p1.p_partkey = p2.p_partkey)
j
@@ -81,7 +81,7 @@ sort by j.p_name)
 
 -- 3. testOnlyPTF
 
-explain vectorization extended
+explain vectorization detail
 select p_mfgr, p_name, p_size
 from noop(on part_orc
 partition by p_mfgr
@@ -94,7 +94,7 @@ order by p_name);
 
 -- 4. testPTFAlias
 
-explain vectorization extended
+explain vectorization detail
 select p_mfgr, p_name, p_size,
 rank() over (partition by p_mfgr order by p_name) as r,
 dense_rank() over (partition by p_mfgr order by p_name) as dr,
@@ -115,7 +115,7 @@ from noop(on part_orc
 
 -- 5. testPTFAndWhereWithWindowing
 
-explain vectorization extended
+explain vectorization detail
 select p_mfgr, p_name, p_size, 
 rank() over (partition by p_mfgr order by p_name) as r, 
 dense_rank() over (partition by p_mfgr order by p_name) as dr, 
@@ -138,7 +138,7 @@ from noop(on part_orc
 
 -- 6. testSWQAndPTFAndGBy
 
-explain vectorization extended
+explain vectorization detail
 select p_mfgr, p_name, p_size, 
 rank() over (partition by p_mfgr order by p_name) as r, 
 dense_rank() over (partition by p_mfgr order by p_name) as dr, 
@@ -163,7 +163,7 @@ group by p_mfgr, p_name, p_size
 
 -- 7. testJoin
 
-explain vectorization extended
+explain vectorization detail
 select abc.* 
 from noop(on part_orc 
 partition by p_mfgr 
@@ -178,7 +178,7 @@ order by p_name
 
 -- 8. testJoinRight
 
-explain vectorization extended
+explain vectorization detail
 select abc.* 
 from part_orc p1 join noop(on part_orc 
 partition by p_mfgr 
@@ -193,7 +193,7 @@ order by p_name
 
 -- 9. testNoopWithMap
 
-explain vectorization extended
+explain vectorization detail
 select p_mfgr, p_name, p_size, 
 rank() over (partition by p_mfgr order by p_name, p_size desc) as r
 from noopwithmap(on part_orc
@@ -208,7 +208,7 @@ order by p_name, p_size desc);
 
 -- 10. testNoopWithMapWithWindowing 
 
-explain vectorization extended
+explain vectorization detail
 select p_mfgr, p_name, p_size,
 rank() over (partition by p_mfgr order by p_name) as r,
 dense_rank() over (partition by p_mfgr order by p_name) as dr,
@@ -227,7 +227,7 @@ from noopwithmap(on part_orc
   
 -- 11. testHavingWithWindowingPTFNoGBY
 
-explain vectorization extended
+explain vectorization detail
 select p_mfgr, p_name, p_size,
 rank() over (partition by p_mfgr order by p_name) as r,
 dense_rank() over (partition by p_mfgr order by p_name) as dr,
@@ -248,7 +248,7 @@ order by p_name)
   
 -- 12. testFunctionChain
 
-explain vectorization extended
+explain vectorization detail
 select p_mfgr, p_name, p_size, 
 rank() over (partition by p_mfgr order by p_name) as r, 
 dense_rank() over (partition by p_mfgr order by p_name) as dr, 
@@ -269,7 +269,7 @@ order by p_mfgr, p_name
  
 -- 13. testPTFAndWindowingInSubQ
 
-explain vectorization extended
+explain vectorization detail
 select p_mfgr, p_name, 
 sub1.cd, sub1.s1 
 from (select p_mfgr, p_name, 
@@ -296,7 +296,7 @@ window w1 as (partition by p_mfgr order by p_name rows between 2 preceding
and 2
 
 -- 14. testPTFJoinWithWindowingWithCount
 
-explain vectorization extended
+explain vectorization detail
 select abc.p_mfgr, abc.p_name, 
 rank() over (distribute by abc.p_mfgr sort by abc.p_name) as r, 
 dense_rank() over (distribute by abc.p_mfgr sort by abc.p_name) as dr, 
@@ -323,7 +323,7 @@ order by p_name
 
 -- 15. testDistinctInSelectWithPTF
 
-explain vectorization extended
+explain vectorization detail
 select DISTINCT p_mfgr, p_name, p_size 
 from noop(on part_orc 
 partition by p_mfgr 
@@ -342,7 +342,7 @@ round(sum(p_retailprice),2) as s
 from part_orc 
 group by p_mfgr, p_brand;
 
-explain vectorization extended
+explain vectorization detail
 select p_mfgr, p_brand, s, 
 round(sum(s) over w1,2) as s1
 from noop(on mfgr_price_view 
@@ -376,7 +376,7 @@ dr INT,
 cud DOUBLE, 
 fv1 INT);
 
-explain vectorization extended
+explain vectorization detail
 from noop(on part_orc 
 partition by p_mfgr 
 order by p_name) 
@@ -413,7 +413,7 @@ select * from part_5;
 
 -- 18. testMulti2OperatorsFunctionChainWithMap
 
-explain vectorization extended
+explain vectorization detail
 select p_mfgr, p_name,  
 rank() over (partition by p_mfgr,p_name) as r, 
 dense_rank() over (partition by p_mfgr,p_name) as dr, 
@@ -448,7 +448,7 @@ from noop(on
 
 -- 19. testMulti3OperatorsFunctionChain
 
-explain vectorization extended
+explain vectorization detail
 select p_mfgr, p_name,  
 rank() over (partition by p_mfgr order by p_name) as r, 
 dense_rank() over (partition by p_mfgr order by p_name) as dr, 
@@ -483,7 +483,7 @@ from noop(on
         
 -- 20. testMultiOperatorChainWithNoWindowing
 
-explain vectorization extended
+explain vectorization detail
 select p_mfgr, p_name,  
 rank() over (partition by p_mfgr order by p_name) as r, 
 dense_rank() over (partition by p_mfgr order by p_name) as dr, 
@@ -515,7 +515,7 @@ from noop(on
 
 -- 21. testMultiOperatorChainEndsWithNoopMap
 
-explain vectorization extended
+explain vectorization detail
 select p_mfgr, p_name,  
 rank() over (partition by p_mfgr,p_name) as r, 
 dense_rank() over (partition by p_mfgr,p_name) as dr, 
@@ -550,7 +550,7 @@ from noopwithmap(on
 
 -- 22. testMultiOperatorChainWithDiffPartitionForWindow1
 
-explain vectorization extended
+explain vectorization detail
 select p_mfgr, p_name,  
 rank() over (partition by p_mfgr,p_name order by p_mfgr,p_name) as r, 
 dense_rank() over (partition by p_mfgr,p_name order by p_mfgr,p_name) as dr, 
@@ -583,7 +583,7 @@ from noop(on
 
 -- 23. testMultiOperatorChainWithDiffPartitionForWindow2
 
-explain vectorization extended
+explain vectorization detail
 select p_mfgr, p_name,  
 rank() over (partition by p_mfgr order by p_name) as r, 
 dense_rank() over (partition by p_mfgr order by p_name) as dr, 

http://git-wip-us.apache.org/repos/asf/hive/blob/b271bcb7/ql/src/test/queries/clientpositive/windowing_windowspec.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/windowing_windowspec.q b/ql/src/test/queries/clientpositive/windowing_windowspec.q
index 08b7d5c..c37aed3 100644
--- a/ql/src/test/queries/clientpositive/windowing_windowspec.q
+++ b/ql/src/test/queries/clientpositive/windowing_windowspec.q
@@ -31,6 +31,8 @@ select s, sum(i) over(partition by ts order by s) from over10k limit 100;
 
 select f, sum(f) over (partition by ts order by f range between unbounded preceding and current
row) from over10k limit 100;
 
+select f, sum(f) over (partition by ts order by f rows between 2 preceding and 1 preceding)
from over10k limit 100;
+
 select s, i, round(avg(d) over (partition by s order by i) / 10.0 , 2) from over10k limit
7;
 
 select s, i, round((avg(d) over  w1 + 10.0) - (avg(d) over w1 - 10.0),2) from over10k window
w1 as (partition by s order by i) limit 7;


Mime
View raw message