ClickHouse/dbms/tests/queries/0_stateless/01104_fixed_string_like.sql
Alexey Milovidov 105cb5580c Added a test
2020-03-26 22:42:31 +03:00

47 lines
3.2 KiB
SQL

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%';