-
Notifications
You must be signed in to change notification settings - Fork 121
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
Cannot correctly escape table name containing "-" symbol #440
Comments
Sorry for late response, could you share your ogirinal query with $table macro? |
original query:
generated sql:
|
lets wait when grafana team will review https://github.com/Altinity/clickhouse-grafana/releases/tag/v2.5.1 |
Cool! |
BTW, I'm wondering about when would the I think when I click the "Generated SQL" button, the |
same changes applied to golang part to |
We still need to wait for Grafana team to update something before 2.5.1 will work ? |
@visago 2.5.1 released on grafana.com, just install new plugin version |
Ah ! okay, yeah just did a grafana-cli plugins install vertamedia-clickhouse-datasource 2.5.1 ! |
I just tested 2.5.1 and getting the same issue. I noticed escapeTableIdentifier function was created in src/sql_query.ts, but its not called like in the go code ? https://github.com/Altinity/clickhouse-grafana/blob/master/src/sql_query.ts#L122-L125 |
Oh, sorry, my fault ;( |
@visago 2.5.2 released, please test |
@Slach tested and verified working ! Thanks so much for the quick response ! |
Suppose database name is "test", table name is "a.b.c-d", then the escaped result is "test.a.b.c-d", it will lead to syntax error in sql.
Expected result is "test.
a.b.c-d
", it will work.Maybe some change shoule be made to
func (q *EvalQuery) escapeIdentifier(identifier string) string
?The text was updated successfully, but these errors were encountered: