Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Rustin170506 committed Sep 19, 2023
1 parent c11971d commit 1a70aac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions statistics/handle/globalstats/global_stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ func (g *GlobalStatusHandler) MergePartitionStats2GlobalStats(
skipPartition := false
if !analyzed {
var missingPart string
if isIndex {
if !isIndex {
missingPart = fmt.Sprintf("partition `%s` column `%s`", def.Name.L, tableInfo.FindColumnNameByID(histIDs[i]))
} else {
missingPart = fmt.Sprintf("partition `%s` index `%s`", def.Name.L, tableInfo.FindIndexNameByID(histIDs[i]))
Expand All @@ -176,7 +176,7 @@ func (g *GlobalStatusHandler) MergePartitionStats2GlobalStats(
// Partition stats is not empty but column stats(hist, topN) is missing.
if partitionStats.RealtimeCount > 0 && (hg == nil || hg.TotalRowCount() <= 0) && (topN == nil || topN.TotalCount() <= 0) {
var missingPart string
if isIndex {
if !isIndex {
missingPart = fmt.Sprintf("partition `%s` column `%s`", def.Name.L, tableInfo.FindColumnNameByID(histIDs[i]))
} else {
missingPart = fmt.Sprintf("partition `%s` index `%s`", def.Name.L, tableInfo.FindIndexNameByID(histIDs[i]))
Expand Down

0 comments on commit 1a70aac

Please sign in to comment.