Skip to content

Commit

Permalink
Fix sort return args (#5310)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattnibs authored Sep 30, 2024
1 parent 7472e49 commit 402bd93
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
6 changes: 1 addition & 5 deletions compiler/kernel/vop.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,7 @@ func (b *Builder) compileVamLeaf(o dag.Op, parent vector.Puller) (vector.Puller,
}
sortExprs = append(sortExprs, samexpr.NewSortEvaluator(k, s.Order))
}
sort, err := vamop.NewSort(b.rctx, parent, sortExprs, o.NullsFirst, o.Reverse, b.resetters)
if err != nil {
return nil, fmt.Errorf("compiling sort: %w", err)
}
return sort, nil
return vamop.NewSort(b.rctx, parent, sortExprs, o.NullsFirst, o.Reverse, b.resetters), nil
case *dag.Rename:
srcs, dsts, err := b.compileAssignmentsToLvals(o.Args)
if err != nil {
Expand Down
9 changes: 3 additions & 6 deletions runtime/vam/op/sort.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,10 @@ type Sort struct {
samsort *sort.Op
}

func NewSort(rctx *runtime.Context, parent vector.Puller, fields []expr.SortEvaluator, nullsFirst, reverse bool, resetter expr.Resetter) (*Sort, error) {
func NewSort(rctx *runtime.Context, parent vector.Puller, fields []expr.SortEvaluator, nullsFirst, reverse bool, resetter expr.Resetter) *Sort {
materializer := vam.NewMaterializer(parent)
s, err := sort.New(rctx, materializer, fields, nullsFirst, reverse, resetter)
if err != nil {
return nil, err
}
return &Sort{rctx: rctx, samsort: s}, nil
s := sort.New(rctx, materializer, fields, nullsFirst, reverse, resetter)
return &Sort{rctx: rctx, samsort: s}
}

func (s *Sort) Pull(done bool) (vector.Any, error) {
Expand Down

0 comments on commit 402bd93

Please sign in to comment.