Skip to content

Commit

Permalink
fix data race (#250)
Browse files Browse the repository at this point in the history
  • Loading branch information
liguozhong authored May 3, 2023
1 parent 0bf53f6 commit c5232b7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions engine/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,11 @@ type Opts struct {
func (o Opts) getLogicalOptimizers() []logicalplan.Optimizer {
var optimizers []logicalplan.Optimizer
if o.LogicalOptimizers == nil {
optimizers = logicalplan.DefaultOptimizers
optimizers = make([]logicalplan.Optimizer, len(logicalplan.DefaultOptimizers))
copy(optimizers, logicalplan.DefaultOptimizers)
} else {
optimizers = o.LogicalOptimizers
optimizers = make([]logicalplan.Optimizer, len(o.LogicalOptimizers))
copy(optimizers, o.LogicalOptimizers)
}
return append(optimizers, logicalplan.TrimSortFunctions{})
}
Expand Down

0 comments on commit c5232b7

Please sign in to comment.