xuzifu666 commented on code in PR #4242:
URL: https://github.com/apache/calcite/pull/4242#discussion_r2095219952
##########
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:
@asolimando @julianhyde I had added the case with non-sorted and less then
20 values in commit:
https://github.com/apache/calcite/pull/4371/commits/c4273c449855a8dc8caa48c0b3f49d27a782495e
--
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]