lujiajing1126 commented on code in PR #257:
URL: 
https://github.com/apache/skywalking-banyandb/pull/257#discussion_r1138042139


##########
banyand/measure/measure_topn.go:
##########
@@ -469,18 +498,20 @@ func (manager *topNProcessorManager) 
buildMapper(fieldName string, groupByNames
                return nil, err
        }
        return func(_ context.Context, request any) any {
-               dataPoint := request.(*measurev1.DataPointValue)
+               dpWithEvs := request.(*dataPointWithEntityValues)
                return flow.Data{
+                       // EntityValues as identity
+                       dpWithEvs.entityValues,
                        // save string representation of group values as the 
key, i.e. v1
                        strings.Join(transform(groupLocator, func(locator 
partition.TagLocator) string {
-                               return 
stringify(dataPoint.GetTagFamilies()[locator.FamilyOffset].GetTags()[locator.TagOffset])
+                               return 
stringify(dpWithEvs.GetTagFamilies()[locator.FamilyOffset].GetTags()[locator.TagOffset])
                        }), "|"),
                        // field value as v2
                        // TODO: we only support int64
-                       dataPoint.GetFields()[fieldIdx].GetInt().GetValue(),
+                       dpWithEvs.GetFields()[fieldIdx].GetInt().GetValue(),
                        // groupBy tag values as v3
                        transform(groupLocator, func(locator 
partition.TagLocator) *modelv1.TagValue {
-                               return 
dataPoint.GetTagFamilies()[locator.FamilyOffset].GetTags()[locator.TagOffset]
+                               return 
dpWithEvs.GetTagFamilies()[locator.FamilyOffset].GetTags()[locator.TagOffset]

Review Comment:
   Fixed



-- 
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]

Reply via email to