Changeset: 3e069d3fd1d5 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/3e069d3fd1d5 Added Files: sql/test/BugTracker-2026/Tests/7952-rel_find_exp_and_corresponding_rel_-assert-failure.test Modified Files: sql/test/BugTracker-2026/Tests/All Branch: Dec2025 Log Message:
Add test for #7952 diffs (68 lines): diff --git a/sql/test/BugTracker-2026/Tests/7952-rel_find_exp_and_corresponding_rel_-assert-failure.test b/sql/test/BugTracker-2026/Tests/7952-rel_find_exp_and_corresponding_rel_-assert-failure.test new file mode 100644 --- /dev/null +++ b/sql/test/BugTracker-2026/Tests/7952-rel_find_exp_and_corresponding_rel_-assert-failure.test @@ -0,0 +1,55 @@ +-- query without the 'ORDER BY count ( ( SELECT ... GROUP BY cube ( x , x , x ) ) ) OVER ( ORDER BY 1 NULLS LAST ) DESC, 4' part, doesn't crash +query IT rowsort +SELECT 0 , NULL + FROM ( SELECT 1 AS x , 2 AS x , 3 AS x + UNION + SELECT 4 AS x , NULL AS x , 6 AS x + UNION + SELECT 7 AS x , 8 AS x , 9 AS x ) AS x + GROUP BY ROLLUP ( x , x ) , ROLLUP ( x , x ) + ORDER BY ROUND ( x , x ) +-- , count ( ( SELECT CASE WHEN EXISTS ( SELECT NULL ) THEN 1 ELSE - 82 * 26 - 12 * - 27 * CASE WHEN NOT NULL IN ( - 69 , ( SUM ( DISTINCT CAST( NULL AS INTEGER ) ) ) + MAX ( - 6 ) + - COUNT ( * ) / greatest ( NULL , NULL ) + MAX ( - 6 ) + - COUNT ( * ) / - - ( 77 ) + 37 , 44 , - - 0 * 23 , - - 86 , 3 , 12 ) THEN 41 WHEN NOT - 21 / - 95 IS NOT NULL THEN 63 END END +-- GROUP BY cube ( x , x , x ) +-- ) +-- ) OVER ( ORDER BY 1 NULLS LAST ) DESC + , 1 + , 3 +-- , 4 -- the order by column number (4) is not in the number of projections range (3) + LIMIT 3 +---- +0 +NULL +0 +NULL +0 +NULL + +-- the orginal reported query but with disabled 'ORDER BY 4' part as it generates an error +-- it fails at an assert in rel_find_exp_and_corresponding_rel_ (rel=0x7f3d00143df0, e=0x7f3d001b6530, subexp=false, res=0x7f3d35833d98) at sql/server/rel_exp.c:1786 assert(e->nid); +query IT rowsort +SELECT 0 , NULL + FROM ( SELECT 1 AS x , 2 AS x , 3 AS x + UNION + SELECT 4 AS x , NULL AS x , 6 AS x + UNION + SELECT 7 AS x , 8 AS x , 9 AS x ) AS x + GROUP BY ROLLUP ( x , x ) , ROLLUP ( x , x ) + ORDER BY ROUND ( x , x ) + , count ( ( SELECT CASE WHEN EXISTS ( SELECT NULL ) THEN 1 ELSE - 82 * 26 - 12 * - 27 * CASE WHEN NOT NULL IN ( - 69 , ( SUM ( DISTINCT CAST( NULL AS INTEGER ) ) ) + MAX ( - 6 ) + - COUNT ( * ) / greatest ( NULL , NULL ) + MAX ( - 6 ) + - COUNT ( * ) / - - ( 77 ) + 37 , 44 , - - 0 * 23 , - - 86 , 3 , 12 ) THEN 41 WHEN NOT - 21 / - 95 IS NOT NULL THEN 63 END END + GROUP BY cube ( x , x , x ) + ) + ) OVER ( ORDER BY 1 NULLS LAST ) DESC + , 1 + , 3 +-- , 4 -- the order by column number (4) is not in the number of projections range (3) + LIMIT 4 +---- +0 +NULL +0 +NULL +0 +NULL +0 +NULL + 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 @@ -137,3 +137,4 @@ KNOWNFAIL?7948-exp_bin-first_value-crash KNOWNFAIL?7949-exp_match-crash KNOWNFAIL?7950-exp_set_type-crash KNOWNFAIL?7951-exp_visitor-crash +KNOWNFAIL?7952-rel_find_exp_and_corresponding_rel_-assert-failure _______________________________________________ checkin-list mailing list -- [email protected] To unsubscribe send an email to [email protected]
