Skip to content

Commit

Permalink
planner: column pruning should use a shallow copy slice (#53237) (#53322
Browse files Browse the repository at this point in the history
)

close #52768
  • Loading branch information
ti-chi-bot authored Jun 9, 2024
1 parent b4f3a10 commit a03d354
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion planner/core/rule_column_pruning.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ type columnPruner struct {
}

func (*columnPruner) optimize(_ context.Context, lp LogicalPlan, opt *logicalOptimizeOp) (LogicalPlan, error) {
err := lp.PruneColumns(lp.Schema().Columns, opt)
err := lp.PruneColumns(append([]*expression.Column{}, lp.Schema().Columns...), opt)
return lp, err
}

Expand Down

0 comments on commit a03d354

Please sign in to comment.