mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 08:32:02 +00:00
Added a test
This commit is contained in:
parent
d5b17893fc
commit
105cb5580c
@ -0,0 +1,78 @@
|
||||
1
|
||||
0
|
||||
0
|
||||
1
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
1
|
||||
0
|
||||
0
|
||||
1
|
||||
0
|
||||
0
|
||||
1
|
||||
0
|
||||
0
|
||||
1
|
||||
1
|
||||
0
|
||||
0
|
||||
1
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
1
|
||||
1
|
||||
0
|
||||
0
|
||||
1
|
||||
0
|
||||
0
|
||||
1
|
||||
0
|
||||
0
|
||||
0
|
||||
1
|
||||
0
|
||||
0
|
||||
1
|
||||
0
|
||||
0
|
||||
1
|
||||
0
|
||||
0
|
||||
1
|
||||
1
|
||||
0
|
||||
0
|
||||
1
|
||||
0
|
||||
0
|
||||
1
|
||||
0
|
||||
0
|
||||
1
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
0
|
||||
0
|
||||
1
|
46
dbms/tests/queries/0_stateless/01104_fixed_string_like.sql
Normal file
46
dbms/tests/queries/0_stateless/01104_fixed_string_like.sql
Normal file
@ -0,0 +1,46 @@
|
||||
SELECT arrayJoin(CAST(['hello', 'world'] AS Array(FixedString(5)))) LIKE 'hello';
|
||||
SELECT arrayJoin(CAST(['hello', 'world'] AS Array(FixedString(5)))) LIKE 'world';
|
||||
SELECT arrayJoin(CAST(['hello', 'world'] AS Array(FixedString(5)))) LIKE 'xyz';
|
||||
SELECT arrayJoin(CAST(['hello', 'world'] AS Array(FixedString(5)))) LIKE 'hell';
|
||||
SELECT arrayJoin(CAST(['hello', 'world'] AS Array(FixedString(5)))) LIKE 'orld';
|
||||
|
||||
SELECT arrayJoin(CAST(['hello', 'world'] AS Array(FixedString(5)))) LIKE '%hello%';
|
||||
SELECT arrayJoin(CAST(['hello', 'world'] AS Array(FixedString(5)))) LIKE '%world%';
|
||||
SELECT arrayJoin(CAST(['hello', 'world'] AS Array(FixedString(5)))) LIKE '%xyz%';
|
||||
SELECT arrayJoin(CAST(['hello', 'world'] AS Array(FixedString(5)))) LIKE '%hell%';
|
||||
SELECT arrayJoin(CAST(['hello', 'world'] AS Array(FixedString(5)))) LIKE '%orld%';
|
||||
|
||||
SELECT arrayJoin(CAST(['hello', 'world'] AS Array(FixedString(5)))) LIKE '%hello';
|
||||
SELECT arrayJoin(CAST(['hello', 'world'] AS Array(FixedString(5)))) LIKE '%world';
|
||||
SELECT arrayJoin(CAST(['hello', 'world'] AS Array(FixedString(5)))) LIKE '%xyz';
|
||||
SELECT arrayJoin(CAST(['hello', 'world'] AS Array(FixedString(5)))) LIKE '%hell';
|
||||
SELECT arrayJoin(CAST(['hello', 'world'] AS Array(FixedString(5)))) LIKE '%orld';
|
||||
|
||||
SELECT arrayJoin(CAST(['hello', 'world'] AS Array(FixedString(5)))) LIKE 'hello%';
|
||||
SELECT arrayJoin(CAST(['hello', 'world'] AS Array(FixedString(5)))) LIKE 'world%';
|
||||
SELECT arrayJoin(CAST(['hello', 'world'] AS Array(FixedString(5)))) LIKE 'xyz%';
|
||||
SELECT arrayJoin(CAST(['hello', 'world'] AS Array(FixedString(5)))) LIKE 'hell%';
|
||||
SELECT arrayJoin(CAST(['hello', 'world'] AS Array(FixedString(5)))) LIKE 'orld%';
|
||||
|
||||
SELECT arrayJoin(CAST(['hello', 'world'] AS Array(FixedString(5)))) LIKE '%he%o%';
|
||||
SELECT arrayJoin(CAST(['hello', 'world'] AS Array(FixedString(5)))) LIKE '%w%ld%';
|
||||
SELECT arrayJoin(CAST(['hello', 'world'] AS Array(FixedString(5)))) LIKE '%x%z%';
|
||||
SELECT arrayJoin(CAST(['hello', 'world'] AS Array(FixedString(5)))) LIKE '%hell_';
|
||||
SELECT arrayJoin(CAST(['hello', 'world'] AS Array(FixedString(5)))) LIKE '_orld%';
|
||||
|
||||
SELECT arrayJoin(CAST(['hello', 'world'] AS Array(FixedString(5)))) LIKE '%he__o%';
|
||||
SELECT arrayJoin(CAST(['hello', 'world'] AS Array(FixedString(5)))) LIKE '%w__ld%';
|
||||
SELECT arrayJoin(CAST(['hello', 'world'] AS Array(FixedString(5)))) LIKE '%x%z%';
|
||||
SELECT arrayJoin(CAST(['hello', 'world'] AS Array(FixedString(5)))) LIKE 'hell_';
|
||||
SELECT arrayJoin(CAST(['hello', 'world'] AS Array(FixedString(5)))) LIKE '_orld';
|
||||
|
||||
SELECT arrayJoin(CAST(['hello', 'world'] AS Array(FixedString(5)))) LIKE 'helloworld';
|
||||
SELECT arrayJoin(CAST(['hello', 'world'] AS Array(FixedString(5)))) LIKE '%helloworld%';
|
||||
SELECT arrayJoin(CAST(['hello', 'world'] AS Array(FixedString(5)))) LIKE '%elloworl%';
|
||||
SELECT arrayJoin(CAST(['hello', 'world'] AS Array(FixedString(5)))) LIKE '%ow%';
|
||||
SELECT arrayJoin(CAST(['hello', 'world'] AS Array(FixedString(5)))) LIKE '%o%w%';
|
||||
|
||||
SELECT arrayJoin(CAST(['hello', 'world'] AS Array(FixedString(5)))) LIKE '%o%';
|
||||
SELECT arrayJoin(CAST(['hello', 'world'] AS Array(FixedString(5)))) LIKE '%l%';
|
||||
SELECT arrayJoin(CAST(['hello', 'world'] AS Array(FixedString(5)))) LIKE '%l%o%';
|
||||
SELECT arrayJoin(CAST(['hello', 'world'] AS Array(FixedString(5)))) LIKE '%o%l%';
|
78
dbms/tests/queries/0_stateless/01105_string_like.reference
Normal file
78
dbms/tests/queries/0_stateless/01105_string_like.reference
Normal file
@ -0,0 +1,78 @@
|
||||
1
|
||||
0
|
||||
0
|
||||
1
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
1
|
||||
0
|
||||
0
|
||||
1
|
||||
0
|
||||
0
|
||||
1
|
||||
0
|
||||
0
|
||||
1
|
||||
1
|
||||
0
|
||||
0
|
||||
1
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
1
|
||||
1
|
||||
0
|
||||
0
|
||||
1
|
||||
0
|
||||
0
|
||||
1
|
||||
0
|
||||
0
|
||||
0
|
||||
1
|
||||
0
|
||||
0
|
||||
1
|
||||
0
|
||||
0
|
||||
1
|
||||
0
|
||||
0
|
||||
1
|
||||
1
|
||||
0
|
||||
0
|
||||
1
|
||||
0
|
||||
0
|
||||
1
|
||||
0
|
||||
0
|
||||
1
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
0
|
||||
0
|
||||
1
|
46
dbms/tests/queries/0_stateless/01105_string_like.sql
Normal file
46
dbms/tests/queries/0_stateless/01105_string_like.sql
Normal file
@ -0,0 +1,46 @@
|
||||
SELECT arrayJoin(['hello', 'world']) LIKE 'hello';
|
||||
SELECT arrayJoin(['hello', 'world']) LIKE 'world';
|
||||
SELECT arrayJoin(['hello', 'world']) LIKE 'xyz';
|
||||
SELECT arrayJoin(['hello', 'world']) LIKE 'hell';
|
||||
SELECT arrayJoin(['hello', 'world']) LIKE 'orld';
|
||||
|
||||
SELECT arrayJoin(['hello', 'world']) LIKE '%hello%';
|
||||
SELECT arrayJoin(['hello', 'world']) LIKE '%world%';
|
||||
SELECT arrayJoin(['hello', 'world']) LIKE '%xyz%';
|
||||
SELECT arrayJoin(['hello', 'world']) LIKE '%hell%';
|
||||
SELECT arrayJoin(['hello', 'world']) LIKE '%orld%';
|
||||
|
||||
SELECT arrayJoin(['hello', 'world']) LIKE '%hello';
|
||||
SELECT arrayJoin(['hello', 'world']) LIKE '%world';
|
||||
SELECT arrayJoin(['hello', 'world']) LIKE '%xyz';
|
||||
SELECT arrayJoin(['hello', 'world']) LIKE '%hell';
|
||||
SELECT arrayJoin(['hello', 'world']) LIKE '%orld';
|
||||
|
||||
SELECT arrayJoin(['hello', 'world']) LIKE 'hello%';
|
||||
SELECT arrayJoin(['hello', 'world']) LIKE 'world%';
|
||||
SELECT arrayJoin(['hello', 'world']) LIKE 'xyz%';
|
||||
SELECT arrayJoin(['hello', 'world']) LIKE 'hell%';
|
||||
SELECT arrayJoin(['hello', 'world']) LIKE 'orld%';
|
||||
|
||||
SELECT arrayJoin(['hello', 'world']) LIKE '%he%o%';
|
||||
SELECT arrayJoin(['hello', 'world']) LIKE '%w%ld%';
|
||||
SELECT arrayJoin(['hello', 'world']) LIKE '%x%z%';
|
||||
SELECT arrayJoin(['hello', 'world']) LIKE '%hell_';
|
||||
SELECT arrayJoin(['hello', 'world']) LIKE '_orld%';
|
||||
|
||||
SELECT arrayJoin(['hello', 'world']) LIKE '%he__o%';
|
||||
SELECT arrayJoin(['hello', 'world']) LIKE '%w__ld%';
|
||||
SELECT arrayJoin(['hello', 'world']) LIKE '%x%z%';
|
||||
SELECT arrayJoin(['hello', 'world']) LIKE 'hell_';
|
||||
SELECT arrayJoin(['hello', 'world']) LIKE '_orld';
|
||||
|
||||
SELECT arrayJoin(['hello', 'world']) LIKE 'helloworld';
|
||||
SELECT arrayJoin(['hello', 'world']) LIKE '%helloworld%';
|
||||
SELECT arrayJoin(['hello', 'world']) LIKE '%elloworl%';
|
||||
SELECT arrayJoin(['hello', 'world']) LIKE '%ow%';
|
||||
SELECT arrayJoin(['hello', 'world']) LIKE '%o%w%';
|
||||
|
||||
SELECT arrayJoin(['hello', 'world']) LIKE '%o%';
|
||||
SELECT arrayJoin(['hello', 'world']) LIKE '%l%';
|
||||
SELECT arrayJoin(['hello', 'world']) LIKE '%l%o%';
|
||||
SELECT arrayJoin(['hello', 'world']) LIKE '%o%l%';
|
Loading…
Reference in New Issue
Block a user