executor: copy row data instead of refereeing chunk.Row in some window functions.#11678
Merged
Merged
Conversation
Contributor
Author
Contributor
|
Did you reference a wrong PR number? @SunRunAway |
Contributor
Author
|
@foreyes sorry, fixed. |
alivxxx
reviewed
Aug 8, 2019
Codecov Report
@@ Coverage Diff @@
## master #11678 +/- ##
===========================================
Coverage ? 81.4533%
===========================================
Files ? 432
Lines ? 93192
Branches ? 0
===========================================
Hits ? 75908
Misses ? 11866
Partials ? 5418 |
a751e19 to
71e9ca9
Compare
zz-jason
reviewed
Aug 8, 2019
71e9ca9 to
c4c83a0
Compare
2410a7a to
0c430ed
Compare
zz-jason
reviewed
Aug 16, 2019
zz-jason
reviewed
Aug 18, 2019
Merged
1 task
Contributor
|
cherry pick to release-3.0 in PR #11823 |
zz-jason
pushed a commit
that referenced
this pull request
Aug 22, 2019
SunRunAway
added a commit
to SunRunAway/tidb
that referenced
this pull request
Oct 12, 2019
This was referenced Oct 14, 2019
sre-bot
pushed a commit
that referenced
this pull request
Oct 16, 2019
sre-bot
pushed a commit
to sre-bot/tidb
that referenced
this pull request
Oct 16, 2019
sre-bot
pushed a commit
to sre-bot/tidb
that referenced
this pull request
Oct 16, 2019
sre-bot
added a commit
that referenced
this pull request
Oct 17, 2019
sre-bot
added a commit
that referenced
this pull request
Oct 17, 2019
XiaTianliang
pushed a commit
to XiaTianliang/tidb
that referenced
this pull request
Dec 21, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What problem does this PR solve?
Fixes #11614, and fixes #11626 .
If a
chunk.Chunkreuse into a window function executor, it may break the internal memory reference in functionRANKorPERCENT_RANK.chk := NewChunk()windowExecutor.Next(chk)windowExecutorput column results intochkwhile refereeing thechunk.RowintoPartialResultof functionRANKorPERCENT_RANK.windowExecutor.Next(chk)again to collect next batch of result and reuses the samechk.chunk.Rowrefereced byPartialResultis broken whenchk.Resetis called.What is changed and how it works?
Change step 3 above, copy row data instead of refereeing chunk.Row in window functions which rely on data comparing.
Check List
Tests
Code changes
Side effects
lagbecause it cannot be finished with old code.Related changes