Skip to content
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: fix wrong partition boundary for window funcions #11637

Merged
merged 7 commits into from
Aug 22, 2019

Conversation

alivxxx
Copy link
Contributor

@alivxxx alivxxx commented Aug 6, 2019

What problem does this PR solve?

Fix #11612

What is changed and how it works?

Previously, when we meet one new partition, the next row will also be added in groupRows, which may cause wrong result since it was counted in previous partition. This PR fixes it by only processing the next partition after prevoius one finished.

Check List

Tests

  • Unit test

Code changes

  • Has unexported function/method change

Side effects

  • None

Related changes

  • Need to cherry-pick to the release branch

Copy link
Member

@zz-jason zz-jason left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zz-jason zz-jason added the status/LGT1 Indicates that a PR has LGTM 1. label Aug 6, 2019
lzmhhh123
lzmhhh123 previously approved these changes Aug 7, 2019
Copy link
Contributor

@lzmhhh123 lzmhhh123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@lzmhhh123 lzmhhh123 added status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Aug 7, 2019
@sre-bot
Copy link
Contributor

sre-bot commented Aug 7, 2019

/run-all-tests

@sre-bot
Copy link
Contributor

sre-bot commented Aug 7, 2019

@lamxTyler merge failed.

@codecov
Copy link

codecov bot commented Aug 7, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@8d165f0). Click here to learn what that means.
The diff coverage is 100%.

@@             Coverage Diff             @@
##             master     #11637   +/-   ##
===========================================
  Coverage          ?   81.4103%           
===========================================
  Files             ?        435           
  Lines             ?      94122           
  Branches          ?          0           
===========================================
  Hits              ?      76625           
  Misses            ?      11997           
  Partials          ?       5500

@alivxxx alivxxx added status/DNM and removed status/can-merge Indicates a PR has been approved by a committer. labels Aug 7, 2019
@ngaut ngaut added the status/can-merge Indicates a PR has been approved by a committer. label Aug 10, 2019
@sre-bot
Copy link
Contributor

sre-bot commented Aug 10, 2019

/run-all-tests

@sre-bot
Copy link
Contributor

sre-bot commented Aug 10, 2019

@lamxTyler merge failed.

@zz-jason zz-jason removed the status/can-merge Indicates a PR has been approved by a committer. label Aug 10, 2019
@zz-jason zz-jason dismissed lzmhhh123’s stale review August 10, 2019 04:33

Can not merge now. need to be merged together with another PR

@SunRunAway
Copy link
Contributor

/run-all-tests

@SunRunAway
Copy link
Contributor

/run-all-tests

@SunRunAway
Copy link
Contributor

/run-common-test tidb-test=pr/872
/run-integration-common-test tidb-test=pr/872

@alivxxx
Copy link
Contributor Author

alivxxx commented Aug 22, 2019

/run-unit-test

Copy link
Member

@zz-jason zz-jason left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@SunRunAway SunRunAway merged commit fcef061 into pingcap:master Aug 22, 2019
@sre-bot
Copy link
Contributor

sre-bot commented Aug 22, 2019

cherry pick to release-3.0 failed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sig/execution SIG execution status/LGT2 Indicates that a PR has LGTM 2. type/bugfix This PR fixes a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

window function row_number somtimes return wrong row number
6 participants