herunkang2018 commented on code in PR #3279:
URL: https://github.com/apache/calcite/pull/3279#discussion_r1248362055
##########
core/src/test/java/org/apache/calcite/rex/RexProgramTest.java:
##########
@@ -2010,6 +2010,20 @@ private void checkExponentialCnf(int n) {
">(?0.int0, 0)");
}
+ /** Unit test for
+ * <a
href="https://issues.apache.org/jira/browse/CALCITE-5798">[CALCITE-5798]
+ * '(1 < x) IS NOT TRUE' when x is not nullable should be simplified to '1
>= x'</a>. */
+ @Test void testSimplifyInverseComparisonWithIsNotNullPredicate() {
+ final RexNode ref = input(tInt(true), 0);
+ RelOptPredicateList relOptPredicateList =
+ RelOptPredicateList.of(rexBuilder,
+ ImmutableList.of(isNotNull(ref)));
+ checkSimplifyFilter(
+ isNotTrue(gt(literal(1), ref)),
Review Comment:
@NobiGo Thanks for review, I will refine it soon.
--
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]