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/core: implement skyline pruning #9337

Merged
merged 16 commits into from
Feb 19, 2019
Merged

Conversation

alivxxx
Copy link
Contributor

@alivxxx alivxxx commented Feb 18, 2019

What problem does this PR solve?

Fix #8593

What is changed and how it works?

Implement the skyline pruning according to the proposal.

Check List

Tests

  • Unit test

Code changes

  • Has exported function/method change

Side effects

  • None

Related changes

  • Need to cherry-pick to the release branch

@alivxxx alivxxx added type/enhancement The issue or PR belongs to an enhancement. sig/planner SIG: Planner labels Feb 18, 2019
@codecov-io
Copy link

codecov-io commented Feb 18, 2019

Codecov Report

Merging #9337 into master will increase coverage by 0.02%.
The diff coverage is 97.97%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #9337      +/-   ##
==========================================
+ Coverage   67.13%   67.16%   +0.02%     
==========================================
  Files         372      372              
  Lines       77768    77839      +71     
==========================================
+ Hits        52211    52277      +66     
- Misses      20887    20891       +4     
- Partials     4670     4671       +1
Impacted Files Coverage Δ
expression/util.go 73.48% <100%> (+0.9%) ⬆️
planner/core/find_best_task.go 87.9% <97.7%> (+2.06%) ⬆️
store/tikv/scan.go 73.94% <0%> (-3.37%) ⬇️
util/filesort/filesort.go 75.54% <0%> (-0.95%) ⬇️
executor/distsql.go 73% <0%> (+0.46%) ⬆️

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 b845f2a...8588b96. Read the comment docs.

@@ -567,11 +567,6 @@ func loadAllTests() ([]string, error) {
if strings.HasSuffix(name, ".test") {
name = strings.TrimSuffix(name, ".test")

// if we use record and the result file exists, skip generating
Copy link
Member

Choose a reason for hiding this comment

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

why change this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Make ./run-all-tests -r all work.

Copy link
Contributor

Choose a reason for hiding this comment

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

Nice, maybe the logic in tidb-test repo should also be changed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK, I will do it.

expression/util.go Outdated Show resolved Hide resolved
planner/core/find_best_task.go Outdated Show resolved Hide resolved
planner/core/find_best_task.go Outdated Show resolved Hide resolved
expression/util.go Show resolved Hide resolved
planner/core/find_best_task.go Outdated Show resolved Hide resolved
planner/core/find_best_task.go Show resolved Hide resolved
planner/core/find_best_task.go Outdated Show resolved Hide resolved
planner/core/find_best_task.go Outdated Show resolved Hide resolved
planner/core/find_best_task.go Outdated Show resolved Hide resolved
planner/core/find_best_task.go Outdated Show resolved Hide resolved
expression/util.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.

besides, could you add an explain test that shows the power of skyline pruning?

expression/util.go Outdated Show resolved Hide resolved
planner/core/find_best_task.go Outdated Show resolved Hide resolved
planner/core/find_best_task.go Show resolved Hide resolved
planner/core/find_best_task.go Show resolved Hide resolved
@alivxxx
Copy link
Contributor Author

alivxxx commented Feb 18, 2019

@zz-jason The test is in #9212, just wait for it.

@zz-jason
Copy link
Member

@zz-jason The test is in #9212, just wait for it.

got it 👌

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 the status/LGT1 Indicates that a PR has LGTM 1. label Feb 18, 2019
@zz-jason
Copy link
Member

/run-all-tests

@zz-jason zz-jason requested a review from XuHuaiyu February 18, 2019 12:31
planner/core/find_best_task.go Show resolved Hide resolved
planner/core/find_best_task.go Outdated Show resolved Hide resolved
Copy link
Contributor

@XuHuaiyu XuHuaiyu 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 added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Feb 19, 2019
@alivxxx alivxxx merged commit bc0e70d into pingcap:master Feb 19, 2019
@alivxxx alivxxx deleted the skyline branch February 19, 2019 03:19
alivxxx added a commit to alivxxx/tidb that referenced this pull request Feb 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

7 participants