-
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
*: fix ineffectual assignments and misspellings #9481
Conversation
/run-all-tests |
1 similar comment
/run-all-tests |
/run-unit-test |
Signed-off-by: Keyi Xie <xiekeyi98@gmail.com>
…to ineffassignAndMisspell
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
Codecov Report
@@ Coverage Diff @@
## master #9481 +/- ##
==========================================
- Coverage 67.38% 67.38% -0.01%
==========================================
Files 374 374
Lines 78647 78653 +6
==========================================
+ Hits 52995 52997 +2
- Misses 20893 20895 +2
- Partials 4759 4761 +2
Continue to review full report at Codecov.
|
/run-all-tests |
@@ -201,7 +201,7 @@ func (e *HashJoinExec) fetchOuterChunks(ctx context.Context) { | |||
return | |||
} | |||
var outerResource *outerChkResource | |||
ok := true | |||
var ok bool |
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.
The value of ok
is true in the original code, why change it?
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.
Indeed , it has not used at all.
Next time it is used by case outerResource, ok = <-e.outerChkResourceCh:
It has been overwritten.
@@ -5619,7 +5619,8 @@ func (b *builtinLastDaySig) evalTime(row chunk.Row) (types.Time, bool, error) { | |||
return types.Time{}, true, handleInvalidTimeError(b.ctx, err) | |||
} | |||
tm := arg.Time | |||
year, month, day := tm.Year(), tm.Month(), 30 | |||
var day int |
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.
The value of day
is 30 in the original code, why change it?
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.
Next time , it is used in day = types.GetLastDay(year, month)
It has been already overwritten.
I think 30
is never used.
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?
Because in the near future , I want to add more test in CI.
tidb/Makefile
Line 67 in 45f9d6a
It is necessary to fix ineffassign and mis-spell.
![image](https://user-images.githubusercontent.com/7782671/53465891-a6cf1d80-3a8a-11e9-8173-94b84222c545.png)
Check List
Tests
Code changes
Side effects
Related changes