asolimando commented on code in PR #4242:
URL: https://github.com/apache/calcite/pull/4242#discussion_r2093293133


##########
core/src/test/java/org/apache/calcite/test/RelOptRulesTest.java:
##########
@@ -347,6 +347,18 @@ private static boolean skipItem(RexNode expr) {
         .check();
   }
 
+  /**
+   * Test case for
+   * <a 
href="https://issues.apache.org/jira/browse/CALCITE-6887";>[CALCITE-6887]
+   * In should distinct values with ReduceExpressionRule</a>. */
+  @Test void testReduceExpressionsWithIn() {
+    final String sql = "select deptno, sal "
+        + "from emp "
+        + "where deptno in (1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,1) ";
+    sql(sql).withRule(CoreRules.PROJECT_REDUCE_EXPRESSIONS)

Review Comment:
   This comment seems important, it's not been incorporated into #4371. I 
understand you need at least 20 elements to avoid the `OR` expansion, it's OK, 
just make sure you have a non-sorted example with at least 20 elements as 
Julian suggests.



-- 
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]

Reply via email to