mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 08:32:02 +00:00
97f2a2213e
* Move some code outside dbms/src folder * Fix paths
30 lines
2.2 KiB
SQL
30 lines
2.2 KiB
SQL
SET send_logs_level = 'none';
|
|
|
|
select 0 = multiFuzzyMatchAny('abc', 0, ['a1c']) from system.numbers limit 5;
|
|
select 1 = multiFuzzyMatchAny('abc', 1, ['a1c']) from system.numbers limit 5;
|
|
select 1 = multiFuzzyMatchAny('abc', 2, ['a1c']) from system.numbers limit 5;
|
|
select 1 = multiFuzzyMatchAny('abc', 3, ['a1c']) from system.numbers limit 5; -- { serverError 36 }
|
|
select 1 = multiFuzzyMatchAny('abc', 4, ['a1c']) from system.numbers limit 5; -- { serverError 36 }
|
|
|
|
select 1 = multiFuzzyMatchAny('leftabcright', 1, ['a1c']) from system.numbers limit 5;
|
|
|
|
select 1 = multiFuzzyMatchAny('hello some world', 0, ['^hello.*world$']);
|
|
select 1 = multiFuzzyMatchAny('hallo some world', 1, ['^hello.*world$']);
|
|
select 0 = multiFuzzyMatchAny('halo some wrld', 2, ['^hello.*world$']);
|
|
select 1 = multiFuzzyMatchAny('halo some wrld', 2, ['^hello.*world$', '^halo.*world$']);
|
|
select 1 = multiFuzzyMatchAny('halo some wrld', 2, ['^halo.*world$', '^hello.*world$']);
|
|
select 1 = multiFuzzyMatchAny('halo some wrld', 3, ['^hello.*world$']);
|
|
select 1 = multiFuzzyMatchAny('hello some world', 10, ['^hello.*world$']); -- { serverError 36 }
|
|
select 1 = multiFuzzyMatchAny('hello some world', -1, ['^hello.*world$']); -- { serverError 43 }
|
|
select 1 = multiFuzzyMatchAny('hello some world', 10000000000, ['^hello.*world$']); -- { serverError 44 }
|
|
select 1 = multiFuzzyMatchAny('http://hyperscan_is_nice.ru/st', 2, ['http://hyperscan_is_nice.ru/(st\\d\\d$|st\\d\\d\\.|st1[0-4]\\d|st150|st\\d$|gl|rz|ch)']);
|
|
select 0 = multiFuzzyMatchAny('string', 0, ['zorro$', '^tring', 'in$', 'how.*', 'it{2}', 'works']);
|
|
|
|
select 1 = multiFuzzyMatchAny('string', 1, ['zorro$', '^tring', 'ip$', 'how.*', 'it{2}', 'works']);
|
|
select 2 = multiFuzzyMatchAnyIndex('string', 1, ['zorro$', '^tring', 'ip$', 'how.*', 'it{2}', 'works']);
|
|
select 2 = multiFuzzyMatchAnyIndex('halo some wrld', 2, ['^hello.*world$', '^halo.*world$']);
|
|
select 1 = multiFuzzyMatchAnyIndex('halo some wrld', 2, ['^halo.*world$', '^hello.*world$']);
|
|
|
|
select [2, 3, 4] = arraySort(multiFuzzyMatchAllIndices('halo some wrld', 2, ['some random string', '^halo.*world$', '^halo.*world$', '^halo.*world$', '^hallllo.*world$']));
|
|
select [] = multiFuzzyMatchAllIndices('halo some wrld', 2, ['^halllllo.*world$', 'some random string']);
|