ayushtkn commented on code in PR #3412:
URL: https://github.com/apache/hive/pull/3412#discussion_r919833948
##########
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:
yeps, it was something screwed at the distance calculation logic. I fixed
it. Now it seems identical.
<img width="1566" alt="image"
src="https://user-images.githubusercontent.com/25608848/178695198-079c542f-abdc-45a0-8412-148867dd85c9.png">
--
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]