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 first_value and last_value #9560

Merged
merged 2 commits into from Mar 6, 2019

Conversation

4 participants
@lamxTyler
Copy link
Member

lamxTyler commented Mar 5, 2019

What problem does this PR solve?

Support window function first_value and last_value.
Refer https://dev.mysql.com/doc/refman/8.0/en/window-function-descriptions.html#function_first-value and https://dev.mysql.com/doc/refman/8.0/en/window-function-descriptions.html#function_last-value.

For #9499

What is changed and how it works?

  • Add one interface to handle the evaluation of expressions, it can be used by first_value, last_value, nth_value, lead and lag.
  • Implement the functions under the agg function interface.

Check List

Tests

  • Integration 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 Mar 5, 2019

@lamxTyler lamxTyler requested review from zz-jason , qw4990 and winoros Mar 5, 2019

@lamxTyler lamxTyler referenced this pull request Mar 5, 2019

Closed

support all window functions #9499

11 of 11 tasks complete
@codecov-io

This comment has been minimized.

Copy link

codecov-io commented Mar 5, 2019

Codecov Report

Merging #9560 into master will decrease coverage by 0.1%.
The diff coverage is 0.64%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #9560      +/-   ##
=========================================
- Coverage   67.41%   67.3%   -0.11%     
=========================================
  Files         375     376       +1     
  Lines       78809   78963     +154     
=========================================
+ Hits        53126   53143      +17     
- Misses      20919   21057     +138     
+ Partials     4764    4763       -1
Impacted Files Coverage Δ
executor/aggfuncs/func_value.go 0% <0%> (ø)
executor/aggfuncs/builder.go 30.21% <0%> (-1.92%) ⬇️
expression/aggregation/base_func.go 48.2% <100%> (ø) ⬆️
executor/aggregate.go 79.11% <0%> (+0.21%) ⬆️
executor/distsql.go 72.18% <0%> (+0.45%) ⬆️
executor/join.go 79.58% <0%> (+0.51%) ⬆️
executor/index_lookup_join.go 78.05% <0%> (+0.62%) ⬆️
expression/schema.go 94.53% <0%> (+0.78%) ⬆️
executor/window.go 70.9% <0%> (+2.27%) ⬆️
... and 1 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 2b646cb...ffe851a. Read the comment docs.

@winoros
Copy link
Member

winoros left a comment

lgtm

@winoros

This comment has been minimized.

Copy link
Member

winoros commented Mar 6, 2019

./run-all-tests

window function automation moved this from In progress to Reviewer approved Mar 6, 2019

@zz-jason
Copy link
Member

zz-jason left a comment

LGTM

window function automation moved this from Reviewer approved to Needs review Mar 6, 2019

@lamxTyler

This comment has been minimized.

Copy link
Member Author

lamxTyler commented Mar 6, 2019

@zz-jason Resolved conflicts, please help approve again.

window function automation moved this from Needs review to Reviewer approved Mar 6, 2019

@winoros

winoros approved these changes Mar 6, 2019

@zz-jason zz-jason merged commit 247777d into pingcap:master Mar 6, 2019

5 checks passed

ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
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 Mar 6, 2019

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.