NobiGo commented on code in PR #4470:
URL: https://github.com/apache/calcite/pull/4470#discussion_r2218049484
##########
core/src/test/resources/sql/sub-query.iq:
##########
@@ -5151,4 +5151,100 @@ EnumerableCalc(expr#0..2=[{inputs}], expr#3=[IS
FALSE($t1)], expr#4=[null:BOOLEA
EnumerableValues(tuples=[[{ null }, { null }]])
!plan
+# [CALCITE-1583] Wrong results for query with correlated subqueries with
aggregate subquery expression
+# Correlated sub-query with aggregate expression can optimized by Metadata
RowCount
+select * from emp where exists (select count(deptno) from dept where
dept.deptno = emp.deptno);
++-------+--------+--------+
Review Comment:
It has been verified in PostgreSQL. This plan can prove that this SQL has
been optimized by the Metadata RowCount method.
--
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]