ClickHouse / ClickHouse/clickhouse-go

Default values are ignored in AppendStruct

Open
#587 12 comments 4 reactions 1 assignee Claimed by @gingerwizard View on GitHub
discuss enhancement
Dominant language
Go
Stars
3.3k
Forks
680
Avg merge
2d 3h
Merged PRs (30d)
14

Description

### Issue description
Altering table to add a new column causes an error

```
[AppendStruct]: missing destination name "" in "
```

even if I've specified a default value for the column.

Perhaps checking that column has a default value here might solve the issue.

https://github.com/ClickHouse/clickhouse-go/blob/ee79713daf7a10ba3b363797f74b0909be463b49/struct_map.go#L69-L74

### Configuration
*OS:* unrelated

*Interface:* E.g. `native`

*Driver version:* v2.0.12

*Go version:* unrelated

*ClickHouse Server version:* 20.10.6.27

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.