Skip to content

Commit 364cbff

Browse files
committed
mcv checks before strconv
1 parent 9345190 commit 364cbff

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sql/stats/iter.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,9 @@ func (s *statsIter) bucketToRow(i int, bucket sql.HistogramBucket) (sql.Row, err
106106
mcvs := make([]string, mcvCnt)
107107

108108
for i, mcv := range bucket.Mcvs() {
109-
mcvs[i] = StringifyKey(mcv, s.types)
109+
if len(mcv) > 0 {
110+
mcvs[i] = StringifyKey(mcv, s.types)
111+
}
110112
}
111113

112114
return sql.Row{

0 commit comments

Comments
 (0)