Skip to content

Commit

Permalink
expression: speed up Column.VecEvalReal by using MergeNulls (#22191)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rameshhj authored Feb 17, 2021
1 parent d6a2b9a commit c9af430
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions expression/column.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,13 +257,12 @@ func (col *Column) VecEvalReal(ctx sessionctx.Context, input *chunk.Chunk, resul
}
return nil
}
result.MergeNulls(src)
for i := range f32s {
// TODO(zhangyuanjia): speed up the way to manipulate null-bitmaps.
if src.IsNull(i) {
result.SetNull(i, true)
} else {
f64s[i] = float64(f32s[i])
if result.IsNull(i) {
continue
}
f64s[i] = float64(f32s[i])
}
return nil
}
Expand Down

0 comments on commit c9af430

Please sign in to comment.