mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 08:32:02 +00:00
Added test [#METR-20706].
This commit is contained in:
parent
eb5d905600
commit
22272510dc
@ -0,0 +1,37 @@
|
||||
Hello, World
|
||||
Hello, World 1
|
||||
Hello, World 1
|
||||
Hello, World 1
|
||||
Hello, World
|
||||
Hello, World 1
|
||||
Hello
|
||||
Hello 1
|
||||
Hello, World
|
||||
Hello, World 1
|
||||
Hello 1
|
||||
Hello, World
|
||||
Hello, World 1
|
||||
Hello
|
||||
Hello 1
|
||||
Hello, World
|
||||
Hello, World 1
|
||||
Goodbye
|
||||
Goodbye 1
|
||||
Goodbye, World
|
||||
Goodbye, World 1
|
||||
Goodbye
|
||||
Goodbye 1
|
||||
Goodbye, World
|
||||
Goodbye, World 1
|
||||
Hello
|
||||
Hello 1
|
||||
Hello, World
|
||||
Hello, World 1
|
||||
Hello
|
||||
Hello 1
|
||||
Hello, World
|
||||
Hello, World 1
|
||||
Hello
|
||||
Hello, World 1
|
||||
Hello, World
|
||||
Hello, World 1
|
54
dbms/tests/queries/0_stateless/00319_index_for_like.sql
Normal file
54
dbms/tests/queries/0_stateless/00319_index_for_like.sql
Normal file
@ -0,0 +1,54 @@
|
||||
DROP TABLE IF EXISTS test.index_for_like;
|
||||
CREATE TABLE test.index_for_like (s String, d Date DEFAULT today()) ENGINE = MergeTree(d, (s, d), 1);
|
||||
|
||||
INSERT INTO test.index_for_like (s) VALUES ('Hello'), ('Hello, World'), ('Hello, World 1'), ('Hello 1'), ('Goodbye'), ('Goodbye, World'), ('Goodbye 1'), ('Goodbye, World 1');
|
||||
|
||||
SET max_rows_to_read = 3;
|
||||
SELECT s FROM test.index_for_like WHERE s LIKE 'Hello, World%';
|
||||
|
||||
SET max_rows_to_read = 2;
|
||||
SELECT s FROM test.index_for_like WHERE s LIKE 'Hello, World %';
|
||||
|
||||
SET max_rows_to_read = 2;
|
||||
SELECT s FROM test.index_for_like WHERE s LIKE 'Hello, World 1%';
|
||||
|
||||
SET max_rows_to_read = 1;
|
||||
SELECT s FROM test.index_for_like WHERE s LIKE 'Hello, World 2%';
|
||||
|
||||
SET max_rows_to_read = 1;
|
||||
SELECT s FROM test.index_for_like WHERE s LIKE 'Hello, Worle%';
|
||||
|
||||
SET max_rows_to_read = 3;
|
||||
SELECT s FROM test.index_for_like WHERE s LIKE 'Hello, Wor%';
|
||||
|
||||
SET max_rows_to_read = 5;
|
||||
SELECT s FROM test.index_for_like WHERE s LIKE 'Hello%';
|
||||
|
||||
SET max_rows_to_read = 2;
|
||||
SELECT s FROM test.index_for_like WHERE s LIKE 'Hello %';
|
||||
|
||||
SET max_rows_to_read = 3;
|
||||
SELECT s FROM test.index_for_like WHERE s LIKE 'Hello,%';
|
||||
|
||||
SET max_rows_to_read = 1;
|
||||
SELECT s FROM test.index_for_like WHERE s LIKE 'Hello;%';
|
||||
|
||||
SET max_rows_to_read = 5;
|
||||
SELECT s FROM test.index_for_like WHERE s LIKE 'H%';
|
||||
|
||||
SET max_rows_to_read = 4;
|
||||
SELECT s FROM test.index_for_like WHERE s LIKE 'Good%';
|
||||
|
||||
SET max_rows_to_read = 8;
|
||||
SELECT s FROM test.index_for_like WHERE s LIKE '%';
|
||||
SELECT s FROM test.index_for_like WHERE s LIKE '%Hello%';
|
||||
SELECT s FROM test.index_for_like WHERE s LIKE '%Hello';
|
||||
|
||||
SET max_rows_to_read = 3;
|
||||
SELECT s FROM test.index_for_like WHERE s LIKE 'Hello, World% %';
|
||||
SELECT s FROM test.index_for_like WHERE s LIKE 'Hello, Worl_%';
|
||||
|
||||
SET max_rows_to_read = 1;
|
||||
SELECT s FROM test.index_for_like WHERE s LIKE 'Hello, Worl\\_%';
|
||||
|
||||
DROP TABLE test.index_for_like;
|
Loading…
Reference in New Issue
Block a user