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 |
kennytm
left a comment
There was a problem hiding this comment.
lgtm.
is there a corresponding tidb pr?
merge master
fix compile error
Add perfer local hint for broadcast join
ast/misc.go
Outdated
| 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.
Nit: according to https://www.abbreviations.com/abbreviation/BROADCAST, seems BRDCST is a proper abbreviation for broadcast
There was a problem hiding this comment.
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.
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.
@hanfei1991 @lzmhhh123 PTAL the comment from @kennytm
There was a problem hiding this comment.
I support the bc_join as the abbreviation.
|
/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
| 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.
@hanfei1991 @lzmhhh123 PTAL the comment from @kennytm
|
@zz-jason PTAL |
|
/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:
BCmeas broadcast, which is brief and easy to understand :)Check List
Tests
Code changes
only change parser
Side effects
on side effects
Related changes