Hequn Cheng created FLINK-12182:
-----------------------------------
Summary: AggregateProjectMergeRule can not handle LogicalWindowAggregate
Key: FLINK-12182
URL:
https://issues.apache.org/jira/browse/FLINK-12182 Project: Flink
Issue Type: Bug
Components: Table SQL / API
Reporter: Hequn Cheng
Assignee: Hequn Cheng
Currently, we add the AggregateProjectMergeRule.INSTANCE in logical rule sets and use it to remove project for aggregates. However, there are some bugs when this rule be applied for the LogicalWindowAggregate.
When the project was removed, the input field names are changed, so the rule has to update all fields in the Aggregate, while the field name in LogicalWindow in LogicalWindowAggregate has not taken into consideration in AggregateProjectMergeRule, as it is a rule in Calcite.
As a quick fix, I think we can change
{code:java}
AggregateProjectMergeRule.INSTANCE,
{code}
to
{code:java}
new AggregateProjectMergeRule(
classOf[LogicalAggregate], classOf[Project], RelFactories.LOGICAL_BUILDER),
{code}
Of course, we need a complete solution for the LogicalWindowAggregate, but not in this jira.
Any suggestions are welcomed!
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)