Skip to content

Commit b41c17f

Browse files
committed
fix
1 parent 9bec5f6 commit b41c17f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pkg/statistics/handle/autoanalyze/priorityqueue/dynamic_partitioned_table_analysis_job_test.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,12 +133,14 @@ func TestValidateAndPrepareForDynamicPartitionedTable(t *testing.T) {
133133
tk.MustExec("create table example_table (a int, b int, index idx(a)) partition by range (a) (partition p0 values less than (2), partition p1 values less than (4))")
134134
tableInfo, err := dom.InfoSchema().TableByName(context.Background(), ast.NewCIStr("example_schema"), ast.NewCIStr("example_table"))
135135
require.NoError(t, err)
136+
partitionInfo := tableInfo.Meta().GetPartitionInfo()
137+
require.NotNil(t, partitionInfo)
136138
job := &priorityqueue.DynamicPartitionedTableAnalysisJob{
137139
SchemaName: "example_schema",
138140
GlobalTableID: tableInfo.Meta().ID,
139141
PartitionIDs: map[int64]struct{}{
140-
113: {},
141-
114: {},
142+
partitionInfo.Definitions[0].ID: {},
143+
partitionInfo.Definitions[1].ID: {},
142144
},
143145
Weight: 2,
144146
}

0 commit comments

Comments
 (0)