Skip to content

feature: Use has instead of arrayExists where possible #311

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

Tetrergeru
Copy link
Collaborator

@Tetrergeru Tetrergeru commented Apr 29, 2025

Clickhouse of version 22.12.3 can not apply tokenbf_v1 skip indices to queries with arrayExists(x -> x = '...', Tags), but can for queries with has(Tags, '...')

This PR replaces arrayExists with has in TaggedTermWhereN function, to allow usage of tokenbf_v1 index

Example of index that can be used:

ALTER TABLE <carbon_clickhouse_table_tags> 
ADD INDEX IF NOT EXISTS tags_array_bloom_skip_idx Tags
TYPE tokenbf_v1(16384, 3, 0) GRANULARITY 1;

@Tetrergeru Tetrergeru requested review from msaf1980 and mchrome April 29, 2025 07:35
@Tetrergeru Tetrergeru marked this pull request as ready for review April 29, 2025 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants