Caican Cai created CALCITE-6439: ----------------------------------- Summary: FILTER_INSTANCE in RelOptRule does not take effect Key: CALCITE-6439 URL: https://issues.apache.org/jira/browse/CALCITE-6439 Project: Calcite Issue Type: Bug Components: core Affects Versions: 1.37.0 Reporter: Caican Cai Fix For: 1.38.0, 1.36.0
test example {code:java} @Test void testFilterNull() { final String sql = "select * from emp where null"; sql(sql).withRule(PruneEmptyRules.FILTER_INSTANCE).check(); } {code} logical plan {code:java} </Resource> </TestCase> <TestCase name="testFilterNull"> <Resource name="sql"> <![CDATA[select * from emp where null]]> </Resource> <Resource name="planBefore"> <![CDATA[ LogicalProject(EMPNO=[$0], ENAME=[$1], JOB=[$2], MGR=[$3], HIREDATE=[$4], SAL=[$5], COMM=[$6], DEPTNO=[$7], SLACKER=[$8]) LogicalFilter(condition=[null:BOOLEAN]) LogicalTableScan(table=[[CATALOG, SALES, EMP]]) ]]> </Resource> <Resource name="planAfter"> <![CDATA[ LogicalProject(EMPNO=[$0], ENAME=[$1], JOB=[$2], MGR=[$3], HIREDATE=[$4], SAL=[$5], COMM=[$6], DEPTNO=[$7], SLACKER=[$8]) LogicalFilter(condition=[null:BOOLEAN]) LogicalTableScan(table=[[CATALOG, SALES, EMP]]) ]]>{code} unchanged -- This message was sent by Atlassian Jira (v8.20.10#820010)