You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello! Yep that's the exact code that came to mind when I read the title.
We should be able to logically separate out the function from the column name, since they are two different things
There's many edge cases to consider. I think in this case the best workaround is to manually add the quotes when selecting the column. There's too many cases where users are trying to write functions and they get escaped with quotes. You should be able to manually type in the column name with quotes. I understand this is inconvenient. If you have any suggestions on how we can best accommodate both, I'm open to ideas and PRs.
(cross-posting from 103501 in the Grafana repo)
What happened?
If a column name contains parentheses, the query builder fails to generate the correct SQL statements.
For example, let's say we have a Clickhouse data source that has a table with the following columns:
When selecting those two columns, the query builder generates this SQL:
What did you expect to happen?
The correct SQL should be generated (i.e.
Length (Kilometers)
should be enclosed in double quotes):Did this work before?
Not sure
How do we reproduce it?
See example provided above
Is the bug inside a dashboard panel?
No response
Environment (with versions)?
Grafana: 11.6.0
OS: MacOS
Browser: Safari
Grafana platform?
Kubernetes
Datasource(s)?
Clickhouse Datasource plugin
The text was updated successfully, but these errors were encountered: