Changeset: c4da1c9bdfa8 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/c4da1c9bdfa8 Branch: Dec2023 Log Message:
Merge with sw_ew_c_sorting branch diffs (truncated from 4497 to 300 lines): diff --git a/clients/Tests/MAL-signatures-hge.test b/clients/Tests/MAL-signatures-hge.test --- a/clients/Tests/MAL-signatures-hge.test +++ b/clients/Tests/MAL-signatures-hge.test @@ -50595,25 +50595,25 @@ STRcontains; Check if string chaystack contains string needle, icase flag. str containsjoin -pattern str.containsjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:bit], X_3:bat[:oid], X_4:bat[:oid], X_5:bit, X_6:lng, X_7:bit):bat[:oid] -STRcontainsjoin1; -The same as STRcontainsjoin, but only produce one output + icase. -str -containsjoin -pattern str.containsjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:oid], X_3:bat[:oid], X_4:bit, X_5:lng, X_6:bit):bat[:oid] -STRcontainsjoin1; -The same as STRcontainsjoin, but only produce one output. -str -containsjoin pattern str.containsjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:bit], X_3:bat[:oid], X_4:bat[:oid], X_5:bit, X_6:lng, X_7:bit) (X_8:bat[:oid], X_9:bat[:oid]) STRcontainsjoin; Join the string bat L with the bat R if L contains the string of R@with optional candidate lists SL and SR@The result is two aligned bats with oids of matching rows + icase. str containsjoin +pattern str.containsjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:bit], X_3:bat[:oid], X_4:bat[:oid], X_5:bit, X_6:lng, X_7:bit):bat[:oid] +STRcontainsjoin; +The same as STRcontainsjoin, but only produce one output + icase. +str +containsjoin pattern str.containsjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:oid], X_3:bat[:oid], X_4:bit, X_5:lng, X_6:bit) (X_7:bat[:oid], X_8:bat[:oid]) STRcontainsjoin; Join the string bat L with the bat R if L contains the string of R@with optional candidate lists SL and SR@The result is two aligned bats with oids of matching rows. str +containsjoin +pattern str.containsjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:oid], X_3:bat[:oid], X_4:bit, X_5:lng, X_6:bit):bat[:oid] +STRcontainsjoin; +The same as STRcontainsjoin, but only produce one output. +str containsselect pattern str.containsselect(X_0:bat[:str], X_1:bat[:oid], X_2:str, X_3:bit):bat[:oid] STRcontainsselect; @@ -50635,25 +50635,25 @@ STRendswith; Check if string ends with substring, icase flag. str endswithjoin -pattern str.endswithjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:bit], X_3:bat[:oid], X_4:bat[:oid], X_5:bit, X_6:lng, X_7:bit):bat[:oid] -STRendswithjoin1; -The same as STRendswithjoin, but only produce one output + icase. -str -endswithjoin -pattern str.endswithjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:oid], X_3:bat[:oid], X_4:bit, X_5:lng, X_6:bit):bat[:oid] -STRendswithjoin1; -The same as STRendswithjoin, but only produce one output. -str -endswithjoin pattern str.endswithjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:bit], X_3:bat[:oid], X_4:bat[:oid], X_5:bit, X_6:lng, X_7:bit) (X_8:bat[:oid], X_9:bat[:oid]) STRendswithjoin; Join the string bat L with the suffix bat R@with optional candidate lists SL and SR@The result is two aligned bats with oids of matching rows + icase. str endswithjoin +pattern str.endswithjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:bit], X_3:bat[:oid], X_4:bat[:oid], X_5:bit, X_6:lng, X_7:bit):bat[:oid] +STRendswithjoin; +The same as STRendswithjoin, but only produce one output + icase. +str +endswithjoin pattern str.endswithjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:oid], X_3:bat[:oid], X_4:bit, X_5:lng, X_6:bit) (X_7:bat[:oid], X_8:bat[:oid]) STRendswithjoin; Join the string bat L with the suffix bat R@with optional candidate lists SL and SR@The result is two aligned bats with oids of matching rows. str +endswithjoin +pattern str.endswithjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:oid], X_3:bat[:oid], X_4:bit, X_5:lng, X_6:bit):bat[:oid] +STRendswithjoin; +The same as STRendswithjoin, but only produce one output. +str endswithselect pattern str.endswithselect(X_0:bat[:str], X_1:bat[:oid], X_2:str, X_3:bit):bat[:oid] STRendswithselect; @@ -50805,25 +50805,25 @@ STRstartswith; Check if string starts with substring, icase flag. str startswithjoin -pattern str.startswithjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:bit], X_3:bat[:oid], X_4:bat[:oid], X_5:bit, X_6:lng, X_7:bit):bat[:oid] -STRstartswithjoin1; -The same as STRstartswithjoin, but only produce one output + icase. -str -startswithjoin -pattern str.startswithjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:oid], X_3:bat[:oid], X_4:bit, X_5:lng, X_6:bit):bat[:oid] -STRstartswithjoin1; -The same as STRstartswithjoin, but only produce one output. -str -startswithjoin pattern str.startswithjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:bit], X_3:bat[:oid], X_4:bat[:oid], X_5:bit, X_6:lng, X_7:bit) (X_8:bat[:oid], X_9:bat[:oid]) STRstartswithjoin; Join the string bat L with the prefix bat R@with optional candidate lists SL and SR@The result is two aligned bats with oids of matching rows + icase. str startswithjoin +pattern str.startswithjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:bit], X_3:bat[:oid], X_4:bat[:oid], X_5:bit, X_6:lng, X_7:bit):bat[:oid] +STRstartswithjoin; +The same as STRstartswithjoin, but only produce one output + icase. +str +startswithjoin pattern str.startswithjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:oid], X_3:bat[:oid], X_4:bit, X_5:lng, X_6:bit) (X_7:bat[:oid], X_8:bat[:oid]) STRstartswithjoin; Join the string bat L with the prefix bat R@with optional candidate lists SL and SR@The result is two aligned bats with oids of matching rows. str +startswithjoin +pattern str.startswithjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:oid], X_3:bat[:oid], X_4:bit, X_5:lng, X_6:bit):bat[:oid] +STRstartswithjoin; +The same as STRstartswithjoin, but only produce one output. +str startswithselect pattern str.startswithselect(X_0:bat[:str], X_1:bat[:oid], X_2:str, X_3:bit):bat[:oid] STRstartswithselect; diff --git a/clients/Tests/MAL-signatures.test b/clients/Tests/MAL-signatures.test --- a/clients/Tests/MAL-signatures.test +++ b/clients/Tests/MAL-signatures.test @@ -38920,25 +38920,25 @@ STRcontains; Check if string chaystack contains string needle, icase flag. str containsjoin -pattern str.containsjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:bit], X_3:bat[:oid], X_4:bat[:oid], X_5:bit, X_6:lng, X_7:bit):bat[:oid] -STRcontainsjoin1; -The same as STRcontainsjoin, but only produce one output + icase. -str -containsjoin -pattern str.containsjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:oid], X_3:bat[:oid], X_4:bit, X_5:lng, X_6:bit):bat[:oid] -STRcontainsjoin1; -The same as STRcontainsjoin, but only produce one output. -str -containsjoin pattern str.containsjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:bit], X_3:bat[:oid], X_4:bat[:oid], X_5:bit, X_6:lng, X_7:bit) (X_8:bat[:oid], X_9:bat[:oid]) STRcontainsjoin; Join the string bat L with the bat R if L contains the string of R@with optional candidate lists SL and SR@The result is two aligned bats with oids of matching rows + icase. str containsjoin +pattern str.containsjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:bit], X_3:bat[:oid], X_4:bat[:oid], X_5:bit, X_6:lng, X_7:bit):bat[:oid] +STRcontainsjoin; +The same as STRcontainsjoin, but only produce one output + icase. +str +containsjoin pattern str.containsjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:oid], X_3:bat[:oid], X_4:bit, X_5:lng, X_6:bit) (X_7:bat[:oid], X_8:bat[:oid]) STRcontainsjoin; Join the string bat L with the bat R if L contains the string of R@with optional candidate lists SL and SR@The result is two aligned bats with oids of matching rows. str +containsjoin +pattern str.containsjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:oid], X_3:bat[:oid], X_4:bit, X_5:lng, X_6:bit):bat[:oid] +STRcontainsjoin; +The same as STRcontainsjoin, but only produce one output. +str containsselect pattern str.containsselect(X_0:bat[:str], X_1:bat[:oid], X_2:str, X_3:bit):bat[:oid] STRcontainsselect; @@ -38960,25 +38960,25 @@ STRendswith; Check if string ends with substring, icase flag. str endswithjoin -pattern str.endswithjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:bit], X_3:bat[:oid], X_4:bat[:oid], X_5:bit, X_6:lng, X_7:bit):bat[:oid] -STRendswithjoin1; -The same as STRendswithjoin, but only produce one output + icase. -str -endswithjoin -pattern str.endswithjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:oid], X_3:bat[:oid], X_4:bit, X_5:lng, X_6:bit):bat[:oid] -STRendswithjoin1; -The same as STRendswithjoin, but only produce one output. -str -endswithjoin pattern str.endswithjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:bit], X_3:bat[:oid], X_4:bat[:oid], X_5:bit, X_6:lng, X_7:bit) (X_8:bat[:oid], X_9:bat[:oid]) STRendswithjoin; Join the string bat L with the suffix bat R@with optional candidate lists SL and SR@The result is two aligned bats with oids of matching rows + icase. str endswithjoin +pattern str.endswithjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:bit], X_3:bat[:oid], X_4:bat[:oid], X_5:bit, X_6:lng, X_7:bit):bat[:oid] +STRendswithjoin; +The same as STRendswithjoin, but only produce one output + icase. +str +endswithjoin pattern str.endswithjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:oid], X_3:bat[:oid], X_4:bit, X_5:lng, X_6:bit) (X_7:bat[:oid], X_8:bat[:oid]) STRendswithjoin; Join the string bat L with the suffix bat R@with optional candidate lists SL and SR@The result is two aligned bats with oids of matching rows. str +endswithjoin +pattern str.endswithjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:oid], X_3:bat[:oid], X_4:bit, X_5:lng, X_6:bit):bat[:oid] +STRendswithjoin; +The same as STRendswithjoin, but only produce one output. +str endswithselect pattern str.endswithselect(X_0:bat[:str], X_1:bat[:oid], X_2:str, X_3:bit):bat[:oid] STRendswithselect; @@ -39130,25 +39130,25 @@ STRstartswith; Check if string starts with substring, icase flag. str startswithjoin -pattern str.startswithjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:bit], X_3:bat[:oid], X_4:bat[:oid], X_5:bit, X_6:lng, X_7:bit):bat[:oid] -STRstartswithjoin1; -The same as STRstartswithjoin, but only produce one output + icase. -str -startswithjoin -pattern str.startswithjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:oid], X_3:bat[:oid], X_4:bit, X_5:lng, X_6:bit):bat[:oid] -STRstartswithjoin1; -The same as STRstartswithjoin, but only produce one output. -str -startswithjoin pattern str.startswithjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:bit], X_3:bat[:oid], X_4:bat[:oid], X_5:bit, X_6:lng, X_7:bit) (X_8:bat[:oid], X_9:bat[:oid]) STRstartswithjoin; Join the string bat L with the prefix bat R@with optional candidate lists SL and SR@The result is two aligned bats with oids of matching rows + icase. str startswithjoin +pattern str.startswithjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:bit], X_3:bat[:oid], X_4:bat[:oid], X_5:bit, X_6:lng, X_7:bit):bat[:oid] +STRstartswithjoin; +The same as STRstartswithjoin, but only produce one output + icase. +str +startswithjoin pattern str.startswithjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:oid], X_3:bat[:oid], X_4:bit, X_5:lng, X_6:bit) (X_7:bat[:oid], X_8:bat[:oid]) STRstartswithjoin; Join the string bat L with the prefix bat R@with optional candidate lists SL and SR@The result is two aligned bats with oids of matching rows. str +startswithjoin +pattern str.startswithjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:oid], X_3:bat[:oid], X_4:bit, X_5:lng, X_6:bit):bat[:oid] +STRstartswithjoin; +The same as STRstartswithjoin, but only produce one output. +str startswithselect pattern str.startswithselect(X_0:bat[:str], X_1:bat[:oid], X_2:str, X_3:bit):bat[:oid] STRstartswithselect; diff --git a/monetdb5/modules/atoms/Tests/All b/monetdb5/modules/atoms/Tests/All --- a/monetdb5/modules/atoms/Tests/All +++ b/monetdb5/modules/atoms/Tests/All @@ -38,5 +38,8 @@ startswith endswith contains HAVE_ICONV?asciify +startswith_join +endswith_join +contains_join ts_and_tstz_to_str_bug diff --git a/monetdb5/modules/atoms/Tests/contains.test b/monetdb5/modules/atoms/Tests/contains.test --- a/monetdb5/modules/atoms/Tests/contains.test +++ b/monetdb5/modules/atoms/Tests/contains.test @@ -29,71 +29,26 @@ select contains('johndoe', 'john') 1 query I nosort -select contains('one two three', 'three', true) +SELECT contains('one two three', 'three', true) ---- 1 query I nosort -select contains('one two three', 'THREE', true) ----- -1 - -query I nosort -select contains('one two three', 'THREE', false) ----- -0 - -query I nosort -select contains('Müller Thomas', 'müller', true) +SELECT contains('one two three', 'THREE', true) ---- 1 query I nosort -select contains('Müller Thomas', 'müller', false) +SELECT contains('one two three', 'THREE', false) ---- 0 -statement ok -create table foo(x string) - -statement ok -create table bar(x string) - -statement ok -insert into foo values ('johnleft'),('janeright'),('robertright'),('timup'),('lexleft'),('joeleft') - -statement ok -insert into bar values ('left'),('right'),('up'),('down') - query I nosort -select contains(x, 'left') from foo +SELECT contains('Müller Thomas', 'müller', true) ---- 1 -0 -0 -0 -1 -1 -query TT rowsort -select * from foo,bar where [foo.x] contains [bar.x, false] +query I nosort +SELECT contains('Müller Thomas', 'müller', false) ---- -janeright -right -joeleft -left _______________________________________________ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org