Skip to content

Commit

Permalink
feat: 修复维度为数字类型的兼容问题 --story=118349378 (#420)
Browse files Browse the repository at this point in the history
  • Loading branch information
shamcleren authored Jul 4, 2024
1 parent a08030f commit b0c70a6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/unify-query/tsdb/elasticsearch/agg_format.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ func (a *aggFormat) ts(idx int, data elastic.Aggregations) error {
dec := json.NewDecoder(strings.NewReader(string(value)))
var val string
if err := dec.Decode(&val); err != nil {
return err
// 兼容无需 json 转义的类型,直接转换为字符串
val = string(value)
}
a.addLabel(info.Name, val)
if err := a.ts(idx, bucket.Aggregations); err != nil {
Expand Down

0 comments on commit b0c70a6

Please sign in to comment.