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

Jesus Camacho Rodriguez resolved CALCITE-2137.
----------------------------------------------
    Resolution: Fixed

Fixed in http://git-wip-us.apache.org/repos/asf/calcite/commit/73e57ad48 .

> Materialized view rewriting not being triggered for some join queries
> ---------------------------------------------------------------------
>
>                 Key: CALCITE-2137
>                 URL: https://issues.apache.org/jira/browse/CALCITE-2137
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>            Reporter: Jesus Camacho Rodriguez
>            Assignee: Jesus Camacho Rodriguez
>            Priority: Major
>              Labels: materializedviews
>             Fix For: 1.16.0
>
>
> The issue has to do with the column equivalences mapping for joins with 
> equality predicates for columns that are output by the query or subquery 
> (basically, there is a bug and we do not apply mapping). This results in 
> missing rewriting opportunities as the top expression cannot be mapped from 
> the query to the view. It can be reproduced with the following MV and query 
> in {{MaterializationTest.java}}:
> MV:
> {code}
> select *
> from "emps"
> join "dependents" using ("empid");
> {code}
> Query:
> {code}
> select "emps"."empid", "dependents"."empid", "emps"."deptno"
> from "emps"
> join "dependents" using ("empid")
> join "depts" "a" on ("emps"."deptno"="a"."deptno")
> where "emps"."name" = 'Bill';
> {code}



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

Reply via email to