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: support window function row number #9098

Merged
merged 12 commits into from
Feb 18, 2019
Merged

Conversation

alivxxx
Copy link
Contributor

@alivxxx alivxxx commented Jan 17, 2019

What problem does this PR solve?

Support window function row number.
Refer https://dev.mysql.com/doc/refman/8.0/en/window-function-descriptions.html#function_row-number

What is changed and how it works?

  • Adapt the window executor to also support window functions without frame clause.
  • Extract an interface for the window functions and implement the row number.

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/execution SIG execution labels Jan 17, 2019
executor/builder.go Outdated Show resolved Hide resolved
executor/windowfunc/builder.go Outdated Show resolved Hide resolved
executor/windowfunc/func_row_number.go Outdated Show resolved Hide resolved
executor/windowfunc/func_row_number.go Outdated Show resolved Hide resolved
@codecov-io
Copy link

codecov-io commented Jan 23, 2019

Codecov Report

Merging #9098 into master will decrease coverage by 0.02%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #9098      +/-   ##
==========================================
- Coverage   67.18%   67.16%   -0.03%     
==========================================
  Files         371      372       +1     
  Lines       77631    77656      +25     
==========================================
- Hits        52159    52157       -2     
- Misses      20810    20836      +26     
- Partials     4662     4663       +1
Impacted Files Coverage Δ
executor/aggfuncs/builder.go 34.63% <0%> (-1.23%) ⬇️
executor/aggfuncs/row_number.go 0% <0%> (ø)
expression/aggregation/base_func.go 48.2% <0%> (-2.18%) ⬇️
store/tikv/lock_resolver.go 41.7% <0%> (-0.95%) ⬇️
executor/join.go 77.86% <0%> (-0.53%) ⬇️
infoschema/infoschema.go 77.63% <0%> (+1.31%) ⬆️

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 a8664ef...09f20f6. Read the comment docs.

Copy link
Contributor

@eurekaka eurekaka left a comment

Choose a reason for hiding this comment

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

LGTM

@eurekaka eurekaka added the status/LGT1 Indicates that a PR has LGTM 1. label Jan 23, 2019
winoros
winoros previously approved these changes Jan 25, 2019
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

executor/window.go Outdated Show resolved Hide resolved
@alivxxx
Copy link
Contributor Author

alivxxx commented Jan 25, 2019

/run-all-tests

executor/window.go Outdated Show resolved Hide resolved
executor/windowfunc/window_funcs.go Outdated Show resolved Hide resolved
@alivxxx
Copy link
Contributor Author

alivxxx commented Feb 18, 2019

PTAL @zz-jason

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 status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Feb 18, 2019
@alivxxx
Copy link
Contributor Author

alivxxx commented Feb 18, 2019

/run-all-tests

@alivxxx alivxxx merged commit cc08569 into pingcap:master Feb 18, 2019
@alivxxx alivxxx deleted the row_number branch February 18, 2019 09:14
@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 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.

6 participants