-
Notifications
You must be signed in to change notification settings - Fork 490
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
Add hint for broadcast join. #818
Conversation
Codecov Report
@@ Coverage Diff @@
## master #818 +/- ##
=======================================
Coverage 78.33% 78.33%
=======================================
Files 40 40
Lines 14765 14765
=======================================
Hits 11566 11566
Misses 2511 2511
Partials 688 688 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm.
is there a corresponding tidb pr?
merge master
fix compile error
Add perfer local hint for broadcast join
ast/misc.go
Outdated
@@ -2539,7 +2539,7 @@ func (n *TableOptimizerHint) Restore(ctx *format.RestoreCtx) error { | |||
switch n.HintName.L { | |||
case "max_execution_time": | |||
ctx.WritePlainf("%d", n.HintData.(uint64)) | |||
case "tidb_hj", "tidb_smj", "tidb_inlj", "hash_join", "merge_join", "inl_join", "bc_join", "tidb_bcj": | |||
case "tidb_hj", "tidb_smj", "tidb_inlj", "hash_join", "merge_join", "inl_join", "bc_join", "bcj_local", "tidb_bcj": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: according to https://www.abbreviations.com/abbreviation/BROADCAST, seems BRDCST
is a proper abbreviation for broadcast
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems brdcst is for media, I think it's quite verbose. Can we make it brief and easy to write ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you shorten it to "brdcst" i'd rather you just spell it out entirely
select /*+ broadcast_join(...) */ ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hanfei1991 @lzmhhh123 PTAL the comment from @kennytm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I support the bc_join
as the abbreviation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/merge |
Sorry @lzmhhh123, you don't have permission to trigger auto merge event on this branch. You are not a committer for the related sigs:ddl(slack). |
ast/misc.go
Outdated
@@ -2539,7 +2539,7 @@ func (n *TableOptimizerHint) Restore(ctx *format.RestoreCtx) error { | |||
switch n.HintName.L { | |||
case "max_execution_time": | |||
ctx.WritePlainf("%d", n.HintData.(uint64)) | |||
case "tidb_hj", "tidb_smj", "tidb_inlj", "hash_join", "merge_join", "inl_join", "bc_join", "tidb_bcj": | |||
case "tidb_hj", "tidb_smj", "tidb_inlj", "hash_join", "merge_join", "inl_join", "bc_join", "bcj_local", "tidb_bcj": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hanfei1991 @lzmhhh123 PTAL the comment from @kennytm
@zz-jason PTAL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/run-all-tests |
just wanna note that both |
cherry pick to release-4.0 failed |
* add hint for bc join * refine * add hint for bc join * refine * refine * refine * refine again * pass test * fix compile error * add prefer local * use bcj_local * change bc_join to broadcast_join Co-authored-by: xufei <xufeixw@mail.ustc.edu.cn> Co-authored-by: ichn-hu <zfhu16@fudan.edu.cn>
* add hint for bc join * refine * add hint for bc join * refine * refine * refine * refine again * pass test * fix compile error * add prefer local * use bcj_local * change bc_join to broadcast_join Co-authored-by: xufei <xufeixw@mail.ustc.edu.cn> Co-authored-by: ichn-hu <zfhu16@fudan.edu.cn> Co-authored-by: xufei <xufeixw@mail.ustc.edu.cn> Co-authored-by: ichn-hu <zfhu16@fudan.edu.cn>
* add hint for bc join * refine * add hint for bc join * refine * refine * refine * refine again * pass test * fix compile error * add prefer local * use bcj_local * change bc_join to broadcast_join Co-authored-by: xufei <xufeixw@mail.ustc.edu.cn> Co-authored-by: ichn-hu <zfhu16@fudan.edu.cn>
What problem does this PR solve?
Add hint for broadcast join.
What is changed and how it works?
Let parser support two new hints:
BC
meas broadcast, which is brief and easy to understand :)Check List
Tests
Code changes
only change parser
Side effects
on side effects
Related changes