Skip to content

Commit adf2df9

Browse files
authored
statistics: remove useless code (pingcap#54158)
1 parent 1e667ee commit adf2df9

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

pkg/statistics/cmsketch.go

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -215,18 +215,6 @@ func (c *CMSketch) considerDefVal(cnt uint64) bool {
215215
return (cnt == 0 || (cnt > c.defaultValue && cnt < 2*(c.count/uint64(c.width)))) && c.defaultValue > 0
216216
}
217217

218-
func updateValueBytes(c *CMSketch, t *TopN, d []byte, count uint64) {
219-
h1, h2 := murmur3.Sum128(d)
220-
if oriCount, ok := t.QueryTopN(nil, d); ok {
221-
if count > oriCount {
222-
t.updateTopNWithDelta(d, count-oriCount, true)
223-
} else {
224-
t.updateTopNWithDelta(d, oriCount-count, false)
225-
}
226-
}
227-
c.setValue(h1, h2, count)
228-
}
229-
230218
// setValue sets the count for value that hashed into (h1, h2), and update defaultValue if necessary.
231219
func (c *CMSketch) setValue(h1, h2 uint64, count uint64) {
232220
oriCount := c.queryHashValue(nil, h1, h2)

0 commit comments

Comments
 (0)