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

golang part of plugin incorrect handle empty (rows=0) results from Clickhouse #335

Closed
Slach opened this issue Apr 14, 2021 · 4 comments · Fixed by #338
Closed

golang part of plugin incorrect handle empty (rows=0) results from Clickhouse #335

Slach opened this issue Apr 14, 2021 · 4 comments · Fixed by #338
Assignees

Comments

@Slach
Copy link
Collaborator

Slach commented Apr 14, 2021

need to research howto return "NODATA" instead of "ERROR" when we got empty result from ClickHouse

@Slach Slach self-assigned this Apr 14, 2021
@Slach
Copy link
Collaborator Author

Slach commented Apr 14, 2021

@bmanth60 JFYI

Slach added a commit to Altinity/grafana-plugin-repository that referenced this issue Apr 23, 2021
## Breaking changes

* On latest Grafana 7.x releases, template variables SQL queries shall return only scalar types of values, see Altinity/clickhouse-grafana#328

## Enhancement:

* add support Apple M1 ;)
* switch to new grafana plugin Golang SDK, thanks to @bmanth60 and @valeriakononenko for help
* add BasicAuth support for alerts, see Altinity/clickhouse-grafana#267

## Fixes:

* fix github actions backend build
* fix UNION ALL parsing, see Altinity/clickhouse-grafana#319
* fix many issues with alerting
  * Altinity/clickhouse-grafana#305
  * Altinity/clickhouse-grafana#327
  * Altinity/clickhouse-grafana#334
  * Altinity/clickhouse-grafana#335

Signed-off-by: Eugene Klimov <[email protected]>
@bmanth60
Copy link
Contributor

@Slach I read the PR, but I don't quite understand the fix, is it that there is a nullable and low cardinality type?

@Slach
Copy link
Collaborator Author

Slach commented Apr 24, 2021

the main goal of fix
for most corner cases shall return multiple data frames instead of just one data.Frame

each data.Frame for each exists time series with two fields (time, value)
String fields and complex type fields used as labels

Array(Tuple( which return after apply $macro converts to multiple data.Frames use first field as label, second field as value

also, SQL queries can return nullable values and DateTime64, so I add support for this corner cases

LowCardinality also supported for properly parsing label values

Also, if we return SQL result without a timestamp field
We just return one data.Frame which contains all fields

@bmanth60
Copy link
Contributor

Interesting, thanks!

daniellee pushed a commit to grafana/grafana-plugin-repository that referenced this issue Jun 2, 2021
## Breaking changes

* On latest Grafana 7.x releases, template variables SQL queries shall return only scalar types of values, see Altinity/clickhouse-grafana#328

## Enhancement:

* add support Apple M1 ;)
* switch to new grafana plugin Golang SDK, thanks to @bmanth60 and @valeriakononenko for help
* add BasicAuth support for alerts, see Altinity/clickhouse-grafana#267

## Fixes:

* fix github actions backend build
* fix UNION ALL parsing, see Altinity/clickhouse-grafana#319
* fix many issues with alerting
  * Altinity/clickhouse-grafana#305
  * Altinity/clickhouse-grafana#327
  * Altinity/clickhouse-grafana#334
  * Altinity/clickhouse-grafana#335

Signed-off-by: Eugene Klimov <[email protected]>
natoscott pushed a commit to natoscott/grafana-plugin-repository that referenced this issue Jul 12, 2021
## Breaking changes

* On latest Grafana 7.x releases, template variables SQL queries shall return only scalar types of values, see Altinity/clickhouse-grafana#328

## Enhancement:

* add support Apple M1 ;)
* switch to new grafana plugin Golang SDK, thanks to @bmanth60 and @valeriakononenko for help
* add BasicAuth support for alerts, see Altinity/clickhouse-grafana#267

## Fixes:

* fix github actions backend build
* fix UNION ALL parsing, see Altinity/clickhouse-grafana#319
* fix many issues with alerting
  * Altinity/clickhouse-grafana#305
  * Altinity/clickhouse-grafana#327
  * Altinity/clickhouse-grafana#334
  * Altinity/clickhouse-grafana#335

Signed-off-by: Eugene Klimov <[email protected]>
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