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

Liya Fan updated CALCITE-4287:
------------------------------
    Description: 
In {{AggregateJoinRemoveRule#onMatch}}, the logic of checking if the aggregate 
references any columns from the other side is incorrect.

For example, given an aggregate on a left join, the logic checks if the 
aggregate references any columns from the right side. If the aggregate happens 
to references the last column of the left input, the current implementation 
will make a wrong decision to skip the rule match.  

This will miss opportunities of simplifying the plan. 

  was:
In {{AggregateJoinRemoveRule#onMatch}}, the logic of checking if the aggregate 
references any columns from the other side is incorrect.

For example, given an aggregate on a left join, the logic checks if the 
aggregate references any columns from the right side. If the aggregate happens 
to references the last column of the left input, the current implementation 
will make a wrong decision to skip the rule match. 

 

This will miss opportunities of simplifying the plan. 


> Fix a bug in AggregateJoinRemoveRule
> ------------------------------------
>
>                 Key: CALCITE-4287
>                 URL: https://issues.apache.org/jira/browse/CALCITE-4287
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>            Reporter: Liya Fan
>            Assignee: Liya Fan
>            Priority: Major
>
> In {{AggregateJoinRemoveRule#onMatch}}, the logic of checking if the 
> aggregate references any columns from the other side is incorrect.
> For example, given an aggregate on a left join, the logic checks if the 
> aggregate references any columns from the right side. If the aggregate 
> happens to references the last column of the left input, the current 
> implementation will make a wrong decision to skip the rule match.  
> This will miss opportunities of simplifying the plan. 



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

Reply via email to