Skip to content

Commit

Permalink
expression: fix unmatched column lengths errors ca ... (#19754) (#19758)
Browse files Browse the repository at this point in the history
  • Loading branch information
ti-srebot authored Sep 3, 2020
1 parent 1121f2e commit 6bd08b3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions expression/builtin_compare_vec.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion util/chunk/column.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 6bd08b3

Please sign in to comment.