-
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
executor: control Chunk size for Selection&Projection #9398
Conversation
@@ -166,6 +166,8 @@ func (e *ProjectionExec) isUnparallelExec() bool { | |||
} | |||
|
|||
func (e *ProjectionExec) unParallelExecute(ctx context.Context, chk *chunk.Chunk) error { | |||
// transmit the requiredRows | |||
e.childResult.SetRequiredRows(chk.RequiredRows(), e.maxChunkSize) |
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.
Selection
's childResult
needs the same change?
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.
Why not?
It makes the child return as quickly as possible and also guarantees enough rows to return to Projection's
parent.
Codecov Report
@@ Coverage Diff @@
## master #9398 +/- ##
==========================================
+ Coverage 67.3% 67.31% +0.01%
==========================================
Files 373 373
Lines 78442 78448 +6
==========================================
+ Hits 52796 52809 +13
+ Misses 20909 20905 -4
+ Partials 4737 4734 -3
Continue to review full report at Codecov.
|
How do you think? |
but in parallel mode, projection's child executor still get benefits from known "Require Not More than this info"? |
Yes, but in parallel mode, all worker goroutines work in the background and |
PTAL~ @lysu |
9249589
to
f67fa59
Compare
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 |
/run-all-tests |
725cb81
to
102f98c
Compare
/run-all-tests |
102f98c
to
47e0f8e
Compare
/run-all-tests |
47e0f8e
to
5294f93
Compare
/run-all-tests |
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 |
1 similar comment
/run-all-tests |
/rebuild |
/run-unit-test |
/run-all-tests |
/run-all-tests |
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
What problem does this PR solve?
Control the number of rows in chunks returned by
Selection
&Projection
.Following up #9364, this PR is a subtask of #9166.
What is changed and how it works?
Selection
support chunk size control.Projection
support chunk size control.Check List
Tests