YangShaw commented on code in PR #12046:
URL: https://github.com/apache/doris/pull/12046#discussion_r956876496
##########
fe/fe-core/src/test/java/org/apache/doris/nereids/rules/expression/rewrite/ExpressionRewriteTest.java:
##########
@@ -151,6 +152,19 @@ public void testBetweenToCompoundRule() {
}
+ @Test
+ public void testInPredicateToEqualToRule() {
+ executor = new
ExpressionRuleExecutor(ImmutableList.of(InPredicateToEqualToRule.INSTANCE));
+
+ assertRewrite("a in (1)", "a = 1");
+ assertRewrite("a in (1, 2)", "a in (1, 2)");
+ assertRewrite("a not in (1)", "not a = 1");
+ assertRewrite("a not in (1, 2)", "not a in (1, 2)");
+ assertRewrite("a in (a in (1))", "a = (a = 1)");
+ assertRewrite("a in (a in (1, 2))", "a = (a in (1, 2))");
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]