Changeset: 134dabebc6e6 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/134dabebc6e6
Modified Files:
        monetdb5/modules/atoms/Tests/endswith.test
        monetdb5/modules/kernel/Tests/batstr_endswith.test
Branch: txtsim
Log Message:

endsWith select and join tests


diffs (115 lines):

diff --git a/monetdb5/modules/atoms/Tests/endswith.test 
b/monetdb5/modules/atoms/Tests/endswith.test
--- a/monetdb5/modules/atoms/Tests/endswith.test
+++ b/monetdb5/modules/atoms/Tests/endswith.test
@@ -4,47 +4,47 @@ create function endswith(x string, y str
 statement ok
 create function iendswith(x string, y string, i bool) returns bool external 
name str."endsWith"
 
-query T rowsort
+query T
 select endsWith(NULL, '')
 ----
 NULL
 
-query T rowsort
+query T
 select endsWith('', NULL)
 ----
 NULL
 
-query T rowsort
+query T
 select endsWith('', '')
 ----
 True
 
-query T rowsort
+query T
 select endsWith('johndoe', '')
 ----
 True
 
-query T rowsort
+query T
 select endsWith('', 'johndoe')
 ----
 False
 
-query T rowsort
+query T
 select endsWith('johndoe', 'doe')
 ----
 True
 
-query T rowsort
+query T
 select iendswith('one two three', 'three', true)
 ----
 True
 
-query T rowsort
+query T
 select iendswith('Thomas Müller', 'müller', true)
 ----
 True
 
-query T rowsort
+query T
 select iendswith('Thomas Müller', 'müller', false)
 ----
 False
diff --git a/monetdb5/modules/kernel/Tests/batstr_endswith.test 
b/monetdb5/modules/kernel/Tests/batstr_endswith.test
--- a/monetdb5/modules/kernel/Tests/batstr_endswith.test
+++ b/monetdb5/modules/kernel/Tests/batstr_endswith.test
@@ -48,3 +48,51 @@ drop function endswith
 
 statement ok
 drop function iendswith
+
+statement ok
+create table baz(x string)
+
+statement ok
+create table bazbaz(x string)
+
+statement ok
+insert into baz values ('john doe'),('jane doe'),('robert doe')
+
+statement ok
+insert into bazbaz values ('doe'),('doe'),('doe')
+
+statement ok
+create filter function iendsWith(s1 string, s2 string, icase boolean) external 
name str."endsWith";
+
+query T
+select * from baz where [baz.x] iendsWith ['john', true];
+----
+
+query T
+select * from baz where [baz.x] iendsWith ['doe', true];
+----
+john doe
+jane doe
+robert doe
+
+query T rowsort
+select baz.x from baz,bazbaz where [baz.x] iendsWith [bazbaz.x, true];
+----
+jane doe
+jane doe
+jane doe
+john doe
+john doe
+john doe
+robert doe
+robert doe
+robert doe
+
+statement ok
+drop filter function iendsWith(string, string, bool)
+
+statement ok
+drop table baz
+
+statement ok
+drop table bazbaz
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to