fix: autcomplete top level keys (#3104)

This commit is contained in:
Nityananda Gohain 2023-07-11 23:02:10 +05:30 committed by GitHub
parent 1d1ddbef40
commit a6e6c171c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3958,7 +3958,10 @@ func (r *ClickHouseReader) GetLogAttributeValues(ctx context.Context, req *v3.Fi
// if dataType or tagType is not present return empty response
if len(req.FilterAttributeKeyDataType) == 0 || len(req.TagType) == 0 || req.FilterAttributeKey == "body" {
return &v3.FilterAttributeValueResponse{}, nil
// also check if it is not a top level key
if _, ok := constants.StaticFieldsLogsV3[req.FilterAttributeKey]; !ok {
return &v3.FilterAttributeValueResponse{}, nil
}
}
// if data type is bool, return true and false