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

zhenchen 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 3b5fcf50d9 Test case for [CALCITE-6452] Scalar sub-query that uses IS 
NOT DISTINCT FROM returns incorrect result
3b5fcf50d9 is described below

commit 3b5fcf50d94ac25c6378d18fad1bd7abbd0a8f31
Author: Zhen Chen <[email protected]>
AuthorDate: Fri Feb 6 09:00:01 2026 +0800

    Test case for [CALCITE-6452] Scalar sub-query that uses IS NOT DISTINCT 
FROM returns incorrect result
---
 core/src/test/resources/sql/sub-query.iq | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/core/src/test/resources/sql/sub-query.iq 
b/core/src/test/resources/sql/sub-query.iq
index 20c7f19472..fbe51075cf 100644
--- a/core/src/test/resources/sql/sub-query.iq
+++ b/core/src/test/resources/sql/sub-query.iq
@@ -8711,4 +8711,22 @@ EnumerableCalc(expr#0..6=[{inputs}], expr#7=[IS 
NULL($t6)], expr#8=[0:BIGINT], e
               EnumerableTableScan(table=[[scott, EMP]])
 !plan
 
+# Test case for [CALCITE-6452] Scalar sub-query that uses IS NOT DISTINCT FROM 
returns incorrect result
+select e.ename,
+  (select count(*)
+    from emp as f
+    where f.comm is not distinct from e.comm) as c
+from emp as e
+where e.deptno = 10;
++--------+----+
+| ENAME  | C  |
++--------+----+
+| CLARK  | 10 |
+| KING   | 10 |
+| MILLER | 10 |
++--------+----+
+(3 rows)
+
+!ok
+
 # End sub-query.iq

Reply via email to