mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-14 09:25:58 +08:00
fix: don't panic in GetClickhouseColumnName (#7493)
This commit is contained in:
parent
81c7f3221a
commit
df5767198c
@ -303,7 +303,7 @@ func GetClickhouseColumnName(typeName string, dataType, field string) string {
|
|||||||
typeName = constants.Attributes
|
typeName = constants.Attributes
|
||||||
}
|
}
|
||||||
|
|
||||||
if typeName != string(v3.AttributeKeyTypeResource) {
|
if typeName != string(v3.AttributeKeyTypeResource) && len(typeName) > 0 {
|
||||||
typeName = typeName[:len(typeName)-1]
|
typeName = typeName[:len(typeName)-1]
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -319,7 +319,7 @@ func GetClickhouseColumnNameV2(typeName string, dataType, field string) string {
|
|||||||
typeName = constants.Attributes
|
typeName = constants.Attributes
|
||||||
}
|
}
|
||||||
|
|
||||||
if typeName != string(v3.AttributeKeyTypeResource) {
|
if typeName != string(v3.AttributeKeyTypeResource) && len(typeName) > 0 {
|
||||||
typeName = typeName[:len(typeName)-1]
|
typeName = typeName[:len(typeName)-1]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user