From 809e69cdeb29ef8caf09fb6e41d29ef6d822ecf6 Mon Sep 17 00:00:00 2001 From: Yuanjia Zhang Date: Thu, 3 Sep 2020 16:22:43 +0800 Subject: [PATCH] cherry pick #19754 to release-4.0 Signed-off-by: ti-srebot --- expression/builtin_compare_vec.go | 2 ++ util/chunk/column.go | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/expression/builtin_compare_vec.go b/expression/builtin_compare_vec.go index c1c8cc18c0c48..439143706bf45 100644 --- a/expression/builtin_compare_vec.go +++ b/expression/builtin_compare_vec.go @@ -254,6 +254,7 @@ func (b *builtinLeastStringSig) vecEvalString(input *chunk.Chunk, result *chunk. src := result arg := buf1 dst := buf2 + dst.ReserveString(n) for j := 1; j < len(b.args); j++ { if err := b.args[j].VecEvalString(b.ctx, input, arg); err != nil { return err @@ -793,6 +794,7 @@ func (b *builtinGreatestStringSig) vecEvalString(input *chunk.Chunk, result *chu src := result arg := buf1 dst := buf2 + dst.ReserveString(n) for j := 1; j < len(b.args); j++ { if err := b.args[j].VecEvalString(b.ctx, input, arg); err != nil { return err diff --git a/util/chunk/column.go b/util/chunk/column.go index 4089389872318..fd51fb2bb056b 100644 --- a/util/chunk/column.go +++ b/util/chunk/column.go @@ -703,7 +703,7 @@ func (c *Column) MergeNulls(cols ...*Column) { } for _, col := range cols { if c.length != col.length { - panic("should ensure all columns have the same length") + panic(fmt.Sprintf("should ensure all columns have the same length, expect %v, but got %v", c.length, col.length)) } } for _, col := range cols {