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: speed up Column.VecEvalReal by using MergeNulls #22191

Merged
merged 8 commits into from
Feb 17, 2021
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