Skip to content

Commit

Permalink
FIX UT
Browse files Browse the repository at this point in the history
  • Loading branch information
Reminiscent committed Feb 19, 2021
1 parent 9933126 commit 55ac45f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions statistics/handle/handle.go
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,9 @@ func (h *Handle) MergePartitionStats2GlobalStats(sc *stmtctx.StatementContext, i
var popedTopN []statistics.TopNMeta
n := uint32(0)
for _, topN := range allTopN[i] {
if topN == nil {
continue
}
n = mathutil.MaxUint32(n, uint32(len(topN.TopN)))
}
globalStats.TopN[i], popedTopN = statistics.MergeTopN(allTopN[i], n)
Expand Down

0 comments on commit 55ac45f

Please sign in to comment.