NobiGo commented on code in PR #4714:
URL: https://github.com/apache/calcite/pull/4714#discussion_r2659498420


##########
core/src/test/resources/sql/scalar.iq:
##########
@@ -310,4 +310,97 @@ select
 
 !ok
 
+# [CALCITE-7348] Remove redundant extraction correlation variables when Trim 
Project Fields
+
+!set trimfields true
+
+SELECT empno, (SELECT COUNT(*) AS c
+FROM "scott".emp
+WHERE mgr < "t".mgr) AS "$f1"
+FROM "scott".emp as "t"
+WHERE sal > 10;
++-------+-----+
+| EMPNO | $f1 |
++-------+-----+
+|  7369 |  12 |
+|  7499 |   2 |
+|  7521 |   2 |
+|  7566 |   9 |
+|  7654 |   2 |
+|  7698 |   9 |
+|  7782 |   9 |
+|  7788 |   0 |
+|  7839 |   0 |
+|  7844 |   2 |
+|  7876 |   8 |
+|  7900 |   2 |
+|  7902 |   0 |
+|  7934 |   7 |
++-------+-----+
+(14 rows)
+
+!ok
+EnumerableCalc(expr#0..3=[{inputs}], expr#4=[IS NULL($t3)], expr#5=[0:BIGINT], 
expr#6=[CASE($t4, $t5, $t3)], EMPNO=[$t0], $f1=[$t6])

Review Comment:
   The main purpose of this plan here is to ensure that my verification process 
is correct.



-- 
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]

Reply via email to