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

Harish Butani commented on HIVE-4112:
-------------------------------------

yes LESS and MORE as keywords.
they are used for value based windows. 
For e.g.
{noformat}
sum(p_retailprice) as s2 over (range between p_size 5 less and current row)
{noformat}
Sum the price of all Products whose size is upto 5 less than this product. 
Could be any number of rows.

We support Preceding and Following, but those are range based, so for e.g.:
{noformat}
sum(p_retailprice) as s2 over (rows between 5 preceding and current row)
{noformat}
would mean sum over this row and 5 rows before this.

 
                
> Window range specification should be more flexible
> --------------------------------------------------
>
>                 Key: HIVE-4112
>                 URL: https://issues.apache.org/jira/browse/HIVE-4112
>             Project: Hive
>          Issue Type: Bug
>          Components: PTF-Windowing
>            Reporter: Ashutosh Chauhan
>
> select s, avg(f) over (partition by dec order by d rows 5 preceding) from 
> over100k;
> is a legal query which is currently rejected by Parser.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to