Skip to content

Commit 979a47d

Browse files
Merge pull request ClickHouse#79201 from rschu1ze/full-storage-gin
Force full storage for GIN tests
2 parents 0be0798 + 5778abf commit 979a47d

11 files changed

+50
-29
lines changed

tests/parallel_replicas_blacklist.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,6 @@
355355
02149_read_in_order_fixed_prefix
356356
02151_hash_table_sizes_stats
357357
02156_storage_merge_prewhere
358-
02346_gin_index_match_predicate
359358
02354_vector_search_subquery
360359
02421_explain_subquery
361360
02451_order_by_monotonic

tests/queries/0_stateless/02346_gin_index_bug47393.sql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ CREATE TABLE tab
1111
)
1212
ENGINE = MergeTree
1313
ORDER BY tuple()
14-
SETTINGS min_rows_for_wide_part = 1, min_bytes_for_wide_part = 1;
14+
SETTINGS min_rows_for_wide_part = 1, min_bytes_for_wide_part = 1,
15+
min_bytes_for_full_part_storage = 0; -- GIN indexes currently don't work with packed parts
1516

1617
INSERT INTO tab (str) VALUES ('I am inverted');
1718

tests/queries/0_stateless/02346_gin_index_bug52019.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ CREATE TABLE tab (
1212
ENGINE = MergeTree
1313
ORDER BY id
1414
SETTINGS index_granularity = 2, index_granularity_bytes = '10Mi',
15-
min_bytes_for_full_part_storage = 0; -- GIN index works only with full parts.
15+
min_bytes_for_full_part_storage = 0; -- GIN indexes currently don't work with packed parts
1616

1717
INSERT INTO tab (id) VALUES (0);
1818

tests/queries/0_stateless/02346_gin_index_bug54541.sql

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,16 @@ SET allow_experimental_full_text_index = 1;
44

55
DROP TABLE IF EXISTS tab;
66

7-
CREATE TABLE tab (id UInt32, str String, INDEX idx str TYPE gin) ENGINE = MergeTree ORDER BY id;
7+
CREATE TABLE tab
8+
(
9+
id UInt32,
10+
str String,
11+
INDEX idx str TYPE gin
12+
)
13+
ENGINE = MergeTree
14+
ORDER BY id
15+
SETTINGS min_bytes_for_full_part_storage = 0; -- GIN indexes currently don't work with packed parts
16+
817
INSERT INTO tab VALUES (0, 'a');
918
SELECT * FROM tab WHERE str == 'b' AND 1.0;
1019

tests/queries/0_stateless/02346_gin_index_bug59039.sql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ CREATE TABLE tab
1313
)
1414
ENGINE = MergeTree
1515
ORDER BY id
16-
SETTINGS index_granularity = 2, index_granularity_bytes = '10Mi', min_bytes_for_wide_part = 0, min_rows_for_wide_part = 0;
16+
SETTINGS index_granularity = 2, index_granularity_bytes = '10Mi', min_bytes_for_wide_part = 0, min_rows_for_wide_part = 0,
17+
min_bytes_for_full_part_storage = 0; -- GIN indexes currently don't work with packed parts
1718

1819
ALTER TABLE tab DROP INDEX text_idx;
1920

tests/queries/0_stateless/02346_gin_index_detach_attach.sql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ CREATE TABLE t
99
INDEX inv_idx str TYPE gin(0) GRANULARITY 1
1010
)
1111
ENGINE = MergeTree
12-
ORDER BY key;
12+
ORDER BY key
13+
SETTINGS min_bytes_for_full_part_storage = 0; -- GIN indexes currently don't work with packed parts
1314

1415
INSERT INTO t VALUES (1, 'Hello World');
1516

tests/queries/0_stateless/02346_gin_index_legacy_name.sql

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ DROP TABLE IF EXISTS tab;
88

99
-- Creation only works with the (old) setting enabled.
1010
SET allow_experimental_inverted_index = 0;
11-
CREATE TABLE tab(k UInt64, s String, INDEX idx(s) TYPE inverted(2)) ENGINE = MergeTree() ORDER BY k; -- { serverError ILLEGAL_INDEX }
11+
CREATE TABLE tab(k UInt64, s String, INDEX idx(s) TYPE inverted(2)) ENGINE = MergeTree() ORDER BY k SETTINGS min_bytes_for_full_part_storage = 0; -- { serverError ILLEGAL_INDEX }
1212

