From 879493189097abf6f41fdb50a2fc7af9dba08de7 Mon Sep 17 00:00:00 2001 From: YenchangChan Date: Tue, 26 Mar 2024 16:50:14 +0800 Subject: [PATCH] fix: init columnPointers every loop to avoid value reference the same address when value is null --- service/clickhouse/clickhouse_service.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/service/clickhouse/clickhouse_service.go b/service/clickhouse/clickhouse_service.go index a942c3a9..5cbeb5c9 100644 --- a/service/clickhouse/clickhouse_service.go +++ b/service/clickhouse/clickhouse_service.go @@ -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)