Skip to content

Commit 575408d

Browse files
authored
stats: Supplement some comments on analyze result struct (pingcap#59596)
close pingcap#59595
1 parent 9099090 commit 575408d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

pkg/statistics/analyze.go

+8
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ func (h *AnalyzeTableID) Equals(t *AnalyzeTableID) bool {
6161
}
6262

6363
// AnalyzeResult is used to represent analyze result.
64+
// In version2 analyze, we use the following structure to represent the analyze result.
65+
// It represents the list of analyze result for all columns when isIndex is 0.
66+
// Also represents the list of analyze result for all indexes when idIndex is 1.
6467
type AnalyzeResult struct {
6568
Hist []*Histogram
6669
Cms []*CMSketch
@@ -84,6 +87,11 @@ type AnalyzeResults struct {
8487
Err error
8588
ExtStats *ExtendedStatsColl
8689
Job *AnalyzeJob
90+
// Ars: combine the analyze result of all columns and the analyze result of indexes.
91+
// (In stats version2)
92+
// For example:
93+
// If the tableA (c1, c2, c3) has indexes (c1, c2), (c2, c3), the result will be:
94+
// Ars: [AnalyzeResult1[c1, c2, c3], AnalyzeResult2[c1_c2, c2_c3]]
8795
Ars []*AnalyzeResult
8896
TableID AnalyzeTableID
8997
Count int64

0 commit comments

Comments
 (0)