ClickHouse/tests/queries/0_stateless/02809_has_subsequence.sql

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

68 lines
5.4 KiB
MySQL
Raw Normal View History

2023-07-10 09:18:09 +00:00
select 'hasSubsequence';
2023-07-06 13:16:31 +00:00
select hasSubsequence('garbage', '');
select hasSubsequence('garbage', 'g');
2023-07-10 07:29:31 +00:00
select hasSubsequence('garbage', 'G');
2023-07-06 13:16:31 +00:00
select hasSubsequence('garbage', 'a');
select hasSubsequence('garbage', 'e');
select hasSubsequence('garbage', 'gr');
select hasSubsequence('garbage', 'ab');
select hasSubsequence('garbage', 'be');
select hasSubsequence('garbage', 'arg');
2023-07-12 05:47:37 +00:00
select hasSubsequence('garbage', 'gra');
2023-07-12 05:48:58 +00:00
select hasSubsequence('garbage', 'rga');
2023-07-06 13:16:31 +00:00
select hasSubsequence('garbage', 'garbage');
select hasSubsequence('garbage', 'garbage1');
select hasSubsequence('garbage', 'arbw');
select hasSubsequence('garbage', 'ARG');
2023-07-06 19:43:37 +00:00
select hasSubsequence('garbage', materialize(''));
select hasSubsequence('garbage', materialize('arg'));
select hasSubsequence('garbage', materialize('arbw'));
select hasSubsequence(materialize('garbage'), '');
select hasSubsequence(materialize('garbage'), 'arg');
select hasSubsequence(materialize('garbage'), 'arbw');
2023-07-06 13:16:31 +00:00
select hasSubsequence(materialize('garbage'), materialize(''));
select hasSubsequence(materialize('garbage'), materialize('arg'));
2023-07-06 19:43:37 +00:00
select hasSubsequence(materialize('garbage'), materialize('garbage1'));
2023-07-10 09:18:09 +00:00
select 'hasSubsequenceCaseInsensitive';
2023-07-10 07:29:31 +00:00
select hasSubsequenceCaseInsensitive('garbage', 'w');
2023-07-06 19:43:37 +00:00
select hasSubsequenceCaseInsensitive('garbage', 'ARG');
2023-07-10 07:29:31 +00:00
select hasSubsequenceCaseInsensitive('GARGAGE', 'arg');
select hasSubsequenceCaseInsensitive(materialize('garbage'), materialize('w'));
select hasSubsequenceCaseInsensitive(materialize('garbage'), materialize('ARG'));
select hasSubsequenceCaseInsensitive(materialize('GARGAGE'), materialize('arg'));
2023-07-10 09:18:09 +00:00
select 'hasSubsequenceUTF8';
2023-07-10 07:29:31 +00:00
select hasSubsequence('ClickHouse - столбцовая система управления базами данных', '');
select hasSubsequence('ClickHouse - столбцовая система управления базами данных', 'C'); -- eng
select hasSubsequence('ClickHouse - столбцовая система управления базами данных', 'С'); -- cyrilic
select hasSubsequence('ClickHouse - столбцовая система управления базами данных', 'House');
select hasSubsequence('ClickHouse - столбцовая система управления базами данных', 'house');
select hasSubsequence('ClickHouse - столбцовая система управления базами данных', 'система');
select hasSubsequence('ClickHouse - столбцовая система управления базами данных', 'Система');
select hasSubsequence('ClickHouse - столбцовая система управления базами данных', 'ссубд');
select hasSubsequence(materialize('ClickHouse - столбцовая система управления базами данных'), 'субд');
select hasSubsequence(materialize('ClickHouse - столбцовая система управления базами данных'), 'суббд');
select hasSubsequence('ClickHouse - столбцовая система управления базами данных', materialize('стул'));
select hasSubsequence('ClickHouse - столбцовая система управления базами данных', materialize('два стула'));
select hasSubsequence(materialize('ClickHouse - столбцовая система управления базами данных'), materialize('орех'));
2023-07-10 09:18:09 +00:00
select hasSubsequence(materialize('ClickHouse - столбцовая система управления базами данных'), materialize('два ореха'));
select 'hasSubsequenceCaseInsensitiveUTF8';
select hasSubsequenceCaseInsensitiveUTF8('для онлайн обработки аналитических запросов (OLAP)', 'oltp');
select hasSubsequenceCaseInsensitiveUTF8('для онлайн обработки аналитических запросов (OLAP)', 'оОоОоO');
select hasSubsequenceCaseInsensitiveUTF8('для онлайн обработки аналитических запросов (OLAP)', 'я раб');
select hasSubsequenceCaseInsensitiveUTF8(materialize('для онлайн обработки аналитических запросов (OLAP)'), 'работа');
select hasSubsequenceCaseInsensitiveUTF8(materialize('для онлайн обработки аналитических запросов (OLAP)'), 'work');
select hasSubsequenceCaseInsensitiveUTF8('для онлайн обработки аналитических запросов (OLAP)', materialize('добро)'));
select hasSubsequenceCaseInsensitiveUTF8('для онлайн обработки аналитических запросов (OLAP)', materialize('зло()'));
select hasSubsequenceCaseInsensitiveUTF8(materialize('для онлайн обработки аналитических запросов (OLAP)'), materialize('аналитика'));
2023-07-12 05:47:37 +00:00
select hasSubsequenceCaseInsensitiveUTF8(materialize('для онлайн обработки аналитических запросов (OLAP)'), materialize('аналитика для аналитиков'));
2023-07-14 12:01:26 +00:00
select 'Nullable';
select hasSubsequence(Null, Null);
select hasSubsequence(Null, 'a');
select hasSubsequence(Null::Nullable(String), 'arg'::Nullable(String));
select hasSubsequence('garbage'::Nullable(String), 'a');
select hasSubsequence('garbage'::Nullable(String), 'arg'::Nullable(String));
select hasSubsequence(materialize('garbage'::Nullable(String)), materialize('arg'::Nullable(String)));