Skip to content

Commit

Permalink
fix(chsql): pass proper columns to results
Browse files Browse the repository at this point in the history
  • Loading branch information
tdakkota committed Jun 7, 2024
1 parent 5eb101c commit 7b7ddd0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/chstorage/chsql/select.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,11 @@ func (q *SelectQuery) Prepare(onResult OnResult) (ch.Query, error) {
// Results returns list of result columns.
func (q *SelectQuery) Results() (r proto.Results) {
r = make(proto.Results, len(q.columns))
for _, c := range q.columns {
r = append(r, proto.ResultColumn{
for i, c := range q.columns {
r[i] = proto.ResultColumn{
Name: c.Name,
Data: c.Data,
})
}
}
return r
}
Expand Down

0 comments on commit 7b7ddd0

Please sign in to comment.