Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
don't shadow the loop induction variable
  • Loading branch information
henrybw committed Oct 31, 2025
commit 1078e5ecfccacd7e1aa2d59bd0f673bb3575d2bc
4 changes: 2 additions & 2 deletions pkg/planner/core/operator/logicalop/logical_datasource.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,8 @@ func (ds *DataSource) PruneColumns(parentUsedCols []*expression.Column) (base.Lo
continue
}
delete(ds.ColIdxsByName, ds.Columns[i].Name.L)
for i := i + 1; i < len(ds.Columns); i++ {
ds.ColIdxsByName[ds.Columns[i].Name.L] = i - 1
for j := i + 1; j < len(ds.Columns); j++ {
ds.ColIdxsByName[ds.Columns[j].Name.L] = j - 1
}
// TODO: investigate why we cannot use slices.Delete for these two:
ds.Schema().Columns = append(ds.Schema().Columns[:i], ds.Schema().Columns[i+1:]...)
Expand Down