-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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 builtinSleepSig
#14070
expression: implement vectorized evaluation for builtinSleepSig
#14070
Conversation
/rebuild |
Codecov Report
@@ Coverage Diff @@
## master #14070 +/- ##
================================================
- Coverage 80.6472% 80.1634% -0.4838%
================================================
Files 488 483 -5
Lines 124659 121241 -3418
================================================
- Hits 100534 97191 -3343
+ Misses 16373 16307 -66
+ Partials 7752 7743 -9 |
} | ||
default: | ||
if atomic.CompareAndSwapUint32(&sessVars.Killed, 1, 0) { | ||
i64s[i] = 1 |
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 need to return here when sessVars.Killed
is set to 1.
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.
Add a test case like this for vecEval
Hi, please resolve this comment #14070 (review) |
input := chunk.New([]*types.FieldType{tp}, 1, 1) | ||
buf := chunk.NewColumn(types.NewFieldType(mysql.TypeLonglong), 1) | ||
da := types.Datum{} | ||
da.SetValue(a) |
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.
How about add another test for three rows with three arguments of 1 second ?
if rand.Float64() < g.nullRation { | ||
return nil | ||
} | ||
return math.Floor(rand.Float64() * 10) |
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.
It's still too long, how about keep it in a set of [0, 0.1]?
@@ -31,7 +31,7 @@ func (g *sleepTimeGener) gen() interface{} { | |||
if rand.Float64() < g.nullRation { | |||
return nil | |||
} | |||
return math.Floor(rand.Float64() * 10) | |||
return math.Floor(rand.Float64()) |
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.
if rand.Float64() < 0.5 {
return 0
}
return 0.1
Hi, @shihongzhi Please fix the unit test. |
@shihongzhi, please update your pull request. |
1 similar comment
@shihongzhi, please update your pull request. |
@shihongzhi PR closed due to no update for a long time. Feel free to reopen it anytime. |
What problem does this PR solve?
implement vectorized evaluation for builtinSleepSig , for #12103
What is changed and how it works?
Check List
Tests