NobiGo commented on code in PR #4160:
URL: https://github.com/apache/calcite/pull/4160#discussion_r1927441984
##########
core/src/test/java/org/apache/calcite/test/JdbcAdapterTest.java:
##########
@@ -234,6 +234,32 @@ class JdbcAdapterTest {
+ "ORDER BY \"EMPNO\" NULLS LAST");
}
+ /** Test case for
+ * <a
href="https://issues.apache.org/jira/browse/CALCITE-6401">[CALCITE-6401]
+ * JdbcAdapter cannot push down NOT IN sub-queries</a>. */
+ @Test void testPushDownNotIn() {
+ CalciteAssert.model(JdbcTest.SCOTT_MODEL)
+ .query("select * from dept where deptno not in (select deptno from
emp)")
+ .explainContains("PLAN=JdbcToEnumerableConverter\n"
+ + " JdbcProject(DEPTNO=[$0], DNAME=[$1], LOC=[$2])\n"
+ + " JdbcFilter(condition=[OR(=($3, 0), AND(IS NULL($6), >=($4,
$3)))])\n"
+ + " JdbcJoin(condition=[=($0, $5)], joinType=[left])\n"
+ + " JdbcJoin(condition=[true], joinType=[inner])\n"
+ + " JdbcTableScan(table=[[SCOTT, DEPT]])\n"
+ + " JdbcAggregate(group=[{}], c=[COUNT()],
ck=[COUNT($7)])\n"
+ + " JdbcTableScan(table=[[SCOTT, EMP]])\n"
+ + " JdbcAggregate(group=[{7}], i=[LITERAL_AGG(true)])\n"
Review Comment:
@mihaibudiu Here `LITERAL_AGG(true)` will become `true`.
--
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]