You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Liya Fan (Jira)" <ji...@apache.org> on 2020/09/28 08:59:00 UTC

[jira] [Commented] (CALCITE-4287) AggregateJoinRemoveRule and ProjectJoinRemoveRule are not fired if the last column of the join's left input is referenced

    [ https://issues.apache.org/jira/browse/CALCITE-4287?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17203102#comment-17203102 ] 

Liya Fan commented on CALCITE-4287:
-----------------------------------

[~rubenql] Thanks for your for your good suggestion. The title suggested by you sounds much better. 

> AggregateJoinRemoveRule and ProjectJoinRemoveRule are not fired if the last column of the join's left input is referenced
> -------------------------------------------------------------------------------------------------------------------------
>
>                 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
>              Labels: pull-request-available
>             Fix For: 1.26.0
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> In some rules (e.g. {{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)