Changeset: 79dc1362b568 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/79dc1362b568
Added Files:
        sql/test/2024/Tests/distinct_from.test
Modified Files:
        sql/test/2024/Tests/All
Branch: distinct_from
Log Message:

add tests for distinct from


diffs (112 lines):

diff --git a/sql/test/2024/Tests/All b/sql/test/2024/Tests/All
--- a/sql/test/2024/Tests/All
+++ b/sql/test/2024/Tests/All
@@ -1,1 +1,2 @@
 groupby_primary_key_project_unique_key
+distinct_from
diff --git a/sql/test/2024/Tests/distinct_from.test 
b/sql/test/2024/Tests/distinct_from.test
new file mode 100644
--- /dev/null
+++ b/sql/test/2024/Tests/distinct_from.test
@@ -0,0 +1,101 @@
+statement ok
+create table foo(s) as values (10), (20), (NULL)
+
+
+query I nosort
+SELECT 10 NOT DISTINCT FROM 20
+----
+0
+
+query I nosort
+SELECT 10 DISTINCT FROM 20
+----
+1
+
+
+query I nosort
+SELECT 10 DISTINCT FROM NULL
+----
+1
+
+query I nosort
+SELECT NULL DISTINCT FROM 20
+----
+1
+
+query I nosort
+SELECT 10 NOT DISTINCT FROM NULL
+----
+0
+
+query I nosort
+SELECT NULL NOT DISTINCT FROM 20
+----
+0
+
+query I nosort
+SELECT NULL DISTINCT FROM NULL
+----
+0
+
+query I nosort
+SELECT NULL NOT DISTINCT FROM NULL
+----
+1
+
+query I nosort
+select s NOT DISTINCT FROM 20 FROM foo;
+----
+0
+1
+0
+
+query I nosort
+select s DISTINCT FROM 20 FROM foo;
+----
+1
+0
+1
+
+query I nosort
+select s NOT DISTINCT FROM NULL FROM foo;
+----
+0
+0
+1
+
+query I nosort
+select s DISTINCT FROM NULL FROM foo;
+----
+1
+1
+0
+
+
+query I nosort
+select 20 NOT DISTINCT FROM s FROM foo;
+----
+0
+1
+0
+
+query I nosort
+select 20 DISTINCT FROM s FROM foo;
+----
+1
+0
+1
+
+query I nosort
+select NULL NOT DISTINCT FROM s FROM foo;
+----
+0
+0
+1
+
+query I nosort
+select NULL DISTINCT FROM s FROM foo;
+----
+1
+1
+0
_______________________________________________
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org

Reply via email to