You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "godfrey he (JIRA)" <ji...@apache.org> on 2019/04/12 09:41:00 UTC

[jira] [Updated] (FLINK-12170) Add support for generating optimized logical plan for Over aggregate

     [ https://issues.apache.org/jira/browse/FLINK-12170?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

godfrey he updated FLINK-12170:
-------------------------------
    Description: 
This issue aims to generate optimized plan for Over aggregate queries on both Batch and Stream, e.g. 
{code:sql}
SELECT a, b, c, RANK() OVER (PARTITION BY b ORDER BY c) FROM MyTable
{code}

currently, Stream requires all over aggregate functions must be computed on the  same window, e.g. 
{code:sql}
SELECT c,
    COUNT(a) OVER (PARTITION BY c ORDER BY proctime RANGE UNBOUNDED PRECEDING),
    SUM(a) OVER (PARTITION BY b ORDER BY proctime RANGE UNBOUNDED PRECEDING)
from MyTable
{code} 
the above sql is not supported because the partition keys is different.

Batch does not  have such limitation.




  was:
This issue aims to generate optimized plan for Over aggregate queries, e.g. 
{code:sql}
SELECT a, b, c, RANK() OVER (PARTITION BY b ORDER BY c) FROM MyTable
{code}

currently, Stream requires all over aggregate functions must be computed on the  same window, e.g. 
{code:sql}
SELECT c,
    COUNT(a) OVER (PARTITION BY c ORDER BY proctime RANGE UNBOUNDED PRECEDING),
    SUM(a) OVER (PARTITION BY b ORDER BY proctime RANGE UNBOUNDED PRECEDING)
from MyTable
{code} 
the above sql is not supported because the partition keys is different.

Batch does not  have such limitation.





> Add support for generating optimized logical plan for Over aggregate
> --------------------------------------------------------------------
>
>                 Key: FLINK-12170
>                 URL: https://issues.apache.org/jira/browse/FLINK-12170
>             Project: Flink
>          Issue Type: New Feature
>          Components: Table SQL / Planner
>            Reporter: godfrey he
>            Assignee: godfrey he
>            Priority: Major
>
> This issue aims to generate optimized plan for Over aggregate queries on both Batch and Stream, e.g. 
> {code:sql}
> SELECT a, b, c, RANK() OVER (PARTITION BY b ORDER BY c) FROM MyTable
> {code}
> currently, Stream requires all over aggregate functions must be computed on the  same window, e.g. 
> {code:sql}
> SELECT c,
>     COUNT(a) OVER (PARTITION BY c ORDER BY proctime RANGE UNBOUNDED PRECEDING),
>     SUM(a) OVER (PARTITION BY b ORDER BY proctime RANGE UNBOUNDED PRECEDING)
> from MyTable
> {code} 
> the above sql is not supported because the partition keys is different.
> Batch does not  have such limitation.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)