File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -51,13 +51,18 @@ func getTotalRowCount(statsTbl *statistics.Table, colHist *statistics.Column) in
51
51
}
52
52
// If colHist is not fully loaded, we may still get its total row count from other index/column stats.
53
53
totCount := int64 (0 )
54
+ stop := false
54
55
statsTbl .ForEachIndexImmutable (func (_ int64 , idx * statistics.Index ) bool {
55
56
if idx .IsFullLoad () && idx .LastUpdateVersion == colHist .LastUpdateVersion {
56
57
totCount = int64 (idx .TotalRowCount ())
58
+ stop = true
57
59
return true
58
60
}
59
61
return false
60
62
})
63
+ if stop {
64
+ return totCount
65
+ }
61
66
statsTbl .ForEachColumnImmutable (func (_ int64 , col * statistics.Column ) bool {
62
67
if col .IsFullLoad () && col .LastUpdateVersion == colHist .LastUpdateVersion {
63
68
totCount = int64 (col .TotalRowCount ())
You can’t perform that action at this time.
0 commit comments