Changeset: 9fcab0427279 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/9fcab0427279
Added Files:
sql/test/BugTracker-2026/Tests/8013-triple-same-predicate-bug.test
Modified Files:
sql/test/BugTracker-2026/Tests/All
Branch: Dec2025
Log Message:
Add test for issue #8013
diffs (80 lines):
diff --git a/sql/test/BugTracker-2026/Tests/8013-triple-same-predicate-bug.test
b/sql/test/BugTracker-2026/Tests/8013-triple-same-predicate-bug.test
new file mode 100644
--- /dev/null
+++ b/sql/test/BugTracker-2026/Tests/8013-triple-same-predicate-bug.test
@@ -0,0 +1,67 @@
+statement ok
+CREATE TABLE t8013(t1 timestamp, t2 timestamp)
+
+statement ok rowcount 1
+INSERT INTO t8013 VALUES('2026-01-01 00:00:00', '2026-01-02 00:00:00')
+
+query TT nosort
+SELECT * FROM t8013
+----
+2026-01-01 00:00:00
+2026-01-02 00:00:00
+
+-- next query works ok
+query TT nosort
+SELECT * FROM t8013 WHERE t2 > t1
+----
+2026-01-01 00:00:00
+2026-01-02 00:00:00
+
+-- next query works ok
+query TT nosort
+SELECT * FROM t8013 WHERE t2 > t1 AND t2 > t1
+----
+2026-01-01 00:00:00
+2026-01-02 00:00:00
+
+-- next query (3 same predicates) returns no rows
+query TT nosort
+SELECT * FROM t8013 WHERE t2 > t1 AND t2 > t1 AND t2 > t1
+----
+2026-01-01 00:00:00
+2026-01-02 00:00:00
+
+-- next query (4 same predicates) returns no rows
+query TT nosort
+SELECT * FROM t8013 WHERE t2 > t1 AND t2 > t1 AND t2 > t1 AND t2 > t1
+----
+2026-01-01 00:00:00
+2026-01-02 00:00:00
+
+-- next query (5 same predicates) returns no rows
+query TT nosort
+SELECT * FROM t8013 WHERE (t2 > t1 AND t2 > t1) AND (t2 > t1 AND t2 > t1 AND
t2 > t1)
+----
+2026-01-01 00:00:00
+2026-01-02 00:00:00
+
+
+query T nosort
+EXPLAIN SELECT * FROM t8013 WHERE t2 > t1 AND t2 > t1
+----
+project (
+| table("sys"."t8013") [ "t8013"."t1", "t8013"."t2" ]
+) [ "t8013"."t1", "t8013"."t2" ]
+
+
+query T nosort
+EXPLAIN SELECT * FROM t8013 WHERE t2 > t1 AND t2 > t1 AND t2 > t1
+----
+project (
+| table("sys"."t8013") [ "t8013"."t1", "t8013"."t2" ]
+) [ "t8013"."t1", "t8013"."t2" ]
+
+
+statement ok
+DROP TABLE t8013
+
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
@@ -191,3 +191,4 @@ KNOWNFAIL?8007-lag-lead-window-functions
KNOWNFAIL?8008-numeric-range-frame-bug
KNOWNFAIL?8009-numeric-range-nulls-last-bug
KNOWNFAIL?8010-first_value-last_value-partition-range-bug
+KNOWNFAIL?8013-triple-same-predicate-bug
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]