You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by "jackylau (Jira)" <ji...@apache.org> on 2020/01/03 08:04:00 UTC

[jira] [Created] (CALCITE-3669) logical plan optimizer test not correct

jackylau created CALCITE-3669:
---------------------------------

             Summary: 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


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");
}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)