Skip to content

Commit

Permalink
opt: fix scalar building error handling
Browse files Browse the repository at this point in the history
We are incorrectly returning `nil` error in an error case. This leads
to an assertion error instead of a "could not decorrelate subquery"
error.

Fixes cockroachdb#40590.

Release note: None
  • Loading branch information
RaduBerinde committed Oct 17, 2019
1 parent 2859f9b commit 9fdb141
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/sql/opt/exec/execbuilder/relational_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ func (b *Builder) buildApplyJoin(join memo.RelExpr) (execPlan, error) {
if len(*filters) != 0 {
onExpr, err = b.buildScalar(&ctx, filters)
if err != nil {
return execPlan{}, nil
return execPlan{}, err
}
}

Expand Down

0 comments on commit 9fdb141

Please sign in to comment.