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: rename optimizer hints #11673

Merged
merged 11 commits into from Aug 14, 2019

Conversation

foreyes
Copy link
Contributor

@foreyes foreyes commented Aug 8, 2019

What problem does this PR solve?

Support optimizer hint alias HASH_JOIN: TIDB_HJ, SM_JOIN: TIDB_SMJ, INL_JOIN: TIDB_INLJ.

Rename optimizer hints TIDB_HASHAGG() -> HASH_AGG, TIDB_STREAMAGG() -> STREAM_AGG, and remove brackets.

What is changed and how it works?

Add HintHJ, HintSMJ, HintINLJ have the same effect as TIDB hints.

We still keep TIDB style hints, for example, TIDB_HJ will have the same HintName as HASH_JOIN now.

Rename aggregation hints in parser and TiDB.

Check List

Tests

  • Unit test

Code changes

  • Has exported variables name changed.

Related changes

@codecov
Copy link

codecov bot commented Aug 8, 2019

Codecov Report

Merging #11673 into master will decrease coverage by 0.0837%.
The diff coverage is 93.75%.

@@               Coverage Diff                @@
##             master     #11673        +/-   ##
================================================
- Coverage   81.4841%   81.4003%   -0.0838%     
================================================
  Files           433        433                
  Lines         93525      93190       -335     
================================================
- Hits          76208      75857       -351     
- Misses        11881      11890         +9     
- Partials       5436       5443         +7

@foreyes foreyes removed the status/WIP label Aug 8, 2019
@foreyes foreyes requested review from lzmhhh123 and removed request for lzmhhh123 August 8, 2019 06:20
@foreyes foreyes changed the title [WIP] planner: rename optimizer hints planner: rename optimizer hints Aug 8, 2019
@foreyes
Copy link
Contributor Author

foreyes commented Aug 8, 2019

Idc fails because use go mod edit -replace, this will be fixed after parser PR is merged.

@foreyes
Copy link
Contributor Author

foreyes commented Aug 8, 2019

PTAL. @lzmhhh123 @lamxTyler @XuHuaiyu

Copy link
Contributor

@alivxxx alivxxx left a comment

Choose a reason for hiding this comment

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

LGTM

@foreyes
Copy link
Contributor Author

foreyes commented Aug 12, 2019

/run-all-tests

@foreyes
Copy link
Contributor Author

foreyes commented Aug 13, 2019

/run-all-tests

@foreyes
Copy link
Contributor Author

foreyes commented Aug 13, 2019

/run-all-tests

@foreyes
Copy link
Contributor Author

foreyes commented Aug 13, 2019

The solution of TIDB_HJ -> HASH_JOIN is not looks well because of the error and warning message. But I think we can improve it by solving this Issue: #11632

@foreyes
Copy link
Contributor Author

foreyes commented Aug 13, 2019

Ready for review, PTAL. @lzmhhh123

Copy link
Member

@lzmhhh123 lzmhhh123 left a comment

Choose a reason for hiding this comment

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

Do we also need to check the ineffective hints like use_index_merge and append a warning for it?

@foreyes
Copy link
Contributor Author

foreyes commented Aug 13, 2019

I think so, I will file an issue for it, like #11632 @lzmhhh123

Extract common warning message.

@foreyes
Copy link
Contributor Author

foreyes commented Aug 14, 2019

PTAL again. Just change some warning messages. @lamxTyler

Copy link
Member

@lzmhhh123 lzmhhh123 left a comment

Choose a reason for hiding this comment

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

LGTM.

@foreyes foreyes added the status/LGT1 Indicates that a PR has LGTM 1. label Aug 14, 2019
@foreyes
Copy link
Contributor Author

foreyes commented Aug 14, 2019

/run-all-test

@foreyes
Copy link
Contributor Author

foreyes commented Aug 14, 2019

/run-all-tests

@foreyes
Copy link
Contributor Author

foreyes commented Aug 14, 2019

/run-ci-test

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

sre-bot commented Aug 14, 2019

/run-all-tests

@sre-bot
Copy link
Contributor

sre-bot commented Aug 14, 2019

@foreyes merge failed.

@foreyes
Copy link
Contributor Author

foreyes commented Aug 14, 2019

/run-unit-test

1 similar comment
@foreyes
Copy link
Contributor Author

foreyes commented Aug 14, 2019

/run-unit-test

@foreyes foreyes merged commit 4491bf8 into pingcap:master Aug 14, 2019
@foreyes foreyes deleted the dev/rename_optimizer_hints branch August 14, 2019 11:31
foreyes added a commit to foreyes/tidb that referenced this pull request Sep 16, 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants