Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

expression: fix unmatched column lengths errors ca ... (#19754) #19758

Merged
merged 2 commits into from
Sep 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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