fix: if condition corrected in aggreagte attribute static fields (#2866)

This commit is contained in:
Nityananda Gohain 2023-06-08 12:26:59 +05:30 committed by GitHub
parent 1770e6a157
commit a67d064418
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3879,7 +3879,7 @@ func (r *ClickHouseReader) GetLogAggregateAttributes(ctx context.Context, req *v
}
// add other attributes
for _, field := range constants.StaticFieldsLogsV3 {
if !stringAllowed && field.DataType == v3.AttributeKeyDataTypeString && (v3.AttributeKey{} == field) {
if (!stringAllowed && field.DataType == v3.AttributeKeyDataTypeString) || (v3.AttributeKey{} == field) {
continue
} else if len(req.SearchText) == 0 || strings.Contains(field.Key, req.SearchText) {
response.AttributeKeys = append(response.AttributeKeys, field)