1313
SET allow_experimental_inverted_index = 1;
14-
CREATE TABLE tab(k UInt64, s String, INDEX idx(s) TYPE inverted(2)) ENGINE = MergeTree() ORDER BY k;
14+
CREATE TABLE tab(k UInt64, s String, INDEX idx(s) TYPE inverted(2)) ENGINE = MergeTree() ORDER BY k SETTINGS min_bytes_for_full_part_storage = 0;
1515
INSERT INTO tab VALUES (1, 'ab') (2, 'bc');
1616

1717
-- Detach and attach should work.
@@ -40,10 +40,10 @@ DROP TABLE tab;
4040

4141
-- Creation only works with the (old) setting enabled.
4242
SET allow_experimental_full_text_index = 0;
43-
CREATE TABLE tab(k UInt64, s String, INDEX idx(s) TYPE full_text(2)) ENGINE = MergeTree() ORDER BY k; -- { serverError ILLEGAL_INDEX }
43+
CREATE TABLE tab(k UInt64, s String, INDEX idx(s) TYPE full_text(2)) ENGINE = MergeTree() ORDER BY k SETTINGS min_bytes_for_full_part_storage = 0; -- { serverError ILLEGAL_INDEX }
4444

4545
SET allow_experimental_full_text_index = 1;
46-
CREATE TABLE tab(k UInt64, s String, INDEX idx(s) TYPE full_text(2)) ENGINE = MergeTree() ORDER BY k;
46+
CREATE TABLE tab(k UInt64, s String, INDEX idx(s) TYPE full_text(2)) ENGINE = MergeTree() ORDER BY k SETTINGS min_bytes_for_full_part_storage = 0;
4747
INSERT INTO tab VALUES (1, 'ab') (2, 'bc');
4848

4949
-- Detach and attach should work.

tests/queries/0_stateless/02346_gin_index_match_predicate.sql

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
-- Tags: no-parallel-replicas
2+
13
-- Tests that match() utilizes the inverted index
24

35
SET allow_experimental_full_text_index = true;
@@ -12,8 +14,8 @@ CREATE TABLE tab
1214
)
1315
ENGINE = MergeTree
1416
ORDER BY id
15-
SETTINGS index_granularity = 1;
16-
17+
SETTINGS index_granularity = 1,
18+
min_bytes_for_full_part_storage = 0; -- GIN indexes currently don't work with packed parts
1719
INSERT INTO tab VALUES (1, 'Well, Hello ClickHouse !'), (2, 'Well, Hello World !'), (3, 'Good Weather !'), (4, 'Say Hello !'), (5, 'Its An OLAP Database'), (6, 'True World Champion');
1820

1921
SELECT * FROM tab WHERE match(str, ' Hello (ClickHouse|World) ') ORDER BY id;

tests/queries/0_stateless/02346_gin_index_on_multiple_columns.sql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ CREATE TABLE tab (
1010
INDEX idx (v0, v1) TYPE gin GRANULARITY 1)
1111
ENGINE = MergeTree
1212
ORDER BY tuple()
13-
SETTINGS index_granularity = 1;
13+
SETTINGS index_granularity = 1,
14+
min_bytes_for_full_part_storage = 0; -- GIN indexes currently don't work with packed parts
1415

1516
INSERT INTO tab VALUES('0,0', '0,1')('2,2','2,3');
1617

tests/queries/0_stateless/02346_gin_index_queries.sql

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ DROP TABLE IF EXISTS tab;
1212

1313
CREATE TABLE tab(k UInt64, s String, INDEX af(s) TYPE gin(2))
1414
ENGINE = MergeTree() ORDER BY k
15-
SETTINGS index_granularity = 2, index_granularity_bytes = '10Mi';
15+
SETTINGS index_granularity = 2, index_granularity_bytes = '10Mi',
16+
min_bytes_for_full_part_storage = 0; -- GIN indexes currently don't work with packed parts
1617

