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: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to