ClickHouse / ClickHouse/clickhouse-go
`ProfileInfo` not available when using `HTTP` protocol?
- Dominant language
- Go
- Stars
- 3.3k
- Forks
- 684
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 14
Description
```go
db := clickhouse.OpenDB(&clickhouse.Options{
Addr: []string{hostHTTP},
Auth: clickhouse.Auth{
Username: username,
Password: password,
},
Protocol: clickhouse.HTTP,
TLS: &tls.Config{},
})
var profileInfo *clickhouse.ProfileInfo
ctx := clickhouse.Context(
context.Background(),
clickhouse.WithProfileInfo(func(pi *clickhouse.ProfileInfo) {
if pi != nil {
profileInfo = pi
}
}),
)
rows, err := db.QueryContext(ctx, "select * from numbers(100)")
if err != nil {
panic(err)
}
defer rows.Close()
for rows.Next() {
}
fmt.Printf("profileInfo: %v\n", profileInfo)
```
I am unable to get it using the above code. But the same works when using `Native` protocol.
Client version: v2.11.0
Contributor guide
Research direction
Reproduce the provided Go example using clickhouse.OpenDB, clickhouse.HTTP, and clickhouse.WithProfileInfo, then compare its behavior with the Native protocol. Trace how the query rows are consumed and how ProfileInfo is delivered; done means the HTTP example populates profileInfo consistently with Native, with regression coverage for the reported behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- database
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100