NobiGo commented on code in PR #3296:
URL: https://github.com/apache/calcite/pull/3296#discussion_r1255270451
##########
core/src/test/java/org/apache/calcite/rex/RexProgramTest.java:
##########
@@ -2458,6 +2458,79 @@ private SqlOperator getNoDeterministicOperator() {
checkSimplifyUnchanged(isNull(cast(vVarcharNotNull(), tInt(false))));
}
+ /** Unit test for
+ * <a
href="https://issues.apache.org/jira/browse/CALCITE-5769">[CALCITE-5769]
+ * Optimizing 'CAST(e AS t) IS NOT NULL' to 'e IS NOT NULL'</a>. */
+ @Test void testSimplifyCastIsNull3() {
+ // "(cast A as bigint) IS NULL" when A is int and A is not null
+ // ==>
+ // "false"
+ checkSimplify(isNull(cast(vIntNotNull(), tBigInt(false))), "false");
Review Comment:
Looks like the java doc has some problem. We can fix it in another issue.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]