[ 
https://issues.apache.org/jira/browse/HIVE-24905?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17498059#comment-17498059
 ] 

Stamatis Zampetakis commented on HIVE-24905:
--------------------------------------------

Since {{RANGE BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING}} is not 
vectorized at the moment there is a hack in 
[ASTConverter|https://github.com/apache/hive/blob/2a1a73f665eee497ebdb0745ab2c31c1614de017/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/translator/ASTConverter.java#L724]
 to transform RANGE to ROWS (i.e.,g {{ROWS BETWEEN UNBOUNDED PRECEDING AND 
UNBOUNDED FOLLOWING}}) when the window is unbounded since they are equivalent. 
When this issue is resolved we could remove the respective code in ASTConverter.


> only CURRENT ROW end frame is supported for RANGE
> -------------------------------------------------
>
>                 Key: HIVE-24905
>                 URL: https://issues.apache.org/jira/browse/HIVE-24905
>             Project: Hive
>          Issue Type: Sub-task
>            Reporter: László Bodor
>            Assignee: László Bodor
>            Priority: Major
>
> This one is about to take care of vectorizing the FOLLOWING rows case:
> {code}
> avg(p_retailprice) over(partition by p_mfgr order by p_date range between 1 
> preceding and 3 following) as avg1,
> {code}
> {code}
>             Reduce Vectorization:
>                 enabled: true
>                 enableConditionsMet: hive.vectorized.execution.reduce.enabled 
> IS true, hive.execution.engine tez IN [tez, spark] IS true
>                 notVectorizedReason: PTF operator: count only CURRENT ROW end 
> frame is supported for RANGE
>                 vectorized: false
> {code}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to