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

JING ZHANG commented on CALCITE-4337:
-------------------------------------

[~danny0405] I've made further progress. I would update work on above two 
point, please correct me if anything is wrong. I would submit pr recently, 
thanks.
 # I would support new syntax and old syntax for session window at the same 
time which means user could specify partition key in first operand by partition 
by clause or could specify partition key at key descriptor. If a session window 
both have those two partition keys, and they are different with each other, an 
exception would be thrown out.
 # I would limit partition by clause in the first operand of the  Session 
window table function. It means, for subquery or Table directly, they all could 
followed by  a partition-by clause. But they are only valid when they appears 
at the first operand of Session window table function.

> Supports PARTITION BY clause for table function table argument
> --------------------------------------------------------------
>
>                 Key: CALCITE-4337
>                 URL: https://issues.apache.org/jira/browse/CALCITE-4337
>             Project: Calcite
>          Issue Type: New Feature
>          Components: core
>    Affects Versions: 1.26.0
>            Reporter: Danny Chen
>            Assignee: Danny Chen
>            Priority: Major
>
> An example from the SQL standard 2016 Polymorphic Table Functions:
> {code:sql}
> SELECT W.wstart, W.wend, OI.customer, SUM(OI.price)
> FROM TABLE(SESSION(
>   data => TABLE(order_item) AS OI PARTITION BY customer, 
>   timecol => DESCRIPTOR(order_time),
>   timeout => INTERVAL '10' MINUTE)) W
> GROUP BY 1, 2, 3
> {code}



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

Reply via email to