-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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: implement vectorized evaluation for "builtinCastIntAsStringSig" #12425
Conversation
Codecov Report
@@ Coverage Diff @@
## master #12425 +/- ##
================================================
+ Coverage 79.8676% 79.8974% +0.0297%
================================================
Files 460 460
Lines 102467 102360 -107
================================================
- Hits 81838 81783 -55
+ Misses 14698 14665 -33
+ Partials 5931 5912 -19 |
/run-unit-test |
/run-unit-test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/run-unit-test |
/run-all-tests |
/run-common-test |
/run-integration-common-test |
/run-all-tests |
expression/builtin_cast_vec.go
Outdated
if !isUnsigned { | ||
str = strconv.FormatInt(i64s[i], 10) | ||
} else { | ||
u64, err := types.ConvertIntToUint(b.ctx.GetSessionVars().StmtCtx, i64s[i], types.IntergerUnsignedUpperBound(b.tp.Tp), b.tp.Tp) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, it's my fault.
It seems that we don't need ConvertIntToUint
after reviewing the row-based implementation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, i will change ConvertIntToUint() to uint()
expression/builtin_cast_vec.go
Outdated
} | ||
str, err = types.ProduceStrWithSpecifiedTp(str, b.tp, b.ctx.GetSessionVars().StmtCtx, false) | ||
if err != nil { | ||
result.AppendNull() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should throw this error here like the row-based implementation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
expression/builtin_cast_vec.go
Outdated
var d bool | ||
str, d, err = padZeroForBinaryType(str, b.tp, b.ctx) | ||
if err != nil { | ||
result.AppendNull() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto, we should throw this err here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/run-all-tests |
What problem does this PR solve?
Implement vectorized evaluation for builtinCastIntAsStringSig, for #12106
What is changed and how it works?
Check List
Tests