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

Rui Wang commented on CALCITE-4000:
-----------------------------------

Yes you are right. SESSION does not have the offset parameter because session 
is merging window so the window size will change, and offset is not useful.


Updated the descriptor to say OFFSET is of type INTERVAL, and give an example 
for TUMBLE. 

> Support OFFSET parameter in TUMBLE/HOP table functions 
> -------------------------------------------------------
>
>                 Key: CALCITE-4000
>                 URL: https://issues.apache.org/jira/browse/CALCITE-4000
>             Project: Calcite
>          Issue Type: Sub-task
>            Reporter: Rui Wang
>            Assignee: Rui Wang
>            Priority: Major
>
> TUMBLE/HOP have an optional "OFFSET" parameter to indicate how many time off 
> from 0 for windowing. The OFFSET parameter is interval type.
> {code:java}
> TUMBLE(table, size [, offset])
> HOP(table, shift, size, [, offset])
> {code}
> One example:
> Say here is a TUMBLE call with the following output
> TUMBLE(table, INTERNVAL '5' MINUTE)
> ||rowtime||window_start||window_end||
> |2020-06-20 12:23:40|2020-06-20 12:20:00|2020-06-20 12:25:00|
> if using the optional offset parameter
> TUMBLE(table, INTERNVAL '5' MINUTE, INTERNVAL '2' MINUTE)
> ||rowtime||window_start||window_end||
> |2020-06-20 12:23:40|2020-06-20 12:22:00|2020-06-20 12:27:00|



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to