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
stmtctx, context: remove the redundant implementation of warnings/extraWarnings in statement context #52862
base: master
Are you sure you want to change the base?
Conversation
6c43122
to
8321d26
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #52862 +/- ##
=================================================
- Coverage 72.4170% 55.9003% -16.5168%
=================================================
Files 1477 1595 +118
Lines 427989 605204 +177215
=================================================
+ Hits 309937 338311 +28374
- Misses 98854 243675 +144821
- Partials 19198 23218 +4020
Flags with carried forward coverage won't be shown. Click here to find out more.
|
/retest |
9d5f000
to
f298dc1
Compare
@@ -1017,6 +957,8 @@ func (sc *StatementContext) ResetForRetry() { | |||
sc.IndexNames = sc.IndexNames[:0] | |||
sc.TaskID = AllocateTaskID() | |||
sc.SyncExecDetails.Reset() | |||
sc.WarnHandler.TruncateWarnings(0) | |||
sc.ExtraWarnHandler.TruncateWarnings(0) |
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.
I've confirmed with @time-and-fate that it's expected to also reset extra warning here. It's a mistake that it wasn't reset in resetMuForRetry
before this PR.
/retest |
…ement context Signed-off-by: Yang Keao <yangkeao@chunibyo.icu>
/retest |
2 similar comments
/retest |
/retest |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: lcwangchao The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
[LGTM Timeline notifier]Timeline:
|
What problem does this PR solve?
Issue Number: close #52848
Problem Summary:
We have multiple implementation of
WarnHandler
: the most used one is theStatementContext
itself. However, we already have aStaticWarnHandler
, which implements nearly all methods needed by theWarnHandler
. Now, it'd be better to implement the warning related methods inStatementContext
withStaticWarnHandler
.What changed and how does it work?
warnings
andextraWarnings
in theStatementContext
.WarnHandler
s to handle normal warning and extra warning (which is used in slow log).Check List
Tests
Side effects
Documentation
Release note