1718
INSERT INTO tab VALUES (101, 'Alick a01'), (102, 'Blick a02'), (103, 'Click a03'), (104, 'Dlick a04'), (105, 'Elick a05'), (106, 'Alick a06'), (107, 'Blick a07'), (108, 'Click a08'), (109, 'Dlick a09'), (110, 'Elick a10'), (111, 'Alick b01'), (112, 'Blick b02'), (113, 'Click b03'), (114, 'Dlick b04'), (115, 'Elick b05'), (116, 'Alick b06'), (117, 'Blick b07'), (118, 'Click b08'), (119, 'Dlick b09'), (120, 'Elick b10');
1819

@@ -68,7 +69,8 @@ DROP TABLE IF EXISTS tab_x;
6869

6970
CREATE TABLE tab_x(k UInt64, s String, INDEX af(s) TYPE gin())
7071
ENGINE = MergeTree() ORDER BY k
71-
SETTINGS index_granularity = 2, index_granularity_bytes = '10Mi';
72+
SETTINGS index_granularity = 2, index_granularity_bytes = '10Mi',
73+
min_bytes_for_full_part_storage = 0; -- GIN indexes currently don't work with packed parts
7274

7375
INSERT INTO tab_x VALUES (101, 'x Alick a01 y'), (102, 'x Blick a02 y'), (103, 'x Click a03 y'), (104, 'x Dlick a04 y'), (105, 'x Elick a05 y'), (106, 'x Alick a06 y'), (107, 'x Blick a07 y'), (108, 'x Click a08 y'), (109, 'x Dlick a09 y'), (110, 'x Elick a10 y'), (111, 'x Alick b01 y'), (112, 'x Blick b02 y'), (113, 'x Click b03 y'), (114, 'x Dlick b04 y'), (115, 'x Elick b05 y'), (116, 'x Alick b06 y'), (117, 'x Blick b07 y'), (118, 'x Click b08 y'), (119, 'x Dlick b09 y'), (120, 'x Elick b10 y');
7476

@@ -121,7 +123,8 @@ DROP TABLE IF EXISTS tab;
121123

122124
create table tab (k UInt64, s Array(String), INDEX af(s) TYPE gin(2))
123125
ENGINE = MergeTree() ORDER BY k
124-
SETTINGS index_granularity = 2, index_granularity_bytes = '10Mi';
126+
SETTINGS index_granularity = 2, index_granularity_bytes = '10Mi',
127+
min_bytes_for_full_part_storage = 0; -- GIN indexes currently don't work with packed parts
125128

126129
INSERT INTO tab SELECT rowNumberInBlock(), groupArray(s) FROM tab_x GROUP BY k%10;
127130

@@ -148,7 +151,8 @@ DROP TABLE IF EXISTS tab;
148151

149152
CREATE TABLE tab (k UInt64, s Map(String,String), INDEX af(mapKeys(s)) TYPE gin(2))
150153
ENGINE = MergeTree() ORDER BY k
151-
SETTINGS index_granularity = 2, index_granularity_bytes = '10Mi';
154+
SETTINGS index_granularity = 2, index_granularity_bytes = '10Mi',
155+
min_bytes_for_full_part_storage = 0; -- GIN indexes currently don't work with packed parts
152156

153157
INSERT INTO tab VALUES (101, {'Alick':'Alick a01'}), (102, {'Blick':'Blick a02'}), (103, {'Click':'Click a03'}), (104, {'Dlick':'Dlick a04'}), (105, {'Elick':'Elick a05'}), (106, {'Alick':'Alick a06'}), (107, {'Blick':'Blick a07'}), (108, {'Click':'Click a08'}), (109, {'Dlick':'Dlick a09'}), (110, {'Elick':'Elick a10'}), (111, {'Alick':'Alick b01'}), (112, {'Blick':'Blick b02'}), (113, {'Click':'Click b03'}), (114, {'Dlick':'Dlick b04'}), (115, {'Elick':'Elick b05'}), (116, {'Alick':'Alick b06'}), (117, {'Blick':'Blick b07'}), (118, {'Click':'Click b08'}), (119, {'Dlick':'Dlick b09'}), (120, {'Elick':'Elick b10'});
154158

@@ -189,7 +193,8 @@ DROP TABLE IF EXISTS tab;
189193

