Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion runtime/sam/expr/eval.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ func NewIn(sctx *super.Context, elem, container Evaluator) *In {
}

func (i *In) Eval(this super.Value) super.Value {
elem := i.elem.Eval(this)
elem := i.elem.Eval(this).Deunion()
if elem.IsError() {
return elem
}
Expand Down
21 changes: 21 additions & 0 deletions runtime/ztests/expr/in.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,27 @@ output: |

---

spq: |
values this in [1,2::(int64|null),null,error(0)]

vector: true

input: |
1::(int64|null)
2
null
null::(int64|null)
error(0)

output: |
true
true
null
null
error(0)

---

# Test in expressions on a map constant.
spq: |
const m = |{"a":1,"b":2}|
Expand Down