Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
Description
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:
select * from "emps" join "dependents" using ("empid");
Query:
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';