Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
qw4990 committed May 6, 2024
1 parent d1d2855 commit 9abb91d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions pkg/planner/core/common_unity.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@ func getPossibleHints(ctx context.PlanContext, o *UnityOutput) {
// use_index hint
for idxName := range tblInfo.Indexes {
possibleHints[fmt.Sprintf("use_index(%v, %v)", hintTableName, idxName)] = true
possibleHints[fmt.Sprintf("ignore_index(%v, %v)", hintTableName, idxName)] = true
}
}
if len(hintTableNames) >= 2 {
Expand Down
2 changes: 1 addition & 1 deletion pkg/planner/core/common_unity_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func TestUnity(t *testing.T) {
tk.MustExec(`create table t5 (a int, b int, c int, primary key (a, b), key(c))`)
//formatPrint(tk, `explain format='unity' select * from t1, t2 where t1.a=t2.a`)
//formatPrint(tk, `explain format='unity' select 1 from t1, t2, t3 where t1.a=t2.a and t2.a=t3.a`)
formatPrint(tk, `explain format='unity' select a from t4`)
formatPrint(tk, `explain format='unity' select a from t5`)
}

func formatPrint(tk *testkit.TestKit, sql string) {
Expand Down

0 comments on commit 9abb91d

Please sign in to comment.