Changeset: b395b412c869 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/b395b412c869 Added Files: sql/test/BugTracker-2026/Tests/8027-having-expression-issue.test Modified Files: sql/test/BugTracker-2026/Tests/All Branch: Dec2025 Log Message:
Add test for issue #8027 diffs (54 lines): diff --git a/sql/test/BugTracker-2026/Tests/8027-having-expression-issue.test b/sql/test/BugTracker-2026/Tests/8027-having-expression-issue.test new file mode 100644 --- /dev/null +++ b/sql/test/BugTracker-2026/Tests/8027-having-expression-issue.test @@ -0,0 +1,41 @@ +statement ok +CREATE TABLE t8027(c0 INTEGER) + +statement ok rowscount 1 +INSERT INTO t8027 VALUES (8) + +query IT nosort +SELECT c0, (c0 IS NULL) OR NOT (COUNT(c0) <= COUNT(c0)) AS b + FROM t8027 +GROUP BY c0 +---- +8 +False + +-- Q1 base: HAVING keeps the group, but should not +query I nosort +SELECT c0 + FROM t8027 +GROUP BY c0 +HAVING (c0 IS NULL) OR NOT (COUNT(c0) <= COUNT(c0)) +---- + +query I nosort +SELECT c0 + FROM t8027 +GROUP BY c0 +HAVING NOT (COUNT(c0) <= COUNT(c0)) +---- + +-- Q2 moved: WHERE on the alias drops the row +query IT nosort +SELECT r, b FROM ( + SELECT c0 AS r, + (c0 IS NULL) OR NOT (COUNT(c0) <= COUNT(c0)) AS b + FROM t8027 + GROUP BY c0 +) AS s WHERE b +---- + +statement ok +DROP TABLE t8027 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 @@ -201,3 +201,4 @@ KNOWNFAIL?8020-correlated-subquery-bug KNOWNFAIL?8024-MALoptimizer-bug KNOWNFAIL?8025-having-count-bug KNOWNFAIL?8026-having-expression-bug +8027-having-expression-issue _______________________________________________ checkin-list mailing list -- [email protected] To unsubscribe send an email to [email protected]
