hanahmily commented on code in PR #937:
URL:
https://github.com/apache/skywalking-banyandb/pull/937#discussion_r2694479358
##########
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:
```suggestion
if topNPostAggregator != nil {
topBC.mergeTopNResult(result,
storedIndexValue, topNPostAggregator)
} else if topBC.versions[topBC.idx] >
lastVersion {
topBC.replace(result, storedIndexValue)
}
```
--
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]