ClickHouse / ClickHouse/clickhouse-go
Null* isn't compatible with std interface
- Dominant language
- Go
- Stars
- 3.3k
- Forks
- 680
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 14
Description
### Issue description
Unable to read Rows from a Table that has Null Values anywhere using the 'database/sql' interface. Even though 'sql.Nullstring' is being used. Expected to be able scan into a slice of 'sql.Nulstring' but instead get an error.
### Example code
```
for rows.Next() {
columns := make([]sql.NullString, len(cols))
columnPointers := make([]interface{}, len(cols))
for i := range columns {
columnPointers[i] = &columns[i]
}
err = rows.Scan(columnPointers...)
// Error occured while scanning a row
if err != nil {
fmt.Println()
fmt.Println(err) ̑
fmt.Println()
}
```

### Error log
```
sql: Scan error on column index 0, name "col1": unsupported Scan, storing driver.Value type *string into type *string
```

### Configuration
*OS:* Ubuntu 20.04.4 LTS
*Interface:* `database/sql`
*Driver version:* v2.3.0
*Go version:* go version go1.18.2 linux/amd64
*ClickHouse Server version:* version 22.9.1
Contributor guide
Assessment
This issue has not been assessed yet.