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
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!