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: support query block hint #11861

Merged
merged 8 commits into from
Aug 29, 2019
Merged

Conversation

alivxxx
Copy link
Contributor

@alivxxx alivxxx commented Aug 26, 2019

What problem does this PR solve?

Support using query block in optimizer hint.

What is changed and how it works?

This PR will first tranverse the ast and assign the offset of stmt within the sql from left to right, then group hints in a top down style and let them take effects at specific query block.

Check List

Tests

  • Integration test

Code changes

  • Has exported function/method change

Side effects

  • None

Related changes

  • None

@codecov
Copy link

codecov bot commented Aug 26, 2019

Codecov Report

Merging #11861 into master will not change coverage.
The diff coverage is n/a.

@@             Coverage Diff             @@
##             master     #11861   +/-   ##
===========================================
  Coverage   81.5803%   81.5803%           
===========================================
  Files           443        443           
  Lines         96066      96066           
===========================================
  Hits          78371      78371           
  Misses        12218      12218           
  Partials       5477       5477

planner/core/hints.go Outdated Show resolved Hide resolved
planner/core/hints.go Show resolved Hide resolved
planner/core/hints.go Show resolved Hide resolved
planner/core/hints.go Outdated Show resolved Hide resolved
@alivxxx alivxxx requested a review from eurekaka August 26, 2019 12:19
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 Aug 27, 2019
planner/core/hints.go Outdated Show resolved Hide resolved
planner/core/hints.go Show resolved Hide resolved
@alivxxx alivxxx requested a review from winoros August 28, 2019 09:37
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

@alivxxx alivxxx added status/LGT2 Indicates that a PR has LGTM 2. status/can-merge Indicates a PR has been approved by a committer. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Aug 29, 2019
@sre-bot
Copy link
Contributor

sre-bot commented Aug 29, 2019

/run-all-tests

@sre-bot
Copy link
Contributor

sre-bot commented Aug 29, 2019

@lamxTyler merge failed.

@alivxxx
Copy link
Contributor Author

alivxxx commented Aug 29, 2019

/run-unit-test

@alivxxx alivxxx merged commit 3de23f0 into pingcap:master Aug 29, 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/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2. type/new-feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants