Closed afagundes closed 7 months ago
@afagundes =) looks like you located issue in https://github.com/grafana/clickhouse-datasource/, but this is a different plugin, please clarify, do you use Altinity ClickHouse plugin for Grafana or Grafana ClickHouse Datasource?
Hi @Slach. Apologies, I opened this issue in the wrong project. I'll close it now and open a new one in the correct repository. Thanks!
We discovered a potential problem in the ad-hoc filters where fields of type varchar containing numeric values are assessed as numbers. The values are appended to the final query without quotation marks, resulting in the following error:
This particular field is a
LowCardinality(String)
whose values are something like '1', '1000' or 'C'.Investigating the source code, I found this line that casts numeric values:
when I change the code to treat all values as strings, all filters work as expected.
I'm not sure if this is the best approach, since it forces Clickhouse to do the conversion. But in my tests I didn't feel any performance issues.
If it's ok, I'll submit a pull request with the change.