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

planner, executor: merge window functions with same specification name #9866

Merged
merged 7 commits into from
May 23, 2019

Conversation

alivxxx
Copy link
Contributor

@alivxxx alivxxx commented Mar 22, 2019

What problem does this PR solve?

Previously, we could only process one window function in one window executor. This PR merges the execution of different window functions according to their window specification name.

What is changed and how it works?

In the planner stage, it first extracts the window functions from field list and order by clause. After that, it groups and builds the window functions according to specification name. In the executor, it also adjusts the executor so it can handle multiple window functions.

Check List

Tests

  • Unit test

Code changes

  • Has exported function/method change

Side effects

  • Increased code complexity

Related changes

  • None

@alivxxx alivxxx added type/enhancement The issue or PR belongs to an enhancement. sig/planner SIG: Planner sig/execution SIG execution labels Mar 22, 2019
@codecov
Copy link

codecov bot commented Mar 22, 2019

Codecov Report

Merging #9866 into master will increase coverage by 0.0065%.
The diff coverage is 86.0902%.

@@               Coverage Diff               @@
##            master      #9866        +/-   ##
===============================================
+ Coverage   77.346%   77.3526%   +0.0065%     
===============================================
  Files          413        413                
  Lines        87380      87498       +118     
===============================================
+ Hits         67585      67682        +97     
- Misses       14603      14615        +12     
- Partials      5192       5201         +9

planner/core/logical_plan_builder.go Outdated Show resolved Hide resolved
planner/core/logical_plan_builder.go Outdated Show resolved Hide resolved
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 requested a review from winoros May 22, 2019 08:29
@alivxxx alivxxx added the status/LGT1 Indicates that a PR has LGTM 1. label May 22, 2019
@zz-jason zz-jason added the priority/release-blocker This issue blocks a release. Please solve it ASAP. label May 23, 2019
@alivxxx
Copy link
Contributor Author

alivxxx commented May 23, 2019

PTLA @winoros

@alivxxx alivxxx requested a review from winoros May 23, 2019 06:47
@alivxxx
Copy link
Contributor Author

alivxxx commented May 23, 2019

/run-all-tests

@alivxxx
Copy link
Contributor Author

alivxxx commented May 23, 2019

/run-unit-test

Copy link
Member

@winoros winoros left a comment

Choose a reason for hiding this comment

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

lgtm

@alivxxx alivxxx merged commit 9071ab9 into pingcap:master May 23, 2019
@alivxxx alivxxx deleted the merge branch May 23, 2019 08:40
@alivxxx alivxxx added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels May 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority/release-blocker This issue blocks a release. Please solve it ASAP. sig/execution SIG execution sig/planner SIG: Planner status/LGT2 Indicates that a PR has LGTM 2. type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants