Changeset: 8d22bedcb30b for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/8d22bedcb30b
Added Files:
        sql/test/BugTracker-2026/Tests/8019-rel_bin-exp_bin-assert-failure.test
Modified Files:
        sql/test/BugTracker-2026/Tests/All
Branch: Dec2025
Log Message:

Add test for issue #8019


diffs (68 lines):

diff --git 
a/sql/test/BugTracker-2026/Tests/8019-rel_bin-exp_bin-assert-failure.test 
b/sql/test/BugTracker-2026/Tests/8019-rel_bin-exp_bin-assert-failure.test
new file mode 100644
--- /dev/null
+++ b/sql/test/BugTracker-2026/Tests/8019-rel_bin-exp_bin-assert-failure.test
@@ -0,0 +1,55 @@
+statement ok
+CREATE TABLE t8019 (
+    k INT PRIMARY KEY,
+    v INT
+)
+
+statement ok rowcount 1
+INSERT INTO t8019 VALUES (1, 5)
+
+query II nosort
+SELECT k, SUM(DISTINCT v)
+FROM t8019
+GROUP BY k
+----
+1
+5
+
+-- next query logs server msgs:
+--    exp_bin: CRITICAL: Could not find %2.%2
+--    exp_bin: ERROR: Query: 'select input.k, sum(distinct input.v)
+-- and triggers assert failure: sql/backends/monet5/rel_bin.c:1914: exp_bin: 
Assertion `s' failed.
+-- An identity derived table must not remove the grouped result.
+query II nosort
+SELECT input.k, SUM(DISTINCT input.v)
+FROM (
+    SELECT k, v
+    FROM t8019
+) AS input
+GROUP BY input.k
+----
+1
+5
+
+-- next statement triggers assert failure: sql/backends/monet5/rel_bin.c:1914: 
exp_bin: Assertion `s' failed.
+statement ok
+CREATE TABLE t8019_ctas AS
+SELECT input.k, SUM(DISTINCT input.v) AS s
+FROM (
+    SELECT k, v
+    FROM t8019
+) AS input
+GROUP BY input.k
+
+query II nosort
+SELECT k, s FROM t8019_ctas
+----
+1
+5
+
+statement ok
+DROP TABLE IF EXISTS t8019_ctas
+
+statement ok
+DROP TABLE IF EXISTS t8019
+
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
@@ -196,3 +196,4 @@ KNOWNFAIL?8014-rel_bin-exp_bin-assert-fa
 KNOWNFAIL?8015-join-subquery-NULL-bug
 KNOWNFAIL?8017-create-where-exists-select-acos-bug
 KNOWNFAIL?8018-rel2bin_select-assert-failure
+KNOWNFAIL?8019-rel_bin-exp_bin-assert-failure
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to