wrong stats of TestIssues24349 #59130
Labels
affects-8.1
This bug affects the 8.1.x(LTS) versions.
affects-8.5
This bug affects the 8.5.x(LTS) versions.
severity/major
sig/planner
SIG: Planner
type/bug
The issue is confirmed as a bug.
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
Looking into column
b
's stats:p0
: TopN: (3, 3). Hist: one bucket [2, 2] with count = 1p1
: TopN: (2, 3), Hist: emptyp2
: TopN: (1, 2), Hist: two buckets [1, 3] with count = 2 and repeat = 1, [4, 4] with count = 1 and repeat = 1After fixing the global TopN, it is now 2 with 4 as its occurrence (local TopN of
p1
and one single bucket fromp0
).Remained buckets(TopN also treat as bucket)
p0
plus 1 fromp2
's bucket [1, 3]'s repeat)After merging them to get the global histogram, we should get one bucket [1, 4] with count = 8 and repeat = 1.
But in the current test result, we have
The count is 10.
2. What did you expect to see? (Required)
3. What did you see instead (Required)
4. What is your TiDB version? (Required)
master.
The text was updated successfully, but these errors were encountered: