Skip to content
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

planner: add more test cases for outer join's leading hint #36125

Merged
merged 23 commits into from
Jul 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
53dcb0e
add the outer leading hint test cases with join algorithm hint
Reminiscent Jul 12, 2022
261fc0f
add the outer leading hint test cases with partition table
Reminiscent Jul 12, 2022
0772b6b
add the outer leading hint test cases with tiflash
Reminiscent Jul 12, 2022
ffe4470
add the outer leading hint test cases with subquery
Reminiscent Jul 12, 2022
ec74614
Merge branch 'master' of https://github.com/pingcap/tidb into test-ou…
Reminiscent Jul 12, 2022
8b2179c
Merge branch 'master' into test-outer-leading
Reminiscent Jul 18, 2022
5ea7f4a
Merge branch 'master' of https://github.com/pingcap/tidb into test-ou…
Reminiscent Jul 18, 2022
d7896da
update the test results
Reminiscent Jul 18, 2022
0cbde16
Merge remote-tracking branch 'origin/test-outer-leading' into test-ou…
Reminiscent Jul 18, 2022
a178476
update the test results
Reminiscent Jul 19, 2022
5c4f063
Merge branch 'master' of https://github.com/pingcap/tidb into test-ou…
Reminiscent Jul 19, 2022
d9b36af
update the test results
Reminiscent Jul 19, 2022
f70b440
update the test results
Reminiscent Jul 19, 2022
2189d18
Merge branch 'master' of https://github.com/pingcap/tidb into test-ou…
Reminiscent Jul 19, 2022
5105e9a
update the test results
Reminiscent Jul 20, 2022
0968ced
Merge branch 'master' of https://github.com/pingcap/tidb into test-ou…
Reminiscent Jul 20, 2022
1ef09ad
update the test results
Reminiscent Jul 20, 2022
ce5d63a
update the test results
Reminiscent Jul 20, 2022
85bf28c
update the test results
Reminiscent Jul 20, 2022
eb9dd42
Merge branch 'master' of https://github.com/pingcap/tidb into test-ou…
Reminiscent Jul 20, 2022
e0efc41
update the test results
Reminiscent Jul 20, 2022
5b76ed9
Merge branch 'master' into test-outer-leading
ti-chi-bot Jul 20, 2022
ce00ceb
Merge branch 'master' into test-outer-leading
ti-chi-bot Jul 20, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion planner/core/rule_join_reorder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,9 @@ func TestJoinOrderHint4StaticPartitionTable(t *testing.T) {
tk.MustExec(`create table t1(a int, b int) partition by hash(a) partitions 4`)
tk.MustExec(`create table t2(a int, b int) partition by hash(a) partitions 5`)
tk.MustExec(`create table t3(a int, b int) partition by hash(b) partitions 3`)
tk.MustExec(`create table t4(a int, b int) partition by hash(a) partitions 4`)
tk.MustExec(`create table t5(a int, b int) partition by hash(a) partitions 5`)
tk.MustExec(`create table t6(a int, b int) partition by hash(b) partitions 3`)

tk.MustExec(`set @@tidb_partition_prune_mode="static"`)
runJoinReorderTestData(t, tk, "TestJoinOrderHint4StaticPartitionTable")
Expand All @@ -230,6 +233,9 @@ func TestJoinOrderHint4DynamicPartitionTable(t *testing.T) {
tk.MustExec(`create table t1(a int, b int) partition by hash(a) partitions 4`)
tk.MustExec(`create table t2(a int, b int) partition by hash(a) partitions 5`)
tk.MustExec(`create table t3(a int, b int) partition by hash(b) partitions 3`)
tk.MustExec(`create table t4(a int, b int) partition by hash(a) partitions 4`)
tk.MustExec(`create table t5(a int, b int) partition by hash(a) partitions 5`)
tk.MustExec(`create table t6(a int, b int) partition by hash(b) partitions 3`)

tk.MustExec(`set @@tidb_partition_prune_mode="dynamic"`)
runJoinReorderTestData(t, tk, "TestJoinOrderHint4DynamicPartitionTable")
Expand Down Expand Up @@ -265,6 +271,9 @@ func TestJoinOrderHint4TiFlash(t *testing.T) {
tk.MustExec("create table t1(a int, b int, key(a));")
tk.MustExec("create table t2(a int, b int, key(a));")
tk.MustExec("create table t3(a int, b int, key(a));")
tk.MustExec("create table t4(a int, b int, key(a));")
tk.MustExec("create table t5(a int, b int, key(a));")
tk.MustExec("create table t6(a int, b int, key(a));")

// Create virtual tiflash replica info.
dom := domain.GetDomain(tk.Session())
Expand All @@ -273,7 +282,7 @@ func TestJoinOrderHint4TiFlash(t *testing.T) {
require.True(t, exists)
for _, tblInfo := range db.Tables {
tableName := tblInfo.Name.L
if tableName == "t" || tableName == "t1" || tableName == "t2" || tableName == "t3" {
if tableName == "t" || tableName == "t1" || tableName == "t2" || tableName == "t3" || tableName == "t4" || tableName == "t5" || tableName == "t6" {
tblInfo.TiFlashReplica = &model.TiFlashReplicaInfo{
Count: 1,
Available: true,
Expand Down
Loading