You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Amogh Margoor (JIRA)" <ji...@apache.org> on 2016/04/26 07:16:12 UTC
[jira] [Created] (CALCITE-1216) Add new rules for Materialised view
optimisation of join queries
Amogh Margoor created CALCITE-1216:
--------------------------------------
Summary: Add new rules for Materialised view optimisation of join queries
Key: CALCITE-1216
URL: https://issues.apache.org/jira/browse/CALCITE-1216
Project: Calcite
Issue Type: Improvement
Components: core
Affects Versions: next
Reporter: Amogh Margoor
Assignee: Amogh Margoor
Priority: Minor
This is to keep track of adding new rules that would enable optimisation using view of join queries. For instance, when we have materialised view of table 'X' named 'X_part' defined by query: " select * from X where X.a > '2016-01-01' " then we expect following query to be optimised by 'X_part':
select * from X inner join Y on X.id = Y.xid inner join Z on Y.id=Z.yid where X.a > '2016-02-02' and Y.b = "Bangalore"
Following are the changes done in Quark which we are planning to pull into Calcite:
1. Add a new Rule for Filter on TableScan. Basically, after predicate has been pushed through join onto table scan, new rule checks if it can be optimised by Materialised View.
https://github.com/qubole/quark/blob/master/optimizer/src/main/java/com/qubole/quark/planner/MaterializedViewFilterScanRule.java
2. Add a new Unify rule to MaterialisedSubstitutionVisitor:
https://github.com/qubole/incubator-calcite/commit/2d031d14d23810291377d92dc5ef2eaa515d35b7
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)