Skip to content
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

feat: query split #301

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

Conversation

AleksandrMatsko
Copy link
Contributor

@AleksandrMatsko AleksandrMatsko commented Jan 28, 2025

PR summary

Add options to config:

  • try-split-query (default: false). On true graphite-clickhouse will split a query with {} in it into multiple queries.
  • max-node-to-split-index (default: 0). Works only if try-split-query = true. Will not split query if both lists are at index greater than this param.

For example: {a,b,c}.some.metric will be split into a.some.metric, b.some.metric, c.some.metric. Only one {} will be split.
There some cases then query will not be split:

  • beacuse of not satisfing max-node-to-split-index condition;
  • because query has wildcard before {};

After that conditions for multiple graphite queries are aggregated into single SQL query.

@AleksandrMatsko AleksandrMatsko marked this pull request as ready for review January 29, 2025 10:15
@kissken kissken requested a review from mchrome January 30, 2025 09:12
doc/config.md Outdated Show resolved Hide resolved
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.

3 participants