Skip to content

Commit 657b885

Browse files
committed
fix assertion in text index merge with projections
1 parent f190090 commit 657b885

3 files changed

Lines changed: 18 additions & 1 deletion

File tree

src/Storages/MergeTree/MergeTask.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1513,7 +1513,7 @@ bool MergeTask::MergeProjectionsStage::mergeMinMaxIndexAndPrepareProjections() c
15131513
ReadableSize(global_ctx->merge_list_element_ptr->bytes_read_uncompressed / elapsed_seconds));
15141514
}
15151515

1516-
if (global_ctx->merged_part_offsets && !global_ctx->projections_to_merge.empty())
1516+
if (global_ctx->merged_part_offsets && !global_ctx->merged_part_offsets->isFinalized())
15171517
global_ctx->merged_part_offsets->flush();
15181518

15191519
for (const auto & projection : global_ctx->projections_to_merge)

tests/queries/0_stateless/03774_text_index_projection_fuzzer.reference

Whitespace-only changes.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
SET enable_full_text_index = 1;
2+
DROP TABLE IF EXISTS t0;
3+
4+
CREATE TABLE t0
5+
(
6+
c0 Array(String),
7+
INDEX i0 c0 TYPE text(tokenizer = sparseGrams),
8+
PROJECTION p0 (SELECT c0 ORDER BY c0)
9+
)
10+
ENGINE = MergeTree() ORDER BY tuple();
11+
12+
INSERT INTO TABLE t0 (c0) VALUES (['A']);
13+
INSERT INTO TABLE t0 (c0) VALUES (['B']);
14+
15+
OPTIMIZE TABLE t0 FINAL;
16+
17+
DROP TABLE t0;

0 commit comments

Comments
 (0)