Skip to content

Commit

Permalink
refactor: Reduce the number of objects in Projection.Call (#21129)
Browse files Browse the repository at this point in the history
Reduce the number of objects in Projection.Call

Approved by: @badboynt1, @aunjgr, @ouyuanning
  • Loading branch information
huby2358 authored Jan 9, 2025
1 parent a9fbae3 commit 694b7c0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/sql/colexec/projection/projection.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,9 @@ func (projection *Projection) Call(proc *process.Process) (vm.CallResult, error)

// keep shuffleIDX unchanged
projection.ctr.buf.ShuffleIDX = bat.ShuffleIDX
batches := []*batch.Batch{bat}
for i := range projection.ctr.projExecutors {
vec, err := projection.ctr.projExecutors[i].Eval(proc, []*batch.Batch{bat}, nil)
vec, err := projection.ctr.projExecutors[i].Eval(proc, batches, nil)
if err != nil {
return vm.CancelResult, err
}
Expand Down

0 comments on commit 694b7c0

Please sign in to comment.