Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
wshwsh12 committed Aug 30, 2022
1 parent 525f8d8 commit 625a91f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions planner/core/fragment.go
Original file line number Diff line number Diff line change
Expand Up @@ -305,9 +305,9 @@ func partitionPruning(ctx sessionctx.Context, tbl table.PartitionedTable, conds
if len(partitionNames) == 0 {
ret = []table.PhysicalTable{tbl.GetPartition(pi.Definitions[0].ID)}
} else {
for i, def := range pi.Definitions {
for _, def := range pi.Definitions {
if def.Name.L == partitionNames[0].L {
ret = []table.PhysicalTable{tbl.GetPartition(pi.Definitions[i].ID)}
ret = []table.PhysicalTable{tbl.GetPartition(def.ID)}
break
}
}
Expand Down

0 comments on commit 625a91f

Please sign in to comment.