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

executor: move IT in pkg/executor/partition_table_test to tests/integrationtest #47957

Merged
merged 6 commits into from
Oct 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 0 additions & 3 deletions pkg/executor/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,12 @@ import (

var testDataMap = make(testdata.BookKeeper)
var prepareMergeSuiteData testdata.TestData
var executorSuiteData testdata.TestData
var slowQuerySuiteData testdata.TestData

func TestMain(m *testing.M) {
testsetup.SetupForCommonTest()
testDataMap.LoadTestSuiteData("testdata", "executor_suite")
testDataMap.LoadTestSuiteData("testdata", "prepare_suite")
testDataMap.LoadTestSuiteData("testdata", "slow_query_suite")
executorSuiteData = testDataMap["executor_suite"]
prepareMergeSuiteData = testDataMap["prepare_suite"]
slowQuerySuiteData = testDataMap["slow_query_suite"]

Expand Down
1,512 changes: 0 additions & 1,512 deletions pkg/executor/partition_table_test.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pkg/executor/test/partitiontest/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ go_test(
],
flaky = True,
race = "on",
shard_count = 5,
shard_count = 4,
deps = [
"//pkg/testkit",
"@com_github_pingcap_failpoint//:failpoint",
Expand Down
54 changes: 0 additions & 54 deletions pkg/executor/test/partitiontest/partition_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -447,57 +447,3 @@ func TestPartitionedTableDelete(t *testing.T) {
tk.CheckExecResult(1, 0)
tk.MustExec(`drop table t1;`)
}

func TestPartitionOnMissing(t *testing.T) {
store := testkit.CreateMockStore(t)
tk := testkit.NewTestKit(t, store)
tk.MustExec("create schema OnMissing")
tk.MustExec("use OnMissing")
tk.MustExec(`set global tidb_partition_prune_mode='dynamic'`)
tk.MustExec(`set session tidb_partition_prune_mode='dynamic'`)

tk.MustExec(`CREATE TABLE tt1 (
id INT NOT NULL,
listid INT,
name varchar(10),
primary key (listid) clustered
)
PARTITION BY LIST (listid) (
PARTITION p1 VALUES IN (1),
PARTITION p2 VALUES IN (2),
PARTITION p3 VALUES IN (3),
PARTITION p4 VALUES IN (4)
)`)

tk.MustExec(`CREATE TABLE tt2 (
id INT NOT NULL,
listid INT
)`)

tk.MustExec(`create index idx_listid on tt1(id,listid)`)
tk.MustExec(`create index idx_listid on tt2(listid)`)

tk.MustExec(`insert into tt1 values(1,1,1)`)
tk.MustExec(`insert into tt1 values(2,2,2)`)
tk.MustExec(`insert into tt1 values(3,3,3)`)
tk.MustExec(`insert into tt1 values(4,4,4)`)
tk.MustExec(`insert into tt2 values(1,1)`)
tk.MustExec(`insert into tt2 values(2,2)`)
tk.MustExec(`insert into tt2 values(3,3)`)
tk.MustExec(`insert into tt2 values(4,4)`)
tk.MustExec(`insert into tt2 values(5,5)`)

tk.MustExec(`analyze table tt1`)
tk.MustExec(`analyze table tt2`)

tk.MustQuery(`select /*+ inl_join(tt1)*/ count(*) from tt2
left join tt1 on tt1.listid=tt2.listid and tt1.id=tt2.id`).Check(testkit.Rows("5"))
tk.MustQuery(`select /*+ inl_join(tt1)*/ count(*) from tt2
left join tt1 on tt1.listid=tt2.listid`).Check(testkit.Rows("5"))
tk.MustQuery(`explain format = 'brief' select /*+ inl_join(tt1)*/ count(*) from tt2
left join tt1 on tt1.listid=tt2.listid`).Check(testkit.Rows(""+
"StreamAgg 1.00 root funcs:count(Column#13)->Column#7",
"└─IndexReader 1.00 root index:StreamAgg",
" └─StreamAgg 1.00 cop[tikv] funcs:count(1)->Column#13",
" └─IndexFullScan 5.00 cop[tikv] table:tt2, index:idx_listid(listid) keep order:false"))
}
559 changes: 0 additions & 559 deletions pkg/executor/testdata/executor_suite_in.json

This file was deleted.

Loading