hanahmily commented on code in PR #937:
URL: 
https://github.com/apache/skywalking-banyandb/pull/937#discussion_r2694492036


##########
banyand/measure/query.go:
##########
@@ -852,7 +872,11 @@ func (qr *queryResult) merge(storedIndexValue 
map[common.SeriesID]map[string]*mo
                if len(result.Timestamps) > 0 &&
                        topBC.timestamps[topBC.idx] == 
result.Timestamps[len(result.Timestamps)-1] {
                        if topBC.versions[topBC.idx] > lastVersion {
-                               topBC.replace(result, storedIndexValue)
+                               if topNPostAggregator != nil {
+                                       topBC.mergeTopNResult(result, 
storedIndexValue, topNPostAggregator)
+                               } else {
+                                       topBC.replace(result, storedIndexValue)
+                               }
                        }

Review Comment:
   The version comparison of topN is in the mergeTopNResult function; this 
comparison only applies to non-topN.



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