bocaiding created CALCITE-4637:
----------------------------------
Summary: is not null in case is lost
Key: CALCITE-4637
URL: https://issues.apache.org/jira/browse/CALCITE-4637
Project: Calcite
Issue Type: Bug
Components: core
Affects Versions: 1.21.0
Reporter: bocaiding
Fix For: next
I found a query like below will lost condition.
select case when a > 9 and b is not null and b < 8 then c end from tbl
the "b is not null" get lost.
i.e. add such a test case in RexProgramTest will fail:
checkSimplifyUnchanged(
case_(and(gt(vIntNotNull(0), literal(9)), lt(vInt(1), literal(8)),
isNotNull(vInt(1))),
literal(7), literal(6)));
--
This message was sent by Atlassian Jira
(v8.3.4#803005)