From 8cceb8980eb434081f315012916a0d7c10bd2394 Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Thu, 26 Mar 2020 22:44:33 +0300 Subject: [PATCH] Added another test --- .../01106_const_fixed_string_like.reference | 39 ++++++++++++++++ .../01106_const_fixed_string_like.sql | 46 +++++++++++++++++++ 2 files changed, 85 insertions(+) create mode 100644 dbms/tests/queries/0_stateless/01106_const_fixed_string_like.reference create mode 100644 dbms/tests/queries/0_stateless/01106_const_fixed_string_like.sql diff --git a/dbms/tests/queries/0_stateless/01106_const_fixed_string_like.reference b/dbms/tests/queries/0_stateless/01106_const_fixed_string_like.reference new file mode 100644 index 00000000000..d3781033b05 --- /dev/null +++ b/dbms/tests/queries/0_stateless/01106_const_fixed_string_like.reference @@ -0,0 +1,39 @@ +1 +0 +0 +0 +0 +1 +0 +0 +1 +0 +1 +0 +0 +0 +0 +1 +0 +0 +1 +0 +1 +0 +0 +1 +0 +1 +0 +0 +1 +0 +0 +0 +0 +0 +0 +1 +1 +1 +0 diff --git a/dbms/tests/queries/0_stateless/01106_const_fixed_string_like.sql b/dbms/tests/queries/0_stateless/01106_const_fixed_string_like.sql new file mode 100644 index 00000000000..6f945f5f8be --- /dev/null +++ b/dbms/tests/queries/0_stateless/01106_const_fixed_string_like.sql @@ -0,0 +1,46 @@ +SELECT CAST('hello' AS FixedString(5)) LIKE 'hello'; +SELECT CAST('hello' AS FixedString(5)) LIKE 'world'; +SELECT CAST('hello' AS FixedString(5)) LIKE 'xyz'; +SELECT CAST('hello' AS FixedString(5)) LIKE 'hell'; +SELECT CAST('hello' AS FixedString(5)) LIKE 'orld'; + +SELECT CAST('hello' AS FixedString(5)) LIKE '%hello%'; +SELECT CAST('hello' AS FixedString(5)) LIKE '%world%'; +SELECT CAST('hello' AS FixedString(5)) LIKE '%xyz%'; +SELECT CAST('hello' AS FixedString(5)) LIKE '%hell%'; +SELECT CAST('hello' AS FixedString(5)) LIKE '%orld%'; + +SELECT CAST('hello' AS FixedString(5)) LIKE '%hello'; +SELECT CAST('hello' AS FixedString(5)) LIKE '%world'; +SELECT CAST('hello' AS FixedString(5)) LIKE '%xyz'; +SELECT CAST('hello' AS FixedString(5)) LIKE '%hell'; +SELECT CAST('hello' AS FixedString(5)) LIKE '%orld'; + +SELECT CAST('hello' AS FixedString(5)) LIKE 'hello%'; +SELECT CAST('hello' AS FixedString(5)) LIKE 'world%'; +SELECT CAST('hello' AS FixedString(5)) LIKE 'xyz%'; +SELECT CAST('hello' AS FixedString(5)) LIKE 'hell%'; +SELECT CAST('hello' AS FixedString(5)) LIKE 'orld%'; + +SELECT CAST('hello' AS FixedString(5)) LIKE '%he%o%'; +SELECT CAST('hello' AS FixedString(5)) LIKE '%w%ld%'; +SELECT CAST('hello' AS FixedString(5)) LIKE '%x%z%'; +SELECT CAST('hello' AS FixedString(5)) LIKE '%hell_'; +SELECT CAST('hello' AS FixedString(5)) LIKE '_orld%'; + +SELECT CAST('hello' AS FixedString(5)) LIKE '%he__o%'; +SELECT CAST('hello' AS FixedString(5)) LIKE '%w__ld%'; +SELECT CAST('hello' AS FixedString(5)) LIKE '%x%z%'; +SELECT CAST('hello' AS FixedString(5)) LIKE 'hell_'; +SELECT CAST('hello' AS FixedString(5)) LIKE '_orld'; + +SELECT CAST('hello' AS FixedString(5)) LIKE 'helloworld'; +SELECT CAST('hello' AS FixedString(5)) LIKE '%helloworld%'; +SELECT CAST('hello' AS FixedString(5)) LIKE '%elloworl%'; +SELECT CAST('hello' AS FixedString(5)) LIKE '%ow%'; +SELECT CAST('hello' AS FixedString(5)) LIKE '%o%w%'; + +SELECT CAST('hello' AS FixedString(5)) LIKE '%o%'; +SELECT CAST('hello' AS FixedString(5)) LIKE '%l%'; +SELECT CAST('hello' AS FixedString(5)) LIKE '%l%o%'; +SELECT CAST('hello' AS FixedString(5)) LIKE '%o%l%';