Changeset: 78fddaa66097 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/78fddaa66097
Added Files:
sql/test/BugTracker-2024/Tests/7544-startswith-bug.test
Modified Files:
sql/test/BugTracker-2024/Tests/All
Branch: Aug2024
Log Message:
Add test for GH issue #7544
The issue also exists for functions: endswith and contains. Extended test for
those cases.
diffs (85 lines):
diff --git a/sql/test/BugTracker-2024/Tests/7544-startswith-bug.test
b/sql/test/BugTracker-2024/Tests/7544-startswith-bug.test
new file mode 100644
--- /dev/null
+++ b/sql/test/BugTracker-2024/Tests/7544-startswith-bug.test
@@ -0,0 +1,70 @@
+statement ok
+CREATE TABLE t0 (c0 VARCHAR)
+
+statement ok
+CREATE TABLE t1 (c1 BOOLEAN)
+
+statement ok
+INSERT INTO t0(c0) VALUES ('a')
+
+statement ok
+INSERT INTO t1(c1) VALUES (true), (true)
+
+query TI nosort
+SELECT * FROM t0, t1
+----
+a
+1
+a
+1
+
+query I nosort
+SELECT STARTSWITH(t0.c0, 'a', t1.c1) FROM t0, t1
+----
+1
+1
+
+-- GDK reported error: BATproject2: does not match always
+query TI nosort
+SELECT * FROM t0, t1 WHERE STARTSWITH(t0.c0, 'a', t1.c1)
+----
+a
+1
+a
+1
+
+query I nosort
+SELECT ENDSWITH(t0.c0, 'a', t1.c1) FROM t0, t1
+----
+1
+1
+
+-- GDK reported error: BATproject2: does not match always
+query TI nosort
+SELECT * FROM t0, t1 WHERE ENDSWITH(t0.c0, 'a', t1.c1)
+----
+a
+1
+a
+1
+
+query I nosort
+SELECT CONTAINS(t0.c0, 'a', t1.c1) FROM t0, t1
+----
+1
+1
+
+-- GDK reported error: BATproject2: does not match always
+query TI nosort
+SELECT * FROM t0, t1 WHERE CONTAINS(t0.c0, 'a', t1.c1)
+----
+a
+1
+a
+1
+
+statement ok
+DROP TABLE t0
+
+statement ok
+DROP TABLE t1
diff --git a/sql/test/BugTracker-2024/Tests/All
b/sql/test/BugTracker-2024/Tests/All
--- a/sql/test/BugTracker-2024/Tests/All
+++ b/sql/test/BugTracker-2024/Tests/All
@@ -70,5 +70,6 @@ 7536-mclient-forgets-to-flush
7541-levenshtein
7542-column-name-resolution
7543-is-not-distinct-from-true
+7544-startswith-bug
7545-groupby_on_index_col
7547-drop-login-trigger-crash
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]