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: support range framed window functions #9450

Merged
merged 3 commits into from
Feb 27, 2019

Conversation

alivxxx
Copy link
Contributor

@alivxxx alivxxx commented Feb 25, 2019

What problem does this PR solve?

Support range framed window functions.
Refer https://dev.mysql.com/doc/refman/8.0/en/window-functions-frames.html

What is changed and how it works?

  • Add one proecessor in executor to process range framed windows.
  • Unify the calculation of frame end points for numeric and temporal types.

Check List

Tests

  • Unit test

Code changes

  • Has exported function/method change

Side effects

  • None

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 Feb 25, 2019
@codecov-io
Copy link

codecov-io commented Feb 25, 2019

Codecov Report

Merging #9450 into master will decrease coverage by <.01%.
The diff coverage is 57.25%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #9450      +/-   ##
=========================================
- Coverage    67.3%   67.3%   -0.01%     
=========================================
  Files         373     373              
  Lines       78449   78542      +93     
=========================================
+ Hits        52803   52863      +60     
- Misses      20911   20922      +11     
- Partials     4735    4757      +22
Impacted Files Coverage Δ
planner/core/logical_plans.go 73.38% <ø> (ø) ⬆️
expression/builtin_compare.go 72.16% <0%> (-0.92%) ⬇️
planner/core/exhaust_physical_plans.go 94.13% <100%> (+1.73%) ⬆️
executor/builder.go 83.82% <100%> (+0.13%) ⬆️
planner/core/resolve_indices.go 53.21% <55.55%> (+0.06%) ⬆️
planner/core/explain.go 48.9% <57.14%> (+6.68%) ⬆️
executor/window.go 66.19% <59.61%> (-2.17%) ⬇️
planner/core/logical_plan_builder.go 78.13% <66.66%> (-0.16%) ⬇️
ddl/delete_range.go 75.13% <0%> (-4.24%) ⬇️
executor/insert_common.go 81.58% <0%> (-1.27%) ⬇️
... and 4 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f80e401...7ed7b8b. Read the comment docs.

Copy link
Contributor

@qw4990 qw4990 left a comment

Choose a reason for hiding this comment

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

mostly LGTM

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
Copy link
Member

/run-all-tests

@zz-jason zz-jason added the status/LGT2 Indicates that a PR has LGTM 2. label Feb 26, 2019
@zz-jason
Copy link
Member

/run-all-tests

@zz-jason zz-jason merged commit a59a5f4 into pingcap:master Feb 27, 2019
@alivxxx alivxxx deleted the range-framed branch February 27, 2019 02:43
@alivxxx alivxxx mentioned this pull request Feb 28, 2019
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

4 participants