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

ASF GitHub Bot updated FLINK-12174:
-----------------------------------
    Labels: pull-request-available  (was: )

> Introduce FlinkAggregateExtractProjectRule and remove extractFieldReferences
> ----------------------------------------------------------------------------
>
>                 Key: FLINK-12174
>                 URL: https://issues.apache.org/jira/browse/FLINK-12174
>             Project: Flink
>          Issue Type: Improvement
>          Components: Table SQL / API
>            Reporter: Hequn Cheng
>            Assignee: Hequn Cheng
>            Priority: Major
>              Labels: pull-request-available
>
> Currently, when parsing Table API expression, an inner project will be added 
> to projects fields for {{Aggregate}}s. As the code show below:
> {code:java}
>     if (!extracted.getAggregations.isEmpty) {
>       val projectFields = extractFieldReferences(expressionsWithResolvedCalls)
>       wrap(
>         operationTreeBuilder.project(extracted.getProjections,
>           operationTreeBuilder.aggregate(emptyList[Expression], 
> extracted.getAggregations,
>             operationTreeBuilder.project(projectFields, operationTree)
>           )
>         )
>       )
>     }
> {code}
> This optimization is not very suited to added here, instead, we can use a 
> rule to achieve this. The `extractFieldReferences` method can also be removed 
> if we use a rule which also makes the Expression parsing logic more clear.



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

Reply via email to