Zhen Chen created CALCITE-6891:
----------------------------------
Summary: Implement IntersectReorderRule
Key: CALCITE-6891
URL: https://issues.apache.org/jira/browse/CALCITE-6891
Project: Calcite
Issue Type: Improvement
Reporter: Zhen Chen
Assignee: Zhen Chen
Do we need this rule?
from:
{code:java}
LogicalIntersect(all=[false])
LogicalProject(DEPTNO=[$7])
LogicalFilter(condition=[>($7, 10)])
LogicalTableScan(table=[[CATALOG, SALES, EMP(big)]])
LogicalProject(DEPTNO=[$0])
LogicalFilter(condition=[>($0, 5)])
LogicalTableScan(table=[[CATALOG, SALES, DEPT(small)]]){code}
to
{code:java}
LogicalIntersect(all=[false])
LogicalProject(DEPTNO=[$0])
LogicalFilter(condition=[>($0, 5)])
LogicalTableScan(table=[[CATALOG, SALES, DEPT(small)]])
LogicalProject(DEPTNO=[$7])
LogicalFilter(condition=[>($7, 10)])
LogicalTableScan(table=[[CATALOG, SALES, EMP(big)]]) {code}
This rule put smaller inputs first. This helps reduce the size of intermediate
results.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)