eye-gu commented on code in PR #1110:
URL:
https://github.com/apache/skywalking-banyandb/pull/1110#discussion_r3176576734
##########
pkg/query/logical/measure/topn_analyzer.go:
##########
@@ -109,7 +109,15 @@ func TopNAnalyze(criteria *measurev1.TopNRequest,
sourceMeasureSchemaList []*dat
return nil, err
}
- plan = topNDistinct(plan, criteria.GetTopN(),
criteria.GetFieldValueSort(), topNAggSchema.FieldName)
+ var fieldType databasev1.FieldType
+ for _, field := range sourceMeasureSchema.GetFields() {
+ if field.GetName() == topNAggSchema.FieldName {
+ fieldType = field.GetFieldType()
+ break
+ }
+ }
+
+ plan = topNDistinct(plan, criteria.GetTopN(),
criteria.GetFieldValueSort(), topNAggSchema.FieldName, fieldType)
Review Comment:
all groups sharing the same TopN name are defined under a unified schema
where the same field_name always maps to the same FieldType.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]