You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Feng Zhu (Jira)" <ji...@apache.org> on 2020/01/03 08:27:00 UTC
[jira] [Updated] (CALCITE-3669) logical plan optimizer test not
correct
[ https://issues.apache.org/jira/browse/CALCITE-3669?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Feng Zhu updated CALCITE-3669:
------------------------------
Description:
We can see test blow from RelOptRulesTest.java
It validates for testEmptySort, but this rule will not be fired.
and it should add PruneEmptyRules.PROJECT_INSTANCE will fire it.
Sort -> Project -> Filter -> Scan will be Sort ->Project ->Value(empty) by ReduceExpressionsRule.FILTER_INSTANCE
{code:java}
@Test public void testEmptySort() {
HepProgram program = new HepProgramBuilder().addRuleInstance(ReduceExpressionsRule.FILTER_INSTANCE).addRuleInstance(PruneEmptyRules.SORT_INSTANCE).build();
checkPlanning(program, "select * from emp where false order by deptno");
}
{code}
was:
we can see blow from RelOptRulesTest.java
it validates for testEmptySort, but this rule will not be fired.
and it should add PruneEmptyRules.PROJECT_INSTANCE will fire it.
Sort -> Project -> Filter -> Scan will be Sort ->Project ->Value(empty) by ReduceExpressionsRule.FILTER_INSTANCE
@Test public void testEmptySort() {
HepProgram program = new HepProgramBuilder()
.addRuleInstance(ReduceExpressionsRule.FILTER_INSTANCE)
.addRuleInstance(PruneEmptyRules.SORT_INSTANCE)
.build();
checkPlanning(program,
"select * from emp where false order by deptno");
}
> logical plan optimizer test not correct
> ---------------------------------------
>
> Key: CALCITE-3669
> URL: https://issues.apache.org/jira/browse/CALCITE-3669
> Project: Calcite
> Issue Type: Improvement
> Reporter: jackylau
> Priority: Major
>
> We can see test blow from RelOptRulesTest.java
> It validates for testEmptySort, but this rule will not be fired.
> and it should add PruneEmptyRules.PROJECT_INSTANCE will fire it.
> Sort -> Project -> Filter -> Scan will be Sort ->Project ->Value(empty) by ReduceExpressionsRule.FILTER_INSTANCE
>
> {code:java}
> @Test public void testEmptySort() {
> HepProgram program = new HepProgramBuilder().addRuleInstance(ReduceExpressionsRule.FILTER_INSTANCE).addRuleInstance(PruneEmptyRules.SORT_INSTANCE).build();
> checkPlanning(program, "select * from emp where false order by deptno");
> }
> {code}
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)