plancodec: fix a miss case in conversion (#35957)
close pingcap/tidb#35956
This commit is contained in:
@ -394,6 +394,8 @@ func PhysicalIDToTypeString(id int) string {
|
||||
return TypeBatchPointGet
|
||||
case typeClusterMemTableReader:
|
||||
return TypeClusterMemTableReader
|
||||
case typeDataSourceID:
|
||||
return TypeDataSource
|
||||
case typeLoadDataID:
|
||||
return TypeLoadData
|
||||
case typeTableSampleID:
|
||||
|
||||
@ -87,3 +87,9 @@ func TestPlanIDChanged(t *testing.T) {
|
||||
require.Equal(t, testcase.Expected, testcase.Value)
|
||||
}
|
||||
}
|
||||
|
||||
func TestReverse(t *testing.T) {
|
||||
for i := 1; i <= 55; i++ {
|
||||
require.Equal(t, TypeStringToPhysicalID(PhysicalIDToTypeString(i)), i)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user