Skip to content

Commit a075775

Browse files
authored
planner: remove useless code (#61227)
1 parent 62abfe6 commit a075775

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

pkg/planner/core/util.go

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -230,26 +230,7 @@ func BuildPhysicalJoinSchema(joinType logicalop.JoinType, join base.PhysicalPlan
230230
return newSchema
231231
}
232232

233-
// GetStatsInfoFromFlatPlan gets the statistics info from a FlatPhysicalPlan.
234-
func GetStatsInfoFromFlatPlan(flat *FlatPhysicalPlan) map[string]uint64 {
235-
res := make(map[string]uint64)
236-
for _, op := range flat.Main {
237-
switch p := op.Origin.(type) {
238-
case *PhysicalIndexScan:
239-
if _, ok := res[p.Table.Name.O]; p.StatsInfo() != nil && !ok {
240-
res[p.Table.Name.O] = p.StatsInfo().StatsVersion
241-
}
242-
case *PhysicalTableScan:
243-
if _, ok := res[p.Table.Name.O]; p.StatsInfo() != nil && !ok {
244-
res[p.Table.Name.O] = p.StatsInfo().StatsVersion
245-
}
246-
}
247-
}
248-
return res
249-
}
250-
251233
// GetStatsInfo gets the statistics info from a physical plan tree.
252-
// Deprecated: FlattenPhysicalPlan() + GetStatsInfoFromFlatPlan() is preferred.
253234
func GetStatsInfo(i any) map[string]uint64 {
254235
if i == nil {
255236
// it's a workaround for https://github.com/pingcap/tidb/issues/17419

0 commit comments

Comments
 (0)