You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Jesus Camacho Rodriguez (JIRA)" <ji...@apache.org> on 2018/01/17 03:23:00 UTC
[jira] [Created] (CALCITE-2137) Materialized view rewriting not
being triggered for some join queries
Jesus Camacho Rodriguez created CALCITE-2137:
------------------------------------------------
Summary: 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
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)