xuzifu666 commented on code in PR #5295:
URL: https://github.com/apache/calcite/pull/5295#discussion_r4220225303
##########
core/src/test/java/org/apache/calcite/rex/RexProgramTest.java:
##########
@@ -2472,6 +2472,61 @@ private void checkExponentialCnf(int n) {
"=(?0.notNullInt0, ?0.int1)");
}
+ /** Test case for
+ * <a
href="https://issues.apache.org/jira/browse/CALCITE-5907">[CALCITE-5907]
+ * Unexpected boolean expression simplification for And expression</a>. */
Review Comment:
Done.
##########
core/src/test/java/org/apache/calcite/rex/RexProgramTest.java:
##########
@@ -2472,6 +2472,61 @@ private void checkExponentialCnf(int n) {
"=(?0.notNullInt0, ?0.int1)");
}
+ /** Test case for
+ * <a
href="https://issues.apache.org/jira/browse/CALCITE-5907">[CALCITE-5907]
+ * Unexpected boolean expression simplification for And expression</a>. */
+ @Test void testSimplifyAndEqualityTrue() {
+ // "=(x, true)" simplifies to "x" only if x is BOOLEAN;
+ // otherwise the AND would get a non-BOOLEAN operand
+ //
+ // Paranoid mode throws from RexSimplify.verify for these non-BOOLEAN
+ // inputs, so turn it off to let checkSimplifyUnchanged report the
+ // simplified expression instead
Review Comment:
Done.
--
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]