Changeset: 093fbfa791ac for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=093fbfa791ac
Added Files:
        sql/test/in-value-list/Tests/various-in-value-list-queries.sql
Modified Files:
        sql/test/in-value-list/Tests/All
Branch: in-value-list
Log Message:

Introduce a simple test suite for in-value-lists.


diffs (70 lines):

diff --git a/sql/test/in-value-list/Tests/All b/sql/test/in-value-list/Tests/All
--- a/sql/test/in-value-list/Tests/All
+++ b/sql/test/in-value-list/Tests/All
@@ -0,0 +1,1 @@
+various-in-value-list-queries
diff --git a/sql/test/in-value-list/Tests/various-in-value-list-queries.sql 
b/sql/test/in-value-list/Tests/various-in-value-list-queries.sql
new file mode 100644
--- /dev/null
+++ b/sql/test/in-value-list/Tests/various-in-value-list-queries.sql
@@ -0,0 +1,60 @@
+create table foo (i int);
+insert into foo values (null), (10), (null), (20), (10), (30), (30), (30), 
(50), (40), (50);
+
+select * from foo where i in (10, 20, 20, 30, 30) order by i;
+
+select * from foo where i not in (10, 20, 20, 30, 30) order by i;
+
+select * from foo where i = 40 or i in (10, 20, 20, 30, 30) order by i;
+
+select * from foo where i = 40 or i not in (10, 20, 20, 30, 30) order by i;
+
+select * from foo where i = 40 and i in (10, 20, 20, 30, 30) order by i;
+
+select * from foo where i = 40 and i not in (10, 20, 20, 30, 30) order by i;
+
+select * from foo where i in (10, 20, 20, 30, 30) and i in (20, 30, 40) order 
by i;
+
+select * from foo where i not in (10, 20, 20, 30, 30) and i not in (20, 30, 
40) order by i;
+
+select * from foo where i in (10, 20, 20, 30, 30) and i not in (20, 30, 40) 
order by i;
+
+select * from foo where i not in (10, 20, 20, 30, 30) and i in (20, 30, 40) 
order by i;
+
+select * from foo where i in (10, 20, 20, 30, 30) or i in (20, 30, 40) order 
by i;
+
+select * from foo where i not in (10, 20, 20, 30, 30) or i not in (20, 30, 40) 
order by i;
+
+select * from foo where i in (10, 20, 20, 30, 30) or i not in (20, 30, 40) 
order by i;
+
+select * from foo where i not in (10, 20, 20, 30, 30) or i in (20, 30, 40) 
order by i;
+
+select * from foo where i = 40 and i not in (10, 20 + 20, 30) order by i;
+
+select * from foo where i = 40 and i in (2*10 + 10, null, i - 1, i, i + 1, 
null) order by i;
+
+select * from foo where i = 40 and i not in (2*10 + 10, null, i - 1, i, i + 1, 
null) order by i;
+
+select * from foo where i = 40 and (i + 10) in (2*10 + 10, null, i - 1, i, i + 
10, null) order by i;
+
+select * from foo where i = 40 and (i + 10) not in (2*10 + 10, null, i - 1, i, 
i + 10, null) order by i;
+
+select * from foo where i = 40 or i not in (10, 20 + 20, 30) order by i;
+
+select * from foo where i = 40 or i in (2*10 + 10, null, i - 1, i, i + 1, 
null) order by i;
+
+select * from foo where i = 40 or i not in (2*10 + 10, null, i - 1, i, i + 1, 
null) order by i;
+
+select * from foo where i = 40 or (i + 10) in (2*10 + 10, null, i - 1, i, i + 
10, null) order by i;
+
+select * from foo where i = 40 or (i + 10) not in (2*10 + 10, null, i - 1, i, 
i + 10, null) order by i;
+
+select * from foo where i in (10, null, 20, null) order by i;
+
+select * from foo where i not in (10, null, 20, null) order by i;
+
+select * from foo where i = 40 and i not in (null) order by i;
+
+select * from foo where i = 40 and i in (null) order by i;
+
+select * from foo where i = 40 and i in (select bar.i from foo as bar where i 
in (10, 20)) order by i;
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to