diff --git a/tests/queries/0_stateless/02943_tokenbf_support_match.reference b/tests/queries/0_stateless/02943_tokenbf_support_match.reference index 241346c13d7..d02011eb2a1 100644 --- a/tests/queries/0_stateless/02943_tokenbf_support_match.reference +++ b/tests/queries/0_stateless/02943_tokenbf_support_match.reference @@ -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 - Skip - Name: str_idx - Description: tokenbf_v1 GRANULARITY 1 - Parts: 1/1 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 - Skip - Name: str_idx - Description: tokenbf_v1 GRANULARITY 1 - Parts: 1/1 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 - Skip - Name: str_idx - Description: tokenbf_v1 GRANULARITY 1 - Parts: 1/1 Granules: 1/5 diff --git a/tests/queries/0_stateless/02943_tokenbf_support_match.sql b/tests/queries/0_stateless/02943_tokenbf_support_match.sql index 2a98151624c..b48eb45c0d0 100644 --- a/tests/queries/0_stateless/02943_tokenbf_support_match.sql +++ b/tests/queries/0_stateless/02943_tokenbf_support_match.sql @@ -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'); -SELECT '========================================'; -SELECT '| SKIP 3 GRANUS |'; -SELECT '| Required String: Hello |'; -SELECT '| Alternative String: Hello ClickHouse |'; -SELECT '| Alternative String: Hello World |'; -SELECT '========================================'; +--SKIP 3 GRANUS +--Required String: Hello +--Alternative String: Hello ClickHouse +--Alternative String: Hello World +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 '| 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 '| SKIP 4 GRANUS |'; -SELECT '| Required String: OLAP |'; -SELECT '| No Alternative String |'; -SELECT '========================================'; - -EXPLAIN indexes = 1 SELECT * FROM test_tokenbf_match.test_tokenbf where match(str, 'OLAP (.*?)*'); +--SKIP 4 GRANUS +--Required String: OLAP +--No Alternative String +SELECT + * +FROM +( + 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;