Description
In the sql as follow:
select empno from emp where not case when true then deptno in (10,20) else true end
A ClassCastException was thrown out as follow:
java.lang.ClassCastException: org.apache.calcite.sql.fun.SqlCase cannot be cast to org.apache.calcite.sql.SqlBasicCall
at org.apache.calcite.sql2rel.SqlToRelConverter.pushDownNotForIn(SqlToRelConverter.java:987)
at org.apache.calcite.sql2rel.SqlToRelConverter.convertWhere(SqlToRelConverter.java:1070)
at
The reason for this issue is that the SqlToRelConverter#pushDownNotForIn method missing consideration
for SqlCase as the code shown below:
I have made a PR for this issue which push not down through SqlCase.Anybody can have a check for me? Thanks!
Attachments
Attachments
Issue Links
- links to