Changeset: aeb2b79483f0 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/aeb2b79483f0 Added Files: sql/test/BugTracker-2025/Tests/7746-incorrect-boolean-expr.test Modified Files: sql/test/BugTracker-2025/Tests/All Branch: Dec2025 Log Message:
Add missing test for #7746 diffs (82 lines): diff --git a/sql/test/BugTracker-2025/Tests/7746-incorrect-boolean-expr.test b/sql/test/BugTracker-2025/Tests/7746-incorrect-boolean-expr.test new file mode 100644 --- /dev/null +++ b/sql/test/BugTracker-2025/Tests/7746-incorrect-boolean-expr.test @@ -0,0 +1,66 @@ +-- Setup test table +statement ok +CREATE TABLE t0(c0 INT) + +statement ok +INSERT INTO t0 VALUES(1) + +-- Test 1: Basic query (baseline) +-- Expected: [(1,)] ✓ CORRECT +query I nosort +SELECT * FROM t0 WHERE TRUE +---- +1 + +-- Test 2: Negation of boolean expression +-- Expected: [] ✗ INCORRECT - Returns [(1,)] +query I nosort +SELECT * FROM t0 WHERE (TRUE AND TRUE) AND (NOT (TRUE AND TRUE)) +---- + +-- Test 3: NULL check on boolean expression +-- Expected: [] ✗ INCORRECT - Returns [(1,)] +query I nosort +SELECT * FROM t0 WHERE (TRUE AND TRUE) AND ((TRUE AND TRUE) IS NULL) +---- + +-- Test 4: TLP Oracle validation (combined query) +-- Expected: [(1,)] ✗ INCORRECT - Returns [(1,), (1,), (1,)] +query I nosort +SELECT * FROM t0 WHERE TRUE AND (TRUE AND TRUE) +UNION ALL +SELECT * FROM t0 WHERE (TRUE AND TRUE) AND (NOT (TRUE AND TRUE)) +UNION ALL +SELECT * FROM t0 WHERE (TRUE AND TRUE) AND ((TRUE AND TRUE) IS NULL) +---- +1 + +-- Verify basic boolean logic +-- Expected: FALSE (0 or f) +query I nosort +SELECT NOT (TRUE AND TRUE) as test_not +---- +0 + +-- Expected: FALSE (0 or f) +query I nosort +SELECT (TRUE AND TRUE) IS NULL as test_is_null +---- +0 + +-- Verify truth table +-- Expected: TRUE, FALSE, FALSE +query III nosort +SELECT + TRUE AND TRUE as and_result, + NOT (TRUE AND TRUE) as not_result, + (TRUE AND TRUE) IS NULL as is_null_result +---- +1 +0 +0 + +-- cleanup +statement ok +DROP TABLE t0 + diff --git a/sql/test/BugTracker-2025/Tests/All b/sql/test/BugTracker-2025/Tests/All --- a/sql/test/BugTracker-2025/Tests/All +++ b/sql/test/BugTracker-2025/Tests/All @@ -82,6 +82,7 @@ HAVE_HGE?7637_str_to_decimal 7743-crash 7744_opt_null_in_where 7745-antijoin-bad-mal-gen +7746-incorrect-boolean-expr 7748-update-returning-subquery-crash 7753-like-in-projection 7752-union-sum _______________________________________________ checkin-list mailing list -- [email protected] To unsubscribe send an email to [email protected]
