Skip to content

Commit

Permalink
parser: support hash_join_build and hash_join_probe (#37308)
Browse files Browse the repository at this point in the history
  • Loading branch information
Reminiscent authored Aug 29, 2022
1 parent ccd4f34 commit 1ffbfcc
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 37 deletions.
2 changes: 1 addition & 1 deletion parser/ast/misc.go
Original file line number Diff line number Diff line change
Expand Up @@ -3573,7 +3573,7 @@ func (n *TableOptimizerHint) Restore(ctx *format.RestoreCtx) error {
ctx.WritePlainf("%d", n.HintData.(uint64))
case "nth_plan":
ctx.WritePlainf("%d", n.HintData.(int64))
case "tidb_hj", "tidb_smj", "tidb_inlj", "hash_join", "hash_build", "hash_probe", "merge_join", "inl_join", "broadcast_join", "inl_hash_join", "inl_merge_join", "leading":
case "tidb_hj", "tidb_smj", "tidb_inlj", "hash_join", "hash_join_build", "hash_join_probe", "merge_join", "inl_join", "broadcast_join", "inl_hash_join", "inl_merge_join", "leading":
for i, table := range n.Tables {
if i != 0 {
ctx.WritePlain(", ")
Expand Down
4 changes: 2 additions & 2 deletions parser/ast/misc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,8 @@ func TestTableOptimizerHintRestore(t *testing.T) {
{"INL_MERGE_JOIN(t1,t2)", "INL_MERGE_JOIN(`t1`, `t2`)"},
{"INL_JOIN(t1,t2)", "INL_JOIN(`t1`, `t2`)"},
{"HASH_JOIN(t1,t2)", "HASH_JOIN(`t1`, `t2`)"},
{"HASH_BUILD(t1)", "HASH_BUILD(`t1`)"},
{"HASH_PROBE(t1)", "HASH_PROBE(`t1`)"},
{"HASH_JOIN_BUILD(t1)", "HASH_JOIN_BUILD(`t1`)"},
{"HASH_JOIN_PROBE(t1)", "HASH_JOIN_PROBE(`t1`)"},
{"LEADING(t1)", "LEADING(`t1`)"},
{"LEADING(t1, c1)", "LEADING(`t1`, `c1`)"},
{"LEADING(t1, c1, t2)", "LEADING(`t1`, `c1`, `t2`)"},
Expand Down
Loading

0 comments on commit 1ffbfcc

Please sign in to comment.