Skip to content

planner/core: support query block hint#11861

Merged
alivxxx merged 8 commits into
pingcap:masterfrom
alivxxx:query-block
Aug 29, 2019
Merged

planner/core: support query block hint#11861
alivxxx merged 8 commits into
pingcap:masterfrom
alivxxx:query-block

Conversation

@alivxxx
Copy link
Copy Markdown
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
Copy Markdown

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

Comment thread planner/core/hints.go Outdated
Comment thread planner/core/hints.go
Comment thread planner/core/hints.go
Comment thread planner/core/hints.go Outdated
@alivxxx alivxxx requested a review from eurekaka August 26, 2019 12:19
Copy link
Copy Markdown
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
Comment thread planner/core/hints.go Outdated
Comment thread planner/core/hints.go
@alivxxx alivxxx requested a review from winoros August 28, 2019 09:37
Copy link
Copy Markdown
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
Copy Markdown
Contributor

sre-bot commented Aug 29, 2019

/run-all-tests

@sre-bot
Copy link
Copy Markdown
Contributor

sre-bot commented Aug 29, 2019

@lamxTyler merge failed.

@alivxxx
Copy link
Copy Markdown
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.

5 participants