Skip to content

Commit

Permalink
Remove runtime/sam/op/join.New error return param (#5638)
Browse files Browse the repository at this point in the history
It's always nil.
  • Loading branch information
nwt authored Feb 10, 2025
1 parent 90c1f36 commit a69b860
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
5 changes: 1 addition & 4 deletions compiler/kernel/op.go
Original file line number Diff line number Diff line change
Expand Up @@ -662,10 +662,7 @@ func (b *Builder) compile(o dag.Op, parents []zbuf.Puller) ([]zbuf.Puller, error
default:
return nil, fmt.Errorf("unknown kind of join: '%s'", o.Style)
}
join, err := join.New(b.rctx, anti, inner, leftParent, rightParent, leftKey, rightKey, leftDir, rightDir, lhs, rhs, b.resetters)
if err != nil {
return nil, err
}
join := join.New(b.rctx, anti, inner, leftParent, rightParent, leftKey, rightKey, leftDir, rightDir, lhs, rhs, b.resetters)
return []zbuf.Puller{join}, nil
case *dag.Merge:
b.resetResetters()
Expand Down
4 changes: 2 additions & 2 deletions runtime/sam/op/join/join.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ type Op struct {
}

func New(rctx *runtime.Context, anti, inner bool, left, right zbuf.Puller, leftKey, rightKey expr.Evaluator,
leftDir, rightDir order.Direction, lhs []*expr.Lval, rhs []expr.Evaluator, resetter expr.Resetter) (*Op, error) {
leftDir, rightDir order.Direction, lhs []*expr.Lval, rhs []expr.Evaluator, resetter expr.Resetter) *Op {
var o order.Which
switch {
case leftDir != order.Unknown:
Expand Down Expand Up @@ -66,7 +66,7 @@ func New(rctx *runtime.Context, anti, inner bool, left, right zbuf.Puller, leftK
compare: expr.NewValueCompareFn(o, true),
cutter: expr.NewCutter(rctx.Zctx, lhs, rhs),
types: make(map[int]map[int]*super.TypeRecord),
}, nil
}
}

// Pull implements the merge logic for returning data from the upstreams.
Expand Down

0 comments on commit a69b860

Please sign in to comment.