xiedeyantu commented on code in PR #4749:
URL: https://github.com/apache/calcite/pull/4749#discussion_r2694306866
##########
core/src/test/java/org/apache/calcite/test/RelOptRulesTest.java:
##########
@@ -2093,6 +2093,33 @@ private void
checkSemiOrAntiJoinProjectTranspose(JoinRelType type) {
assertTrue(join.getHints().contains(noHashJoinHint));
}
+ /** Test case for
+ * <a
href="https://issues.apache.org/jira/browse/CALCITE-7373">[CALCITE-7373]
+ * FILTER_INTO_JOIN should not push Filter into a join
+ * when the Filter contains non-deterministic function</a>. */
+ @Test void testPushFilterThroughJoinWithNonDeterministic() {
+ final String sql = "select * from (\n"
+ + " select * from dept inner join\n"
+ + " emp on dept.deptno = emp.deptno) R\n"
+ + "where 0.9 <= rand()";
+ sql(sql)
Review Comment:
Do we need to consider the pushdown in this scenario? That is, the case
where the condition containing rand() includes a join key.
```
select * from (
select dept.deptno from dept inner join
emp on dept.deptno = emp.deptno) R
where deptno <= rand() * 100;
```
--
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]