[ https://issues.apache.org/jira/browse/CALCITE-6439?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Caican Cai closed CALCITE-6439. ------------------------------- Resolution: Not A Problem > FILTER_INSTANCE in RelOptRule does not take effect > -------------------------------------------------- > > Key: CALCITE-6439 > URL: https://issues.apache.org/jira/browse/CALCITE-6439 > Project: Calcite > Issue Type: Wish > Components: core > Affects Versions: 1.37.0 > Reporter: Caican Cai > Priority: Minor > Fix For: 1.38.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. > The logical plan that should be generated after optimization > {code:java} > LogicalValues(tuples=[[]]){code} > or > {code:java} > LogicalProject(EMPNO=[$0], ENAME=[$1], JOB=[$2], MGR=[$3], HIREDATE=[$4], > SAL=[$5], COMM=[$6], DEPTNO=[$7], SLACKER=[$8]) > LogicalValues(tuples=[[]]) {code} {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)