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

Conversation

@lamxTyler
Copy link
Member

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

@lamxTyler lamxTyler added this to In progress in window function via automation Jan 17, 2019

Show resolved Hide resolved 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
@codecov-io

This comment has been minimized.

Copy link

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.

@eurekaka
Copy link
Contributor

left a comment

LGTM

Show resolved Hide resolved executor/windowfunc/builder.go Outdated

window function automation moved this from In progress to Reviewer approved Jan 25, 2019

@winoros
Copy link
Member

left a comment

lgtm

Show resolved Hide resolved executor/window.go Outdated

window function automation moved this from Reviewer approved to Needs review Jan 25, 2019

@lamxTyler

This comment has been minimized.

Copy link
Member Author

commented Jan 25, 2019

/run-all-tests

Show resolved Hide resolved executor/window.go Outdated
Show resolved Hide resolved executor/windowfunc/window_funcs.go Outdated

@lamxTyler lamxTyler requested a review from zz-jason Feb 12, 2019

@lamxTyler

This comment has been minimized.

Copy link
Member Author

commented Feb 18, 2019

PTAL @zz-jason

window function automation moved this from Needs review to Reviewer approved Feb 18, 2019

@zz-jason
Copy link
Member

left a comment

LGTM

@zz-jason zz-jason added status/LGT2 and removed status/LGT1 labels Feb 18, 2019

@lamxTyler

This comment has been minimized.

Copy link
Member Author

commented Feb 18, 2019

/run-all-tests

@lamxTyler lamxTyler merged commit cc08569 into pingcap:master Feb 18, 2019

4 of 5 checks passed

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
ci/circleci Your tests passed on CircleCI!
Details
idc-jenkins-ci-tidb/build Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/check_dev Jenkins job succeeded.
Details
license/cla Contributor License Agreement is signed.
Details

window function automation moved this from Reviewer approved to Done Feb 18, 2019

@lamxTyler lamxTyler deleted the lamxTyler:row_number branch Feb 18, 2019

yu34po added a commit to yu34po/tidb that referenced this pull request Feb 27, 2019

@lamxTyler lamxTyler referenced this pull request Feb 28, 2019

Closed

support all window functions #9499

11 of 11 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.