Skip to content

Commit

Permalink
Revert "address comments"
Browse files Browse the repository at this point in the history
This reverts commit 626fd5e.
  • Loading branch information
winoros committed Nov 24, 2023
1 parent 626fd5e commit 161ef7b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/planner/core/rule_column_pruning.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import (
"bytes"
"context"
"fmt"
"slices"

"github.com/pingcap/tidb/pkg/expression"
"github.com/pingcap/tidb/pkg/expression/aggregation"
Expand Down Expand Up @@ -291,7 +290,7 @@ func (p *LogicalUnionAll) PruneColumns(parentUsedCols []*expression.Column, opt
for i := len(used) - 1; i >= 0; i-- {
if !used[i] {
prunedColumns = append(prunedColumns, p.schema.Columns[i])
p.schema.Columns = slices.Delete(p.schema.Columns, i, i)
p.schema.Columns = append(p.schema.Columns[:i], p.schema.Columns[i+1:]...)
}
}
appendColumnPruneTraceStep(p, prunedColumns, opt)
Expand Down

0 comments on commit 161ef7b

Please sign in to comment.