grafana / sqlds

A package that assists writing SQL-driven datasources
Apache License 2.0
17 stars 12 forks source link

Macros that have nested functions with multi params do not work #97

Closed bossinc closed 12 months ago

bossinc commented 1 year ago

This is coming from https://github.com/grafana/clickhouse-datasource/issues/454

If you have a macro that is expecting one param like $__singleParamMacro and you nest a function in that macro like $__singleParamMacro(nestedFunc("foo","bar")) it will split on the comma resulting in two params nestedFunc("foo" and "bar")

We need an RE that does not find commas in nested () and [].