You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2019/09/19 19:53:49 UTC
[GitHub] [calcite] julianhyde commented on a change in pull request #1453:
[CALCITE-3346] Enable some ignored tests in RelOptRuleTests
julianhyde commented on a change in pull request #1453: [CALCITE-3346] Enable some ignored tests in RelOptRuleTests
URL: https://github.com/apache/calcite/pull/1453#discussion_r326355692
##########
File path: core/src/test/resources/org/apache/calcite/test/RelOptRulesTest.xml
##########
@@ -4715,11 +4733,19 @@ LogicalProject(ENAME=[$1])
</Resource>
<Resource name="planBefore">
<![CDATA[
-ProjectRel(DNAME=[$10], ENAME=[$1])
- FilterRel(condition=[=($10, 'Propane')])
- JoinRel(condition=[=($7, $9)], joinType=[inner])
- TableAccessRel(table=[[CATALOG, SALES, EMP]])
- TableAccessRel(table=[[CATALOG, SALES, DEPT]])
+LogicalProject(DNAME=[$10], ENAME=[$1])
+ LogicalFilter(condition=[=($10, 'Propane')])
+ LogicalJoin(condition=[=($7, $9)], joinType=[inner])
+ LogicalTableScan(table=[[CATALOG, SALES, EMP]])
+ LogicalTableScan(table=[[CATALOG, SALES, DEPT]])
+]]>
+ </Resource>
+ <Resource name="planAfter">
+ <![CDATA[
+LogicalCalc(expr#0..10=[{inputs}], expr#11=[=($t7, $t9)], expr#12=['Propane':VARCHAR(10)], expr#13=[=($t10, $t12)], expr#14=[AND($t11, $t13)], DNAME=[$t10], ENAME=[$t1], $condition=[$t14])
+ LogicalJoin(condition=[true], joinType=[inner])
Review comment:
Yes, that's the purpose of `JoinExtractFilterRule`. It isn't widely used, but it is a valid transformation. Don't worry too much about whether these are "optimizations"; just ask whether they are semantically valid rewrites.
There are quite a few rules that are useful in matching materialized views that do not seem to make the plan cheaper.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services