asolimando commented on code in PR #4371:
URL: https://github.com/apache/calcite/pull/4371#discussion_r2099895643
##########
core/src/test/java/org/apache/calcite/test/RelOptRulesTest.java:
##########
@@ -354,6 +354,32 @@ private static boolean skipItem(RexNode expr) {
.check();
}
+ /** Test case for
+ * <a
href="https://issues.apache.org/jira/browse/CALCITE-6887">[CALCITE-6887]
+ * ReduceExpressionsRule applied to 'IN subquery' should make the values
distinct
+ * if the subquery is a constant Values</a>. */
+ @Test void testReduceInValues() {
+ final String sql = "SELECT deptno, sal "
+ + "FROM EMP "
+ + "WHERE deptno IN (1,1,3,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1)";
Review Comment:
> Because these are not literals, they are constant expressions. That's not
the same thing.
Then I guess we should update the title of the Jira ticket to something like
"ReduceExpressionsRule applied to 'IN subquery' should make the values distinct
if the subquery is a Values composed of literals"?
--
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]