Changeset: 766a8e6d36c9 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/766a8e6d36c9
Added Files:
        sql/test/BugTracker-2026/Tests/7910-where-case-when-and-bug.test
Modified Files:
        sql/test/BugTracker-2026/Tests/All
Branch: Dec2025
Log Message:

Add test for #7910


diffs (60 lines):

diff --git a/sql/test/BugTracker-2026/Tests/7910-where-case-when-and-bug.test 
b/sql/test/BugTracker-2026/Tests/7910-where-case-when-and-bug.test
new file mode 100644
--- /dev/null
+++ b/sql/test/BugTracker-2026/Tests/7910-where-case-when-and-bug.test
@@ -0,0 +1,44 @@
+statement ok
+CREATE TABLE users7910 (
+    id           INT,
+    username     VARCHAR(100),
+    email        VARCHAR(255),
+    age          INT,
+    status       VARCHAR(20),
+    created_at   TIMESTAMP,
+    score        DOUBLE
+)
+
+statement ok rowcount 5
+INSERT INTO users7910 VALUES
+(1, 'alice', '[email protected]', 20, 'active',  '2022-01-01 10:00:00', 88.5),
+(2, 'bob',   '[email protected]',   30, 'active',  '2022-01-02 11:00:00', 92.3),
+(3, 'carol', NULL,             NULL, 'banned','2022-01-03 12:00:00', NULL),
+(4, 'dave',  '[email protected]',  45, 'active',  '2022-01-04 13:00:00', 65.2),
+(5, NULL,    '[email protected]',  18, 'inactive','2022-01-05 14:00:00', 70.0)
+
+query T rowsort
+select
+  ref_0.email as c0
+from
+  users7910 as ref_0
+where coalesce(ref_0.age, 66) <
+  case when (68 <= 66) and (ref_0.age != 19) then 99 else ref_0.age end
+----
+
+query T rowsort
+select
+  ref_0.email as c0
+from
+  users7910 as ref_0
+where not coalesce(ref_0.age, 66) <
+  case when (68 <= 66) and (ref_0.age != 19) then 99 else ref_0.age end
+----
[email protected]
[email protected]
[email protected]
[email protected]
+
+statement ok
+DROP TABLE users7910
+
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
@@ -94,6 +94,7 @@ KNOWNFAIL?7774-insert-into-renamed-table
 7903-query-without-result-bug
 7905-sum-case-subquery-bug
 7906-rel2bin_join-assertion-failure
+7910-where-case-when-and-bug
 7911-query-without-result-bug
 7912-where-or-1-is-1-bug
 7913-where-exist-subquery-bug
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to