abstractdog commented on code in PR #3412:
URL: https://github.com/apache/hive/pull/3412#discussion_r911621565
##########
ql/src/test/queries/clientpositive/vector_ptf_bounded_start.q:
##########
@@ -726,4 +727,51 @@ EXPLAIN VECTORIZATION DETAIL select p_mfgr, p_name,
p_timestamp, rowindex, p_dat
count(*) over(partition by p_varchar) as
cs,
sum(p_retailprice) over(partition by
p_varchar) as s
from vector_ptf_part_simple_orc
-where p_varchar = 'DA';
\ No newline at end of file
+where p_varchar = 'DA';
+
+select "************ BOOLEAN WINDOW RANGE TYPE ************";
+set hive.vectorized.execution.ptf.enabled=false;
+
+select "************ BOOLEAN WINDOW RANGE TYPE (NON-VECTORIZED REFERENCE)
************";
+select p_mfgr, p_name, p_timestamp, rowindex, p_date, p_retailprice, p_char,
p_boolean,
+ count(*) over(partition by p_mfgr order by p_boolean range between 3
preceding and current row) as cs,
+ sum(p_retailprice) over(partition by p_mfgr order by p_boolean range
between 3 preceding and current row) as s
+from vector_ptf_part_simple_orc;
+
+select "************ BOOLEAN WINDOW RANGE TYPE (VECTORIZED) ************";
+set hive.vectorized.execution.ptf.enabled=true;
+
+EXPLAIN VECTORIZATION DETAIL select p_mfgr, p_name, p_timestamp, rowindex,
p_date, p_retailprice,p_char, p_boolean,
+ count(*) over(partition by p_mfgr order by
p_boolean range between 3 preceding and
+ current row) as cs,
+ sum(p_retailprice) over(partition by
p_mfgr order by p_boolean range between 3 preceding and current row) as s
+from vector_ptf_part_simple_orc;
+
+select p_mfgr, p_name, p_timestamp, rowindex, p_date, p_retailprice,p_char,
p_boolean,
Review Comment:
checked in q.out, the result of this doesn't equal to the non-vectorized
one, can you please check?
##########
data/files/vector_ptf_part_simple_all_datatypes.txt:
##########
@@ -1,40 +1,40 @@
-Manufacturer#2,almond aquamarine rose maroon antique,NULL,900.66,A,DA,1
-Manufacturer#1,almond aquamarine burnished black
steel,1970-01-02,1414.42,B,AB,2
-Manufacturer#2,almond aquamarine rose maroon antique,1970-01-03,1698.66,C,CA,3
-Manufacturer#1,almond aquamarine pink moccasin thistle,1970-01-04,NULL,A,DE,4
-Manufacturer#1,almond antique chartreuse lavender
yellow,1970-01-05,1753.76,B,AC,5
-Manufacturer#5,almond antique medium spring khaki,1970-01-01,1611.66,C,AA,6
-Manufacturer#5,almond antique blue firebrick mint,NULL,1789.69,D,FD,7
-Manufacturer#1,almond antique burnished rose metallic,1970-01-03,1173.15,A,SM,8
-Manufacturer#1,almond aquamarine pink moccasin
thistle,1970-01-04,1632.66,B,AK,9
-Manufacturer#3,almond antique forest lavender
goldenrod,1970-01-05,1190.27,C,AY,10
-Manufacturer#4,almond aquamarine yellow dodger mint,1970-01-01,1844.92,D,FD,11
-Manufacturer#1,almond antique chartreuse lavender
yellow,1970-01-02,1753.76,D,DA,12
-Manufacturer#2,almond antique violet turquoise frosted,NULL,1800.7,B,AC,13
-Manufacturer#3,almond antique forest lavender goldenrod,1970-01-04,NULL,C,BB,14
-Manufacturer#2,almond antique violet chocolate
turquoise,1970-01-05,1690.68,D,LM,15
-Manufacturer#4,almond antique violet mint lemon,1970-01-01,1375.42,B,OP,16
-Manufacturer#1,almond aquamarine pink moccasin
thistle,1970-01-02,1632.66,D,RS,17
-Manufacturer#5,almond azure blanched chiffon
midnight,1970-01-03,1464.48,C,AB,18
-Manufacturer#3,almond antique forest lavender goldenrod,NULL,590.27,D,CD,19
-Manufacturer#1,almond antique chartreuse lavender
yellow,1970-01-05,1753.76,A,EF,20
-Manufacturer#2,almond antique violet turquoise
frosted,1970-01-01,1800.7,B,AA,21
-Manufacturer#5,almond antique sky peru orange,1970-01-02,1788.73,A,BB,22
-Manufacturer#1,almond aquamarine pink moccasin
thistle,1970-01-03,1632.66,D,CC,23
-Manufacturer#3,almond antique chartreuse khaki white,1970-01-04,99.68,C,DD,24
-Manufacturer#4,almond antique gainsboro frosted violet,NULL,NULL,A,EE,25
-Manufacturer#1,almond antique chartreuse lavender yellow,NULL,1753.76,C,AD,26
-Manufacturer#2,almond antique violet turquoise
frosted,1970-01-02,1800.7,D,AB,27
-Manufacturer#3,almond antique olive coral navajo,1970-01-03,1337.29,A,AC,28
-Manufacturer#5,almond antique medium spring khaki,1970-01-04,1611.66,B,AA,29
-Manufacturer#1,almond antique salmon chartreuse
burlywood,1970-01-05,1602.59,C,BB,30
-Manufacturer#3,almond antique misty red olive,1970-01-01,1922.98,D,BC,31
-Manufacturer#2,almond aquamarine sandy cyan gainsboro,NULL,1000.6,A,BD,32
-Manufacturer#3,almond antique forest lavender
goldenrod,1970-01-03,1190.27,B,CA,33
-Manufacturer#2,almond aquamarine midnight light
salmon,1970-01-04,2031.98,C,CB,34
-Manufacturer#4,almond aquamarine floral ivory bisque,1970-01-05,NULL,A,CC,35
-Manufacturer#5,almond aquamarine dodger light
gainsboro,1970-01-01,1018.1,B,CD,36
-Manufacturer#4,almond azure aquamarine papaya violet,1970-01-02,1290.35,C,DA,37
-Manufacturer#3,almond antique metallic orange dim,NULL,55.39,D,DB,38
-Manufacturer#1,almond antique burnished rose
metallic,1970-01-04,1173.15,D,DC,39
-Manufacturer#4,almond aquamarine floral ivory bisque,1970-01-05,1206.26,C,DD,40
\ No newline at end of file
+Manufacturer#2,almond aquamarine rose maroon antique,NULL,900.66,A,DA,true,1
Review Comment:
is it possible to insert NULL into a boolean column? if it is, let's try at
least some NULL values (scanner uses null checks, maybe we'll hit that codepath)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]