Skip to content

Commit

Permalink
optimizer: Fix load unnecessary
Browse files Browse the repository at this point in the history
Fix a bug in optimizer for Load where Load what requesting an
unneccessary/unefficient merge for this for incoming values.
  • Loading branch information
mattnibs committed Aug 2, 2024
1 parent c39086b commit bebafa1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion compiler/optimizer/parallelize.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,10 @@ func (o *Optimizer) concurrentPath(ops []dag.Op, sortKey order.SortKey) (int, or
}
return k, newKey, false, true, nil
case *dag.Load:
return k, order.Nil, true, true, nil
// XXX At somepoint Load should have an optimization where if the
// upstream sort is the same as the Load destination sort we
// request a merge and set the Load operator to do a sorted write.
return k, order.Nil, false, false, nil
case *dag.Fork, *dag.Scatter, *dag.Head, *dag.Tail, *dag.Uniq, *dag.Fuse, *dag.Join:
return k, sortKey, true, true, nil
default:
Expand Down

0 comments on commit bebafa1

Please sign in to comment.