generated from grafana/grafana-starter-datasource-backend
-
Notifications
You must be signed in to change notification settings - Fork 88
Closed
Labels
Description
What happened:
It returned an error if a table contains a LowCardinality(Nullable(String)) column.
sql: Scan error on column index 0, name "src_tor_name": unsupported Scan, storing driver.Value type *string into type *string: Could not process SQL results
What you expected to happen:
It should return the data same as clickhouse-client.
How to reproduce it (as minimally and precisely as possible):
- Create a table with a LowCardinality(Nullable(String)) column, for example
CREATE TABLE pingmesh.test ON CLUSTER staging
(
`src_tor_name` LowCardinality(Nullable(String)),
`loss_count` Int64,
`unixtime` DateTime('Etc/UTC') CODEC(DoubleDelta)
)
ENGINE = ReplicatedMergeTree('/clickhouse/{installation}/{cluster}/tables/{shard}/pingmesh/test', '{replica}')
PARTITION BY toYYYYMMDD(unixtime)
PRIMARY KEY unixtime
ORDER BY unixtime
SETTINGS index_granularity = 8192
- Insert some data
INSERT INTO pingmesh.test (*) VALUES ('test', 0, 0)
- Query the data from clickhouse client. It works fine.
> SELECT * FROM "pingmesh"."test" LIMIT 10
SELECT *
FROM pingmesh.test
LIMIT 10
Query id: fd6dea33-12b2-4ae2-aaa4-c2e8601742cf
┌─src_tor_name─┬─loss_count─┬────────────unixtime─┐
│ test │ 0 │ 1970-01-01 00:00:00 │
└──────────────┴────────────┴─────────────────────┘
1 row in set. Elapsed: 0.001 sec.
Screenshots
Anything else we need to know?:
- I was upgrade Grafana recently to the newest 10.4.3. The previous version I used is 10.2.3, which was working fine.
- I tested with Nullable(String) or LowCardinality(String) DEFAULT '' columns, the plugin works as expected.
Environment:
- Grafana version: 10.4.3
- Plugin version: 4.0.7
- OS Grafana is installed on: Grafana official docker image
- User OS & Browser: macOS 13.5.2, Chrome
- Others:
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done