From f63b511c83cf10636143b701c3aad998f1d3595c Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Thu, 7 Dec 2017 07:44:33 +0300 Subject: [PATCH] Fixed tests [#CLICKHOUSE-2]. --- .../0_stateless/00149_function_url_hash.sql | 10 ++++---- .../0_stateless/00170_lower_upper_utf8.sql | 24 +++++++++---------- ...90_non_constant_array_of_constant_data.sql | 8 +++---- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/dbms/tests/queries/0_stateless/00149_function_url_hash.sql b/dbms/tests/queries/0_stateless/00149_function_url_hash.sql index 1ffd2302153..18e63978e09 100644 --- a/dbms/tests/queries/0_stateless/00149_function_url_hash.sql +++ b/dbms/tests/queries/0_stateless/00149_function_url_hash.sql @@ -10,8 +10,8 @@ select URLHash('' as url, 1000) = URLHash(url); select URLHash('http://ya.ru/a' as url, 0 as level) = URLHash(URLHierarchy(url)[level + 1]); select URLHash('http://ya.ru/a' as url, 1 as level) = URLHash(URLHierarchy(url)[level + 1]); -select URLHash(url, 0 as level) = URLHash(URLHierarchy(url)[level + 1]) from array join ['', 'http://ya.ru', 'http://ya.ru/', 'http://ya.ru/a', 'http://ya.ru/a/', 'http://ya.ru/a/b', 'http://ya.ru/a/b?'] as url; -select URLHash(url, 1 as level) = URLHash(URLHierarchy(url)[level + 1]) from array join ['', 'http://ya.ru', 'http://ya.ru/', 'http://ya.ru/a', 'http://ya.ru/a/', 'http://ya.ru/a/b', 'http://ya.ru/a/b?'] as url; -select URLHash(url, 2 as level) = URLHash(URLHierarchy(url)[level + 1]) from array join ['', 'http://ya.ru', 'http://ya.ru/', 'http://ya.ru/a', 'http://ya.ru/a/', 'http://ya.ru/a/b', 'http://ya.ru/a/b?'] as url; -select URLHash(url, 3 as level) = URLHash(URLHierarchy(url)[level + 1]) from array join ['', 'http://ya.ru', 'http://ya.ru/', 'http://ya.ru/a', 'http://ya.ru/a/', 'http://ya.ru/a/b', 'http://ya.ru/a/b?'] as url; -select URLHash(url, 4 as level) = URLHash(URLHierarchy(url)[level + 1]) from array join ['', 'http://ya.ru', 'http://ya.ru/', 'http://ya.ru/a', 'http://ya.ru/a/', 'http://ya.ru/a/b', 'http://ya.ru/a/b?'] as url; +select URLHash(url, 0 as level) = URLHash(URLHierarchy(url)[level + 1]) from system.one array join ['', 'http://ya.ru', 'http://ya.ru/', 'http://ya.ru/a', 'http://ya.ru/a/', 'http://ya.ru/a/b', 'http://ya.ru/a/b?'] as url; +select URLHash(url, 1 as level) = URLHash(URLHierarchy(url)[level + 1]) from system.one array join ['', 'http://ya.ru', 'http://ya.ru/', 'http://ya.ru/a', 'http://ya.ru/a/', 'http://ya.ru/a/b', 'http://ya.ru/a/b?'] as url; +select URLHash(url, 2 as level) = URLHash(URLHierarchy(url)[level + 1]) from system.one array join ['', 'http://ya.ru', 'http://ya.ru/', 'http://ya.ru/a', 'http://ya.ru/a/', 'http://ya.ru/a/b', 'http://ya.ru/a/b?'] as url; +select URLHash(url, 3 as level) = URLHash(URLHierarchy(url)[level + 1]) from system.one array join ['', 'http://ya.ru', 'http://ya.ru/', 'http://ya.ru/a', 'http://ya.ru/a/', 'http://ya.ru/a/b', 'http://ya.ru/a/b?'] as url; +select URLHash(url, 4 as level) = URLHash(URLHierarchy(url)[level + 1]) from system.one array join ['', 'http://ya.ru', 'http://ya.ru/', 'http://ya.ru/a', 'http://ya.ru/a/', 'http://ya.ru/a/b', 'http://ya.ru/a/b?'] as url; diff --git a/dbms/tests/queries/0_stateless/00170_lower_upper_utf8.sql b/dbms/tests/queries/0_stateless/00170_lower_upper_utf8.sql index 54f0e91714e..4caba2033ff 100644 --- a/dbms/tests/queries/0_stateless/00170_lower_upper_utf8.sql +++ b/dbms/tests/queries/0_stateless/00170_lower_upper_utf8.sql @@ -8,22 +8,22 @@ select upperUTF8('AAAAAAAAAAAAAAA012345789,.!AAAA' as str) = str; select upper('AaAaAaAaAaAaAaA012345789,.!aAaA') = 'AAAAAAAAAAAAAAA012345789,.!AAAA'; select upperUTF8('AaAaAaAaAaAaAaA012345789,.!aAaA') = 'AAAAAAAAAAAAAAA012345789,.!AAAA'; -select sum(lower(materialize('aaaaaaaaaaaaaaa012345789,.!aaaa') as str) = str) = count() from array join range(16384) as n; -select sum(lowerUTF8(materialize('aaaaaaaaaaaaaaa012345789,.!aaaa') as str) = str) = count() from array join range(16384) as n; -select sum(lower(materialize('AaAaAaAaAaAaAaA012345789,.!aAaA')) = materialize('aaaaaaaaaaaaaaa012345789,.!aaaa')) = count() from array join range(16384) as n; -select sum(lowerUTF8(materialize('AaAaAaAaAaAaAaA012345789,.!aAaA')) = materialize('aaaaaaaaaaaaaaa012345789,.!aaaa')) = count() from array join range(16384) as n; +select sum(lower(materialize('aaaaaaaaaaaaaaa012345789,.!aaaa') as str) = str) = count() from system.one array join range(16384) as n; +select sum(lowerUTF8(materialize('aaaaaaaaaaaaaaa012345789,.!aaaa') as str) = str) = count() from system.one array join range(16384) as n; +select sum(lower(materialize('AaAaAaAaAaAaAaA012345789,.!aAaA')) = materialize('aaaaaaaaaaaaaaa012345789,.!aaaa')) = count() from system.one array join range(16384) as n; +select sum(lowerUTF8(materialize('AaAaAaAaAaAaAaA012345789,.!aAaA')) = materialize('aaaaaaaaaaaaaaa012345789,.!aaaa')) = count() from system.one array join range(16384) as n; -select sum(upper(materialize('AAAAAAAAAAAAAAA012345789,.!AAAA') as str) = str) = count() from array join range(16384) as n; -select sum(upperUTF8(materialize('AAAAAAAAAAAAAAA012345789,.!AAAA') as str) = str) = count() from array join range(16384) as n; -select sum(upper(materialize('AaAaAaAaAaAaAaA012345789,.!aAaA')) = materialize('AAAAAAAAAAAAAAA012345789,.!AAAA')) = count() from array join range(16384) as n; -select sum(upperUTF8(materialize('AaAaAaAaAaAaAaA012345789,.!aAaA')) = materialize('AAAAAAAAAAAAAAA012345789,.!AAAA')) = count() from array join range(16384) as n; +select sum(upper(materialize('AAAAAAAAAAAAAAA012345789,.!AAAA') as str) = str) = count() from system.one array join range(16384) as n; +select sum(upperUTF8(materialize('AAAAAAAAAAAAAAA012345789,.!AAAA') as str) = str) = count() from system.one array join range(16384) as n; +select sum(upper(materialize('AaAaAaAaAaAaAaA012345789,.!aAaA')) = materialize('AAAAAAAAAAAAAAA012345789,.!AAAA')) = count() from system.one array join range(16384) as n; +select sum(upperUTF8(materialize('AaAaAaAaAaAaAaA012345789,.!aAaA')) = materialize('AAAAAAAAAAAAAAA012345789,.!AAAA')) = count() from system.one array join range(16384) as n; select lower('aaaaАБВГAAAAaaAA') = 'aaaaАБВГaaaaaaaa'; select upper('aaaaАБВГAAAAaaAA') = 'AAAAАБВГAAAAAAAA'; select lowerUTF8('aaaaАБВГAAAAaaAA') = 'aaaaабвгaaaaaaaa'; select upperUTF8('aaaaАБВГAAAAaaAA') = 'AAAAАБВГAAAAAAAA'; -select sum(lower(materialize('aaaaАБВГAAAAaaAA')) = materialize('aaaaАБВГaaaaaaaa')) = count() from array join range(16384) as n; -select sum(upper(materialize('aaaaАБВГAAAAaaAA')) = materialize('AAAAАБВГAAAAAAAA')) = count() from array join range(16384) as n; -select sum(lowerUTF8(materialize('aaaaАБВГAAAAaaAA')) = materialize('aaaaабвгaaaaaaaa')) = count() from array join range(16384) as n; -select sum(upperUTF8(materialize('aaaaАБВГAAAAaaAA')) = materialize('AAAAАБВГAAAAAAAA')) = count() from array join range(16384) as n; +select sum(lower(materialize('aaaaАБВГAAAAaaAA')) = materialize('aaaaАБВГaaaaaaaa')) = count() from system.one array join range(16384) as n; +select sum(upper(materialize('aaaaАБВГAAAAaaAA')) = materialize('AAAAАБВГAAAAAAAA')) = count() from system.one array join range(16384) as n; +select sum(lowerUTF8(materialize('aaaaАБВГAAAAaaAA')) = materialize('aaaaабвгaaaaaaaa')) = count() from system.one array join range(16384) as n; +select sum(upperUTF8(materialize('aaaaАБВГAAAAaaAA')) = materialize('AAAAАБВГAAAAAAAA')) = count() from system.one array join range(16384) as n; diff --git a/dbms/tests/queries/0_stateless/00190_non_constant_array_of_constant_data.sql b/dbms/tests/queries/0_stateless/00190_non_constant_array_of_constant_data.sql index d06ee58797b..53f9fe3f5ea 100644 --- a/dbms/tests/queries/0_stateless/00190_non_constant_array_of_constant_data.sql +++ b/dbms/tests/queries/0_stateless/00190_non_constant_array_of_constant_data.sql @@ -1,11 +1,11 @@ -SELECT arrayFilter(x -> notEmpty(concat(x, 'hello')), ['']) FROM ARRAY JOIN [0] AS elem, arrayMap(x -> concat(x, 'hello'), ['']) AS unused WHERE NOT ignore(elem); +SELECT arrayFilter(x -> notEmpty(concat(x, 'hello')), ['']) FROM system.one ARRAY JOIN [0] AS elem, arrayMap(x -> concat(x, 'hello'), ['']) AS unused WHERE NOT ignore(elem); SELECT '---'; -SELECT arrayFilter(x -> x = 'hello', ['']) FROM ARRAY JOIN [0] AS elem WHERE NOT ignore(elem) AND arrayExists(x -> x = 'hello', ['']); +SELECT arrayFilter(x -> x = 'hello', ['']) FROM system.one ARRAY JOIN [0] AS elem WHERE NOT ignore(elem) AND arrayExists(x -> x = 'hello', ['']); SELECT '---'; SELECT arrayJoin([0]), replicate('hello', [1]) WHERE NOT ignore(replicate('hello', [1])); SELECT '---'; -SELECT arrayJoin([0]), replicate('hello', emptyArrayString()) FROM ARRAY JOIN emptyArrayString() AS unused WHERE NOT ignore(replicate('hello', emptyArrayString())); +SELECT arrayJoin([0]), replicate('hello', emptyArrayString()) FROM system.one ARRAY JOIN emptyArrayString() AS unused WHERE NOT ignore(replicate('hello', emptyArrayString())); SELECT '---'; SELECT arrayJoin([0]), replicate('hello', emptyArrayString()) WHERE NOT ignore(replicate('hello', emptyArrayString())); SELECT '---'; -SELECT replicate('hello', emptyArrayString()) FROM ARRAY JOIN emptyArrayString() AS unused WHERE NOT ignore(replicate('hello', emptyArrayString())); +SELECT replicate('hello', emptyArrayString()) FROM system.one ARRAY JOIN emptyArrayString() AS unused WHERE NOT ignore(replicate('hello', emptyArrayString()));