Closed monchickey closed 6 months ago
Hi @monchickey
I've addressed panic in this issue: https://github.com/ClickHouse/clickhouse-go/pull/1249
Unnamed tuple scan is supported only against struct, map or slice. If you want to use any
/interface{}
use named tuple.
Describe the bug
When the field type in the data table is Tuple(Tuple(UInt16, UInt16), Tuple(UInt16, UInt16)), an error will be reported when querying using the
database/sql
interface. An error will also be reported when using thenative
interface to query without specifying a specific type.Steps to reproduce
Expected behaviour
The following code runs the query and it should execute normally.
Code example
1. Query using
database/sql
interfaceThe error message:
panic at
rows.Next
2. Query using
native
interface (Use reflection type to receive)The error message:
panic at
rows.Scan
, TheScanType
of columnsegment
is returned as[]interface{}
, Using the[][]interface{}
type receives normallyThis code can run successfully.
Configuration
Environment
ClickHouse server
CREATE TABLE
statements for tables involved: exist in previous steps