Skip to content

SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.

chore: read double pointer numbers from result (#5300)

Srikanth Chekuri873280abea63
diff --git a/pkg/query-service/app/clickhouseReader/reader.go b/pkg/query-service/app/clickhouseReader/reader.go
index 33b8e7ec08..20eb11d479 100644
--- a/pkg/query-service/app/clickhouseReader/reader.go
+++ b/pkg/query-service/app/clickhouseReader/reader.go
@@ -4444,6 +4444,21 @@ func readRow(vars []interface{}, columnNames []string, countOfNumberCols int) ([
}
groupAttributes[colName] = fmt.Sprintf("%v", reflect.ValueOf(v).Elem().Float())
}
+ case **float64, **float32:
+ val := reflect.ValueOf(v)
+ if val.IsValid() && !val.IsNil() && !val.Elem().IsNil() {
+ isValidPoint = true
+ value := reflect.ValueOf(v).Elem().Elem().Float()
+ if _, ok := constants.ReservedColumnTargetAliases[colName]; ok || countOfNumberCols == 1 {
+ point.Value = value
+ } else {
+ groupBy = append(groupBy, fmt.Sprintf("%v", value))
+ if _, ok := groupAttributes[colName]; !ok {
+ groupAttributesArray = append(groupAttributesArray, map[string]string{colName: fmt.Sprintf("%v", value)})
+ }
+ groupAttributes[colName] = fmt.Sprintf("%v", value)
+ }
+ }
case *uint, *uint8, *uint64, *uint16, *uint32:
isValidPoint = true
if _, ok := constants.ReservedColumnTargetAliases[colName]; ok || countOfNumberCols == 1 {
@@ -4455,6 +4470,21 @@ func readRow(vars []interface{}, columnNames []string, countOfNumberCols int) ([
}
groupAttributes[colName] = fmt.Sprintf("%v", reflect.ValueOf(v).Elem().Uint())
}
+ case **uint, **uint8, **uint64, **uint16, **uint32:
+ val := reflect.ValueOf(v)
+ if val.IsValid() && !val.IsNil() && !val.Elem().IsNil() {
+ isValidPoint = true
+ value := reflect.ValueOf(v).Elem().Elem().Uint()
+ if _, ok := constants.ReservedColumnTargetAliases[colName]; ok || countOfNumberCols == 1 {
+ point.Value = float64(value)
+ } else {
+ groupBy = append(groupBy, fmt.Sprintf("%v", value))
+ if _, ok := groupAttributes[colName]; !ok {
+ groupAttributesArray = append(groupAttributesArray, map[string]string{colName: fmt.Sprintf("%v", value)})
+ }
+ groupAttributes[colName] = fmt.Sprintf("%v", value)
+ }
+ }
case *int, *int8, *int16, *int32, *int64:
isValidPoint = true
if _, ok := constants.ReservedColumnTargetAliases[colName]; ok || countOfNumberCols == 1 {
@@ -4466,6 +4496,21 @@ func readRow(vars []interface{}, columnNames []string, countOfNumberCols int) ([
}
groupAttributes[colName] = fmt.Sprintf("%v", reflect.ValueOf(v).Elem().Int())
}
+ case **int, **int8, **int16, **int32, **int64:
+ val := reflect.ValueOf(v)
+ if val.IsValid() && !val.IsNil() && !val.Elem().IsNil() {
+ isValidPoint = true
+ value := reflect.ValueOf(v).Elem().Elem().Int()
+ if _, ok := constants.ReservedColumnTargetAliases[colName]; ok || countOfNumberCols == 1 {
+ point.Value = float64(value)
+ } else {
+ groupBy = append(groupBy, fmt.Sprintf("%v", value))
+ if _, ok := groupAttributes[colName]; !ok {
+ groupAttributesArray = append(groupAttributesArray, map[string]string{colName: fmt.Sprintf("%v", value)})
+ }
+ groupAttributes[colName] = fmt.Sprintf("%v", value)
+ }
+ }
case *bool:
groupBy = append(groupBy, fmt.Sprintf("%v", *v))
if _, ok := groupAttributes[colName]; !ok {