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

Flink Jira Bot updated FLINK-7144:
----------------------------------
    Labels: auto-unassigned stale-major  (was: auto-unassigned)

I am the [Flink Jira Bot|https://github.com/apache/flink-jira-bot/] and I help 
the community manage its development. I see this issues has been marked as 
Major but is unassigned and neither itself nor its Sub-Tasks have been updated 
for 30 days. I have gone ahead and added a "stale-major" to the issue". If this 
ticket is a Major, please either assign yourself or give an update. Afterwards, 
please remove the label or in 7 days the issue will be deprioritized.


> Optimize multiple LogicalAggregate into one
> -------------------------------------------
>
>                 Key: FLINK-7144
>                 URL: https://issues.apache.org/jira/browse/FLINK-7144
>             Project: Flink
>          Issue Type: Improvement
>          Components: Table SQL / Legacy Planner
>            Reporter: Jark Wu
>            Priority: Major
>              Labels: auto-unassigned, stale-major
>
> When applying multiple GROUP BY, and no aggregates or expression in the first 
> GROUP BY,  and the second GROUP fields is a subset of first GROUP fields. 
> Then the first GROUP BY can be removed. 
> Such as the following SQL , 
> {code}
> SELECT a FROM (SELECT a,b,c FROM MyTable GROUP BY a, b, c) GROUP BY a
> {code}
> should be optimized into 
> {code}
> DataStreamGroupAggregate(groupBy=[a], select=[a])
> DataStreamCalc(select=[a])
> DataStreamScan(table=[[_DataStreamTable_0]])
> {code}
> but get:
> {code}
> DataStreamGroupAggregate(groupBy=[a], select=[a])
> DataStreamCalc(select=[a])
> DataStreamGroupAggregate(groupBy=[a, b, c], select=[a, b, c])
> DataStreamScan(table=[[_DataStreamTable_0]])
> {code}
> I looked for the Calcite built-in rules, but can't find a match one. So maybe 
> we should implement one , and maybe we should implement it in Calcite. 



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

Reply via email to