-
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
executor,distsql: refactor the base executor in tableReader #51397
Conversation
0cb247d
to
9d50db8
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #51397 +/- ##
================================================
+ Coverage 70.6921% 72.3017% +1.6096%
================================================
Files 1462 1462
Lines 435122 435179 +57
================================================
+ Hits 307597 314642 +7045
+ Misses 108229 100590 -7639
- Partials 19296 19947 +651
Flags with carried forward coverage won't be shown. Click here to find out more.
|
9d50db8
to
da64489
Compare
@@ -3997,7 +3999,7 @@ func (b *executorBuilder) buildIndexMergeReader(v *plannercore.PhysicalIndexMerg | |||
// 1. dataReaderBuilder calculate data range from argument, rather than plan. | |||
// 2. the result executor is already opened. | |||
type dataReaderBuilder struct { | |||
plannercore.Plan | |||
plan plannercore.Plan |
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.
As IndexLookUpExecutor
embeded the dataReaderBuilder
directly, it shouldn't embed Plan
to avoid calling the ID
of the Plan
unexpectedly.
745fd5a
to
bada270
Compare
// GetSessionVars gets the session variables. | ||
GetSessionVars() *variable.SessionVars | ||
// GetClient gets a kv.Client. | ||
GetClient() kv.Client |
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 possible to remove GetClient()
from the session context. It's only used in executor and distsql, but I'm not sure whether it's appropriate (or whether it's helpful). Therefore, I kept it, and the distsql
context doesn't need *Extend
.
[LGTM Timeline notifier]Timeline:
|
/hold |
comment |
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
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: lcwangchao, SeaRise, tangenta, zanmato1984 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Signed-off-by: Yang Keao <yangkeao@chunibyo.icu>
Signed-off-by: Yang Keao <yangkeao@chunibyo.icu>
10eb2f4
to
5527ff3
Compare
/unhold |
/retest |
What problem does this PR solve?
Issue Number: close #51396
Problem Summary:
What changed and how does it work?
Create a new
BaseExecutorV2
which doesn't contain session context, and use it to refactor theTableReaderExecutor
.Check List
Tests
Release note