You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Jin Xing (Jira)" <ji...@apache.org> on 2019/11/01 07:24:00 UTC
[jira] [Resolved] (CALCITE-3256) Add
ProjectOnProjectToProjectUnifyRule for materialization matching.
[ https://issues.apache.org/jira/browse/CALCITE-3256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jin Xing resolved CALCITE-3256.
-------------------------------
Resolution: Duplicate
> Add ProjectOnProjectToProjectUnifyRule for materialization matching.
> --------------------------------------------------------------------
>
> Key: CALCITE-3256
> URL: https://issues.apache.org/jira/browse/CALCITE-3256
> Project: Calcite
> Issue Type: Sub-task
> Components: core
> Reporter: Jin Xing
> Assignee: Jin Xing
> Priority: Major
> Labels: pull-request-available
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> In current code, below matching fails:
> {code:java}
> MV:
> select deptno, sum(salary) + 2, sum(commission)
> from emps
> group by deptno
> Query:
> select deptno, sum(salary) + 2
> from emps
> group by deptno
> {code}
> The reason is that -- after matching of the Aggregates, a compensating Project is added, but afterwards matching fails to handle it.
> This issue proposes to add a rule that match when query and target are both Project and query has a compensating Project as a child. After this issue below case can be handled:
> {code:java}
> Query:
> Project(projects: [$0, +($1, 2)])
> Project(projects: [$1, $3, $4])
> Rel-A
> Target:
> Project(projects: [$1, +($3, 2)])
> Rel-A
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)