Skip to content

Commit

Permalink
7
Browse files Browse the repository at this point in the history
Signed-off-by: Zhigao Tong <[email protected]>
  • Loading branch information
solotzg committed Apr 11, 2023
1 parent 1288c3d commit eaf6f23
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 0 deletions.
6 changes: 6 additions & 0 deletions planner/core/casetest/enforce_mpp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,12 @@ func TestMPPSingleDistinct3Stage(t *testing.T) {
//
// since it doesn't change the schema out (index ref is still the right), so by now it's fine. SEE case: EXPLAIN select count(distinct a), count(distinct b), sum(c) from t.
func TestMPPMultiDistinct3Stage(t *testing.T) {
ori := core.BroadCastJoinScaleFactor
core.BroadCastJoinScaleFactor = 1
defer func() {
core.BroadCastJoinScaleFactor = ori
}()

store := testkit.CreateMockStore(t, internal.WithMockTiFlash(2))
tk := testkit.NewTestKit(t, store)

Expand Down
12 changes: 12 additions & 0 deletions planner/core/casetest/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1042,6 +1042,12 @@ func TestViewHintScope(t *testing.T) {
}

func TestAllViewHintType(t *testing.T) {
ori := core.BroadCastJoinScaleFactor
core.BroadCastJoinScaleFactor = 1
defer func() {
core.BroadCastJoinScaleFactor = ori
}()

store := testkit.CreateMockStore(t, internal.WithMockTiFlash(2))
tk := testkit.NewTestKit(t, store)

Expand Down Expand Up @@ -1107,6 +1113,12 @@ func TestAllViewHintType(t *testing.T) {
}

func TestJoinHintCompatibility(t *testing.T) {
ori := core.BroadCastJoinScaleFactor
core.BroadCastJoinScaleFactor = 1
defer func() {
core.BroadCastJoinScaleFactor = ori
}()

store := testkit.CreateMockStore(t, internal.WithMockTiFlash(2))
tk := testkit.NewTestKit(t, store)

Expand Down
6 changes: 6 additions & 0 deletions planner/core/casetest/physical_plan_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -653,6 +653,12 @@ func TestUnmatchedTableInHint(t *testing.T) {
}

func TestIssue37520(t *testing.T) {
ori := core.BroadCastJoinScaleFactor
core.BroadCastJoinScaleFactor = 1
defer func() {
core.BroadCastJoinScaleFactor = ori
}()

store := testkit.CreateMockStore(t, internal.WithMockTiFlash(2))
tk := testkit.NewTestKit(t, store)
tk.MustExec("use test")
Expand Down
12 changes: 12 additions & 0 deletions planner/core/physical_plan_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,12 @@ func TestIndexLookupCartesianJoin(t *testing.T) {
}

func TestMPPHintsWithBinding(t *testing.T) {
ori := core.BroadCastJoinScaleFactor
core.BroadCastJoinScaleFactor = 1
defer func() {
core.BroadCastJoinScaleFactor = ori
}()

store := testkit.CreateMockStore(t, internal.WithMockTiFlash(2))
tk := testkit.NewTestKit(t, store)
tk.MustExec("use test")
Expand Down Expand Up @@ -267,6 +273,12 @@ func TestMPPHintsWithBinding(t *testing.T) {
}

func TestJoinHintCompatibilityWithBinding(t *testing.T) {
ori := core.BroadCastJoinScaleFactor
core.BroadCastJoinScaleFactor = 1
defer func() {
core.BroadCastJoinScaleFactor = ori
}()

store := testkit.CreateMockStore(t, internal.WithMockTiFlash(2))
tk := testkit.NewTestKit(t, store)
tk.MustExec("use test")
Expand Down

0 comments on commit eaf6f23

Please sign in to comment.