diff --git a/expression/schema.go b/expression/schema.go index bd242a29daa84..6207b1d9fd1ae 100644 --- a/expression/schema.go +++ b/expression/schema.go @@ -56,11 +56,7 @@ func (s *Schema) String() string { } ukStrs := make([]string, 0, len(s.Keys)) for _, key := range s.Keys { - ukColStrs := make([]string, 0, len(key)) - for _, col := range key { - ukColStrs = append(ukColStrs, col.String()) - } - ukStrs = append(ukStrs, "["+strings.Join(ukColStrs, ",")+"]") + ukStrs = append(ukStrs, key.String()) } return "Column: [" + strings.Join(colStrs, ",") + "] Unique key: [" + strings.Join(ukStrs, ",") + "]" }