From f0801f37fe50b25a2e2bc91b8a031fbc098cbf52 Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Mon, 4 Mar 2019 02:44:41 +0300 Subject: [PATCH] Added a test --- .../00912_string_comparison.reference | 369 ++++++++++++++++++ .../0_stateless/00912_string_comparison.sql | 18 + 2 files changed, 387 insertions(+) create mode 100644 dbms/tests/queries/0_stateless/00912_string_comparison.reference create mode 100644 dbms/tests/queries/0_stateless/00912_string_comparison.sql diff --git a/dbms/tests/queries/0_stateless/00912_string_comparison.reference b/dbms/tests/queries/0_stateless/00912_string_comparison.reference new file mode 100644 index 00000000000..5d6a0c2f3d0 --- /dev/null +++ b/dbms/tests/queries/0_stateless/00912_string_comparison.reference @@ -0,0 +1,369 @@ +0 1 0 1 0 +0 1 0 1 0 +0 1 0 1 0 +0 1 0 1 0 +0 1 0 1 0 +0 1 0 1 0 +0 1 0 1 0 +0 1 0 1 0 +0 1 0 1 0 +0 1 0 1 0 +0 1 0 1 0 +0 1 0 1 0 +0 1 0 1 0 +0 1 0 1 0 +0 1 0 1 0 +0 1 0 1 0 +0 1 0 1 0 +0 1 0 1 0 +0 1 0 1 0 +0 1 0 1 0 +0 1 0 1 0 +0 1 0 1 0 +0 1 0 1 0 +0 1 0 1 0 +0 1 0 1 0 +0 1 0 1 0 +0 1 0 1 0 +0 1 0 1 0 +0 1 0 1 0 +0 1 0 1 0 +0 1 0 1 0 +0 1 0 1 0 +0 1 0 1 0 +0 1 0 1 0 +0 1 0 1 0 +0 1 0 1 0 +0 1 0 1 0 +0 1 0 1 0 +0 1 0 1 0 +0 1 0 1 0 +0 0 1 0 1 +0 0 1 0 1 +0 0 1 0 1 +0 0 1 0 1 +0 0 1 0 1 +0 0 1 0 1 +0 0 1 0 1 +0 0 1 0 1 +0 0 1 0 1 +0 0 1 0 1 +0 0 1 0 1 +0 0 1 0 1 +0 0 1 0 1 +0 0 1 0 1 +0 0 1 0 1 +0 0 1 0 1 +0 0 1 0 1 +0 0 1 0 1 +0 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 0 1 +0 0 1 0 1 +0 0 1 0 1 +0 0 1 0 1 +0 0 1 0 1 +0 0 1 0 1 +0 0 1 0 1 +0 0 1 0 1 +0 0 1 0 1 +0 0 1 0 1 +0 0 1 0 1 +0 0 1 0 1 +0 0 1 0 1 +0 0 1 0 1 +0 0 1 0 1 +0 0 1 0 1 +0 0 1 0 1 +0 0 1 0 1 +0 0 1 0 1 +0 0 1 0 1 +0 0 1 0 1 +0 0 1 0 1 +0 0 1 0 1 +0 1 0 1 0 +0 0 1 0 1 +0 1 0 1 0 +0 0 1 0 1 +0 1 0 1 0 +0 0 1 0 1 +0 1 0 1 0 +0 0 1 0 1 +1 diff --git a/dbms/tests/queries/0_stateless/00912_string_comparison.sql b/dbms/tests/queries/0_stateless/00912_string_comparison.sql new file mode 100644 index 00000000000..857da41098e --- /dev/null +++ b/dbms/tests/queries/0_stateless/00912_string_comparison.sql @@ -0,0 +1,18 @@ +WITH substring('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 1, number) AS prefix, prefix || 'x' AS a, prefix || 'y' AS b SELECT a = b, a < b, a > b, a <= b, a >= b FROM numbers(40); +WITH substring('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 1, number) AS prefix, prefix || 'y' AS a, prefix || 'x' AS b SELECT a = b, a < b, a > b, a <= b, a >= b FROM numbers(40); +WITH substring('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 1, number) AS prefix, prefix || 'x' AS a, prefix || 'x' AS b SELECT a = b, a < b, a > b, a <= b, a >= b FROM numbers(40); + +WITH substring('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 1, number) AS prefix, prefix || 'x' || prefix AS a, prefix || 'y' || prefix AS b SELECT a = b, a < b, a > b, a <= b, a >= b FROM numbers(40); +WITH substring('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 1, number) AS prefix, prefix || 'y' || prefix AS a, prefix || 'x' || prefix AS b SELECT a = b, a < b, a > b, a <= b, a >= b FROM numbers(40); +WITH substring('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 1, number) AS prefix, prefix || 'x' || prefix AS a, prefix || 'x' || prefix AS b SELECT a = b, a < b, a > b, a <= b, a >= b FROM numbers(40); + +WITH substring('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 1, number) AS prefix, prefix || 'x' || prefix AS a, prefix || 'y' AS b SELECT a = b, a < b, a > b, a <= b, a >= b FROM numbers(40); +WITH substring('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 1, number) AS prefix, prefix || 'y' || prefix AS a, prefix || 'x' AS b SELECT a = b, a < b, a > b, a <= b, a >= b FROM numbers(40); +WITH substring('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 1, number) AS prefix, prefix || 'x' || prefix AS a, prefix || 'x' AS b SELECT a = b, a < b, a > b, a <= b, a >= b FROM numbers(40); + +WITH arrayJoin(['aaa', 'bbb']) AS a, 'aaa\0bbb' AS b SELECT a = b, a < b, a > b, a <= b, a >= b; +WITH arrayJoin(['aaa', 'zzz']) AS a, 'aaa\0bbb' AS b SELECT a = b, a < b, a > b, a <= b, a >= b; +WITH arrayJoin(['aaa', 'bbb']) AS a, materialize('aaa\0bbb') AS b SELECT a = b, a < b, a > b, a <= b, a >= b; +WITH arrayJoin(['aaa', 'zzz']) AS a, materialize('aaa\0bbb') AS b SELECT a = b, a < b, a > b, a <= b, a >= b; + +SELECT empty(toFixedString('', randConstant() % 100));