diff --git a/dbms/tests/queries/0_stateless/01104_fixed_string_like.reference b/dbms/tests/queries/0_stateless/01104_fixed_string_like.reference new file mode 100644 index 00000000000..91f76305567 --- /dev/null +++ b/dbms/tests/queries/0_stateless/01104_fixed_string_like.reference @@ -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 diff --git a/dbms/tests/queries/0_stateless/01104_fixed_string_like.sql b/dbms/tests/queries/0_stateless/01104_fixed_string_like.sql new file mode 100644 index 00000000000..fa122cccbbe --- /dev/null +++ b/dbms/tests/queries/0_stateless/01104_fixed_string_like.sql @@ -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%'; diff --git a/dbms/tests/queries/0_stateless/01105_string_like.reference b/dbms/tests/queries/0_stateless/01105_string_like.reference new file mode 100644 index 00000000000..91f76305567 --- /dev/null +++ b/dbms/tests/queries/0_stateless/01105_string_like.reference @@ -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 diff --git a/dbms/tests/queries/0_stateless/01105_string_like.sql b/dbms/tests/queries/0_stateless/01105_string_like.sql new file mode 100644 index 00000000000..dc7ff3018c4 --- /dev/null +++ b/dbms/tests/queries/0_stateless/01105_string_like.sql @@ -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%';