fix: add support for bool values in time series result (#2713)

* fix: add support for bool values in time series result

* chore: reserved target column can never be bool so removed obsolete code

---------

Co-authored-by: Ankit Nayan <ankit@signoz.io>
Co-authored-by: Palash Gupta <palashgdev@gmail.com>
This commit is contained in:
Vishal Sharma 2023-05-18 14:08:32 +05:30 committed by GitHub
parent ca3ff04f7d
commit 357e422eca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4096,8 +4096,12 @@ func readRow(vars []interface{}, columnNames []string) ([]string, map[string]str
groupBy = append(groupBy, fmt.Sprintf("%v", reflect.ValueOf(v).Elem().Int()))
groupAttributes[colName] = fmt.Sprintf("%v", reflect.ValueOf(v).Elem().Int())
}
case *bool:
groupBy = append(groupBy, fmt.Sprintf("%v", *v))
groupAttributes[colName] = fmt.Sprintf("%v", *v)
default:
zap.S().Errorf("unsupported var type %v found in metric builder query result for column %s", v, colName)
zap.S().Errorf("unsupported var type %v found in query builder query result for column %s", v, colName)
}
}
return groupBy, groupAttributes, point
@ -4424,4 +4428,4 @@ func (r *ClickHouseReader) GetSpanAttributeKeys(ctx context.Context) (map[string
response[tagKey] = key
}
return response, nil
}
}