Skip to content

Commit

Permalink
fix: init columnPointers every loop to avoid value reference the same…
Browse files Browse the repository at this point in the history
… address when value is null
  • Loading branch information
YenchangChan committed Mar 26, 2024
1 parent 378c870 commit 8794931
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions service/clickhouse/clickhouse_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,9 @@ func (ck *CkService) QueryInfo(query string) ([][]interface{}, error) {
for i := range columnPointers {
val := reflect.ValueOf(columnPointers[i]).Elem()
m[i] = val.Interface()
if val.CanSet() {
val.SetZero()
}
}

colData = append(colData, m)
Expand Down

0 comments on commit 8794931

Please sign in to comment.