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

JING ZHANG edited comment on CALCITE-4337 at 9/15/21, 3:49 AM:
---------------------------------------------------------------

[~danny0405] Hi, Danny, I would like to continue to work on this issue. Good 
news are I have made some progress, the demo in the Jira could work fine now. 
However, I have two points need more discussion. Any suggestion is appreciate.
 # The new syntax is conflict with current session window tvf syntax, please 
see more information in 
[https://calcite.apache.org/docs/reference.html#session.] Could we replace the 
old syntax directly, or take compatible into consideration.
 # Currently session window tvf support first operand is a sub query (please 
see the following demo). If we need support these cases, we need let sub query 
support partition by clause. which is more complex. Because we need to define 
what's behavior of these subquery with `partition by` clause even if they does 
not appear with session window tvf at the same time.
{code:java}
select * from table(session((select * from Shipments), descriptor(rowtime), 
descriptor(orderId), INTERVAL '10' MINUTE))
{code}


was (Author: qingru zhang):
[~danny0405] Hi, Danny, I would like to continue to work on this issue. Good 
news are I have made some progress, the demo in the Jira could work fine now. 
However, I have two points need more discussion. Any suggestion is appreciate.
 # The new syntax is conflict with current session window tvf syntax, please 
see more information in 
[https://calcite.apache.org/docs/reference.html#session.] Could we replace the 
old syntax directly, or take compatible into consideration.
 # Currently session window tvf support first operand is a sub query (please 
see the following demo). If we need support these cases, we need let sub query 
support partition by clause. which is more complex. 
{code:java}
select * from table(session((select * from Shipments), descriptor(rowtime), 
descriptor(orderId), INTERVAL '10' MINUTE))
{code}

> 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