This is an automated email from the ASF dual-hosted git repository.

xuzifu666 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/calcite.git


The following commit(s) were added to refs/heads/main by this push:
     new 288d490f12 Test case for [CALCITE-3366] RelDecorrelator supports Union
288d490f12 is described below

commit 288d490f122270121022387e84f0e549d51bda19
Author: Zhen Chen <[email protected]>
AuthorDate: Thu Mar 12 22:30:26 2026 +0800

    Test case for [CALCITE-3366] RelDecorrelator supports Union
---
 core/src/test/resources/sql/sub-query.iq | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/core/src/test/resources/sql/sub-query.iq 
b/core/src/test/resources/sql/sub-query.iq
index 51cab9f01e..ac2fe6d8aa 100644
--- a/core/src/test/resources/sql/sub-query.iq
+++ b/core/src/test/resources/sql/sub-query.iq
@@ -9152,4 +9152,19 @@ from (values (1), (2), (3)) as t(v);
 !set insubquerythreshold 20
 !}
 
+# Test case for [CALCITE-3366] RelDecorrelator supports Union
+SELECT deptno FROM dept where exists
+(SELECT 1 FROM emp where sal < 100 and emp.deptno=dept.deptno
+union all
+SELECT 1 FROM emp where sal > 200 and emp.deptno=dept.deptno);
++--------+
+| DEPTNO |
++--------+
+|     10 |
+|     20 |
+|     30 |
++--------+
+(3 rows)
+
+!ok
 # End sub-query.iq

Reply via email to