You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Rui Wang (Jira)" <ji...@apache.org> on 2020/10/14 17:39:00 UTC

[jira] [Commented] (CALCITE-4337) Supports PARTITION BY clause for table function table argument

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

Rui Wang commented on CALCITE-4337:
-----------------------------------

Thanks Danny to file this Jira. also cc [~jark] to move discussions here.

 

Another question of mine is, will a GROUP BY help you partition the table function and also enable adding exchange operator by optimizer? 

I agree PARTITION BY is defined by SQL standard and we can support it. But before that, just trying to understand your use case and see if existing syntax can help.

 

 

 

 

> 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
>             Fix For: 1.27.0
>
>
> 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)