Changeset: 1912b733b695 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/1912b733b695
Added Files:
        sql/test/BugTracker-2026/Tests/8026-having-expression-bug.test
Modified Files:
        sql/test/BugTracker-2026/Tests/All
Branch: Dec2025
Log Message:

Add test for issue #8026


diffs (57 lines):

diff --git a/sql/test/BugTracker-2026/Tests/8026-having-expression-bug.test 
b/sql/test/BugTracker-2026/Tests/8026-having-expression-bug.test
new file mode 100644
--- /dev/null
+++ b/sql/test/BugTracker-2026/Tests/8026-having-expression-bug.test
@@ -0,0 +1,44 @@
+statement ok
+CREATE TABLE t8026(c0 INTEGER)
+
+statement ok rowcount 1
+INSERT INTO t8026 VALUES (100)
+
+query I nosort
+SELECT c0
+ FROM t8026
+GROUP BY c0
+----
+100
+
+query I nosort
+SELECT c0
+ FROM t8026
+GROUP BY c0
+HAVING NOT (c0 = 1 AND c0 IS NOT NULL)
+----
+100
+
+query I nosort
+SELECT c0
+ FROM t8026
+GROUP BY c0
+HAVING (c0 = 0) OR NOT (c0 = 1 AND c0 IS NOT NULL)
+----
+100
+
+-- projection path (correct)
+query I nosort
+SELECT ref0 FROM (
+  SELECT c0 AS ref0,
+         (c0 = 0) OR NOT (c0 = 1 AND c0 IS NOT NULL) AS ref1
+  FROM t8026
+  GROUP BY c0
+) AS s WHERE ref1
+----
+100
+
+
+statement ok
+DROP TABLE t8026
+
diff --git a/sql/test/BugTracker-2026/Tests/All 
b/sql/test/BugTracker-2026/Tests/All
--- a/sql/test/BugTracker-2026/Tests/All
+++ b/sql/test/BugTracker-2026/Tests/All
@@ -200,3 +200,4 @@ KNOWNFAIL?8019-rel_bin-exp_bin-assert-fa
 KNOWNFAIL?8020-correlated-subquery-bug
 KNOWNFAIL?8024-MALoptimizer-bug
 KNOWNFAIL?8025-having-count-bug
+KNOWNFAIL?8026-having-expression-bug
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to