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

Full Support "ad-hoc filter" variable type "values" filter #198

Closed
Slach opened this issue Jun 17, 2020 · 2 comments · Fixed by #222
Closed

Full Support "ad-hoc filter" variable type "values" filter #198

Slach opened this issue Jun 17, 2020 · 2 comments · Fixed by #222
Assignees

Comments

@Slach
Copy link
Collaborator

Slach commented Jun 17, 2020

the current implementation only supports Enum fields values
we need to add processing and cache SELECT DISTINCT field FROM table LIMIT X for getTagValues

@PeterZaitsev
Copy link

Right. You probably also want to use the current time range to this query so only relevant values pulled in

@Slach Slach closed this as completed in #222 Jul 6, 2020
Slach added a commit that referenced this issue Jul 6, 2020
- add adhoc values support, fix #198
- fix AST parsing corner case in `WHERE [test, 'test']` "," was skipped, fix ahdoc ast FROM recursive parsing
- fix corner cases for table functions parsing when adhoc filter applied, fix #99, fix #130
- actualize clickhouse_dashboard.json

Signed-off-by: Eugene Klimov <eklimov@altinity.com>
@Slach
Copy link
Collaborator Author

Slach commented Jul 6, 2020

@PeterZaitsev adhoc values filter basic functionality implemented
unfortunately, grafana core doesn't provide additional context to adhoc.ts functions, so only

SELECT DISTINCT {field} AS value FROM {database}.{table} LIMIT 300

was implement, it can be suboptimal for high cardinality values and make full column scan (PK scan or secondary index scan for some cases) in ClickHouse table

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 a pull request may close this issue.

2 participants