Description
Since 1.11.0. In 1.9.0 everything works fine
Stacktrace
java.lang.ClassCastException: org.apache.flink.table.codegen.ExpressionReducer cannot be cast to org.apache.calcite.rex.RexExecutorImpl
at org.apache.calcite.plan.RelOptUtil.containsNullableFields(RelOptUtil.java:3327)
at org.apache.calcite.plan.RelOptUtil.createExistsPlan(RelOptUtil.java:499)
at org.apache.calcite.sql2rel.SqlToRelConverter.convertExists(SqlToRelConverter.java:1493)
at org.apache.calcite.sql2rel.SqlToRelConverter.substituteSubQuery(SqlToRelConverter.java:1082)
at org.apache.calcite.sql2rel.SqlToRelConverter.replaceSubQueries(SqlToRelConverter.java:990)
at org.apache.calcite.sql2rel.SqlToRelConverter.convertWhere(SqlToRelConverter.java:959)
at org.apache.calcite.sql2rel.SqlToRelConverter.convertSelectImpl(SqlToRelConverter.java:645)
at org.apache.calcite.sql2rel.SqlToRelConverter.convertSelect(SqlToRelConverter.java:623)
at org.apache.calcite.sql2rel.SqlToRelConverter.convertQueryRecursive(SqlToRelConverter.java:2860)
at org.apache.calcite.sql2rel.SqlToRelConverter.convertQuery(SqlToRelConverter.java:559)
Works fine
SELECT a, c FROM T WHERE b IN (SELECT b FROM T WHERE b = 6 OR b = 1)
java.lang.ClassCastException
SELECT a, c FROM T WHERE b NOT IN (SELECT b FROM T WHERE b = 6 OR b = 1)"