mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-15 10:52:30 +00:00
fix test
This commit is contained in:
parent
761554e86d
commit
83d4b72961
@ -1,57 +1,10 @@
|
|||||||
========================================
|
|
||||||
| SKIP 3 GRANUS |
|
|
||||||
| Required String: Hello |
|
|
||||||
| Alternative String: Hello ClickHouse |
|
|
||||||
| Alternative String: Hello World |
|
|
||||||
========================================
|
|
||||||
Expression ((Projection + Before ORDER BY))
|
|
||||||
ReadFromMergeTree (test_tokenbf_match.test_tokenbf)
|
|
||||||
Indexes:
|
|
||||||
PrimaryKey
|
|
||||||
Condition: true
|
|
||||||
Parts: 1/1
|
|
||||||
Granules: 5/5
|
Granules: 5/5
|
||||||
Skip
|
|
||||||
Name: str_idx
|
|
||||||
Description: tokenbf_v1 GRANULARITY 1
|
|
||||||
Parts: 1/1
|
|
||||||
Granules: 2/5
|
Granules: 2/5
|
||||||
|
|
||||||
|
|
||||||
========================================
|
|
||||||
| SKIP 3 GRANUS |
|
|
||||||
| No Required String |
|
|
||||||
| Alternative String: ClickHouse |
|
|
||||||
| Alternative String: World |
|
|
||||||
========================================
|
|
||||||
Expression ((Projection + Before ORDER BY))
|
|
||||||
ReadFromMergeTree (test_tokenbf_match.test_tokenbf)
|
|
||||||
Indexes:
|
|
||||||
PrimaryKey
|
|
||||||
Condition: true
|
|
||||||
Parts: 1/1
|
|
||||||
Granules: 5/5
|
Granules: 5/5
|
||||||
Skip
|
|
||||||
Name: str_idx
|
|
||||||
Description: tokenbf_v1 GRANULARITY 1
|
|
||||||
Parts: 1/1
|
|
||||||
Granules: 2/5
|
Granules: 2/5
|
||||||
|
|
||||||
|
|
||||||
========================================
|
|
||||||
| SKIP 4 GRANUS |
|
|
||||||
| Required String: OLAP |
|
|
||||||
| No Alternative String |
|
|
||||||
========================================
|
|
||||||
Expression ((Projection + Before ORDER BY))
|
|
||||||
ReadFromMergeTree (test_tokenbf_match.test_tokenbf)
|
|
||||||
Indexes:
|
|
||||||
PrimaryKey
|
|
||||||
Condition: true
|
|
||||||
Parts: 1/1
|
|
||||||
Granules: 5/5
|
Granules: 5/5
|
||||||
Skip
|
|
||||||
Name: str_idx
|
|
||||||
Description: tokenbf_v1 GRANULARITY 1
|
|
||||||
Parts: 1/1
|
|
||||||
Granules: 1/5
|
Granules: 1/5
|
||||||
|
@ -16,36 +16,53 @@ SETTINGS index_granularity = 1;
|
|||||||
|
|
||||||
INSERT INTO test_tokenbf_match.test_tokenbf VALUES (1, 'Hello ClickHouse'), (2, 'Hello World'), (3, 'Hello Github'), (4, 'Hello Cloud'), (5, 'OLAP Database');
|
INSERT INTO test_tokenbf_match.test_tokenbf VALUES (1, 'Hello ClickHouse'), (2, 'Hello World'), (3, 'Hello Github'), (4, 'Hello Cloud'), (5, 'OLAP Database');
|
||||||
|
|
||||||
SELECT '========================================';
|
--SKIP 3 GRANUS
|
||||||
SELECT '| SKIP 3 GRANUS |';
|
--Required String: Hello
|
||||||
SELECT '| Required String: Hello |';
|
--Alternative String: Hello ClickHouse
|
||||||
SELECT '| Alternative String: Hello ClickHouse |';
|
--Alternative String: Hello World
|
||||||
SELECT '| Alternative String: Hello World |';
|
SELECT
|
||||||
SELECT '========================================';
|
*
|
||||||
|
FROM
|
||||||
|
(
|
||||||
|
EXPLAIN indexes=1
|
||||||
|
SELECT * FROM test_tokenbf_match.test_tokenbf WHERE match(str, 'Hello (ClickHouse|World)')
|
||||||
|
)
|
||||||
|
WHERE
|
||||||
|
explain like '%Granules%';
|
||||||
|
|
||||||
EXPLAIN indexes=1 SELECT * FROM test_tokenbf_match.test_tokenbf WHERE match(str, 'Hello (ClickHouse|World)');
|
|
||||||
|
|
||||||
SELECT '';
|
SELECT '';
|
||||||
SELECT '';
|
SELECT '';
|
||||||
|
|
||||||
SELECT '========================================';
|
|
||||||
SELECT '| SKIP 3 GRANUS |';
|
|
||||||
SELECT '| No Required String |';
|
|
||||||
SELECT '| Alternative String: ClickHouse |';
|
|
||||||
SELECT '| Alternative String: World |';
|
|
||||||
SELECT '========================================';
|
|
||||||
|
|
||||||
EXPLAIN indexes = 1 SELECT * FROM test_tokenbf_match.test_tokenbf where match(str, '(.*?)* (ClickHouse|World)');
|
--SKIP 3 GRANUS
|
||||||
|
--No Required String
|
||||||
|
--Alternative String: ClickHouse
|
||||||
|
--Alternative String: World
|
||||||
|
SELECT
|
||||||
|
*
|
||||||
|
FROM
|
||||||
|
(
|
||||||
|
EXPLAIN indexes = 1
|
||||||
|
SELECT * FROM test_tokenbf_match.test_tokenbf where match(str, '(.*?)* (ClickHouse|World)')
|
||||||
|
)
|
||||||
|
WHERE
|
||||||
|
explain like '%Granules%';
|
||||||
|
|
||||||
SELECT '';
|
SELECT '';
|
||||||
SELECT '';
|
SELECT '';
|
||||||
|
|
||||||
SELECT '========================================';
|
--SKIP 4 GRANUS
|
||||||
SELECT '| SKIP 4 GRANUS |';
|
--Required String: OLAP
|
||||||
SELECT '| Required String: OLAP |';
|
--No Alternative String
|
||||||
SELECT '| No Alternative String |';
|
SELECT
|
||||||
SELECT '========================================';
|
*
|
||||||
|
FROM
|
||||||
EXPLAIN indexes = 1 SELECT * FROM test_tokenbf_match.test_tokenbf where match(str, 'OLAP (.*?)*');
|
(
|
||||||
|
EXPLAIN indexes = 1
|
||||||
|
SELECT * FROM test_tokenbf_match.test_tokenbf where match(str, 'OLAP (.*?)*')
|
||||||
|
)
|
||||||
|
WHERE
|
||||||
|
explain like '%Granules%';
|
||||||
|
|
||||||
DROP DATABASE IF EXISTS test_tokenbf_match;
|
DROP DATABASE IF EXISTS test_tokenbf_match;
|
||||||
|
Loading…
Reference in New Issue
Block a user