Skip to content

Commit d22f9bc

Browse files
authored
statistics: remove useless code in the MergePartTopN2GlobalTopN (#45755) (#45770)
close #45706
1 parent f028669 commit d22f9bc

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

statistics/cmsketch.go

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -745,15 +745,8 @@ func MergePartTopN2GlobalTopN(loc *time.Location, version int, topNs []*TopN, n
745745
}
746746

747747
partNum := len(topNs)
748-
topNsNum := make([]int, partNum)
749748
removeVals := make([][]TopNMeta, partNum)
750-
for i, topN := range topNs {
751-
if topN == nil {
752-
topNsNum[i] = 0
753-
continue
754-
}
755-
topNsNum[i] = len(topN.TopN)
756-
}
749+
757750
// Different TopN structures may hold the same value, we have to merge them.
758751
counter := make(map[hack.MutableString]float64)
759752
// datumMap is used to store the mapping from the string type to datum type.

0 commit comments

Comments
 (0)