Skip to content

Commit 49aff3c

Browse files
authored
fix(clickhouse): use compatible logs text index syntax (#4704)
## Summary Allow the logs search schema migration to run on ClickHouse versions that require text index options to be literals. ## Root cause The text index declared `lowerUTF8(search_text)` as a preprocessor option. Some ClickHouse versions reject that column expression while parsing index settings. The projected `search_text` is already normalized to lowercase before insertion, so removing the redundant preprocessor preserves search behavior. Verified with the task events search integration tests.
1 parent b939045 commit 49aff3c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

internal-packages/clickhouse/schema/040_create_task_events_search_v2.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ CREATE TABLE IF NOT EXISTS trigger_dev.task_events_search_v2
3636

3737
INDEX idx_run_id run_id TYPE bloom_filter(0.001) GRANULARITY 1,
3838
INDEX idx_search_text search_text
39-
TYPE text(tokenizer = 'ngrams', preprocessor = lowerUTF8(search_text))
39+
TYPE text(tokenizer = 'ngrams')
4040
)
4141
ENGINE = ReplacingMergeTree
4242
PARTITION BY toDate(inserted_at)

0 commit comments

Comments
 (0)