Skip to content

Commit

Permalink
compare(): return error when error is encountered
Browse files Browse the repository at this point in the history
  • Loading branch information
mattnibs committed Feb 18, 2025
1 parent 79a220d commit 6411a61
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions runtime/sam/expr/function/compare.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ func (e *Compare) Call(_ super.Allocator, args []super.Value) super.Value {
}
nullsMax = args[2].Bool()
}
if args[0].IsError() {
return args[0]
}
if args[1].IsError() {
return args[1]
}
cmp := e.nullsMax
if !nullsMax {
cmp = e.nullsMin
Expand Down

0 comments on commit 6411a61

Please sign in to comment.