190194
CREATE TABLE tab(k UInt64, s String, INDEX af(s) TYPE gin(2))
191195
ENGINE = MergeTree() ORDER BY k
192-
SETTINGS index_granularity = 2, index_granularity_bytes = '10Mi';
196+
SETTINGS index_granularity = 2, index_granularity_bytes = '10Mi',
197+
min_bytes_for_full_part_storage = 0; -- GIN indexes currently don't work with packed parts
193198

194199
INSERT INTO tab VALUES (101, 'Alick a01'), (102, 'Blick a02'), (103, 'Click a03'), (104, 'Dlick a04'), (105, 'Elick a05'), (106, 'Alick a06'), (107, 'Blick a07'), (108, 'Click a08'), (109, 'Dlick a09'), (110, 'Elick b10'), (111, 'Alick b01'), (112, 'Blick b02'), (113, 'Click b03'), (114, 'Dlick b04'), (115, 'Elick b05'), (116, 'Alick b06'), (117, 'Blick b07'), (118, 'Click b08'), (119, 'Dlick b09'), (120, 'Elick b10');
195200
INSERT INTO tab VALUES (201, 'rick c01'), (202, 'mick c02'), (203, 'nick c03');
@@ -218,7 +223,8 @@ DROP TABLE IF EXISTS tab;
218223
CREATE TABLE tab(k UInt64, s String, INDEX af(s) TYPE gin(2))
219224
ENGINE = MergeTree()
220225
ORDER BY k
221-
SETTINGS index_granularity = 2, index_granularity_bytes = '10Mi';
226+
SETTINGS index_granularity = 2, index_granularity_bytes = '10Mi',
227+
min_bytes_for_full_part_storage = 0; -- GIN indexes currently don't work with packed parts
222228

223229
INSERT INTO tab VALUES (101, 'Alick 好'), (102, 'clickhouse你好'), (103, 'Click 你'), (104, 'Dlick 你a好'), (105, 'Elick 好好你你'), (106, 'Alick 好a好a你a你');
224230

@@ -248,11 +254,12 @@ DROP TABLE IF EXISTS tab;
248254
CREATE TABLE tab(k UInt64, s String, INDEX af(s) TYPE gin(0, 12040))
249255
Engine=MergeTree
250256
ORDER BY (k)
257+
SETTINGS min_bytes_for_full_part_storage = 0
251258
AS
252-
SELECT
253-
number,
254-
format('{},{},{},{}', hex(12345678), hex(87654321), hex(number/17 + 5), hex(13579012)) as s
255-
FROM numbers(1024);
259+
(SELECT
260+
number,
261+
format('{},{},{},{}', hex(12345678), hex(87654321), hex(number/17 + 5), hex(13579012)) as s
262+
FROM numbers(1024));
256263
SELECT count(s) FROM tab WHERE hasToken(s, '4C4B4B4B4B4B5040');
257264
DROP TABLE IF EXISTS tab;
258265

@@ -261,8 +268,9 @@ DROP TABLE IF EXISTS tab;
261268
CREATE TABLE tab(k UInt64, s String, INDEX af(s) TYPE gin(3, 123))
262269
Engine=MergeTree
263270
ORDER BY (k)
271+
SETTINGS min_bytes_for_full_part_storage = 0
264272
AS
265-
SELECT
266-
number,
267-
format('{},{},{},{}', hex(12345678), hex(87654321), hex(number/17 + 5), hex(13579012)) as s
268-
FROM numbers(1024); -- { serverError INCORRECT_QUERY }
273+
(SELECT
274+
number,
275+
format('{},{},{},{}', hex(12345678), hex(87654321), hex(number/17 + 5), hex(13579012)) as s
276+
FROM numbers(1024)); -- { serverError INCORRECT_QUERY }

tests/queries/0_stateless/03165_string_functions_with_token_text_indexes.sql

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,7 @@ CREATE TABLE 03165_token_ft
128128
)
129129
ENGINE = MergeTree
130130
ORDER BY id
131-
-- Full text index works only with full parts.
132-
SETTINGS min_bytes_for_full_part_storage=0;
131+
SETTINGS min_bytes_for_full_part_storage = 0; -- GIN indexes currently don't work with packed parts
133132

134133
INSERT INTO 03165_token_ft VALUES(1, 'Service is not ready');
135134

0 commit comments

Comments
 (0)