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
4 changes: 2 additions & 2 deletions runtime/sam/expr/agg/fuser.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ func (f *Fuser) fuseMono(typ super.Type) super.Type {
switch typ := typ.(type) {
case *super.TypeRecord:
fields := slices.Clone(typ.Fields)
for _, field := range fields {
field.Type = f.fuseMono(field.Type)
for i, field := range fields {
fields[i].Type = f.fuseMono(field.Type)
}
out = f.sctx.MustLookupTypeRecord(fields)
case *super.TypeArray:
Expand Down
14 changes: 14 additions & 0 deletions runtime/ztests/op/aggregate/fuse.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,17 @@ input: |

output: |
<{fixed:{x:int64},var:fusion({s:string,a?:[int64],t?:fusion(int64|{x:int64})})}>

---

spq: fuse(this)

vector: true

input: |
{a:[1,2]}
{a:["foo"]}
{a:[null]}

output: |
<{a:fusion([fusion(int64|string|null)])}>
16 changes: 16 additions & 0 deletions runtime/ztests/op/blend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,22 @@ spq: blend

vector: true

input: |
{a:[1,2]}
{a:["foo"]}
{a:[null]}

output: |
{a:[1,2]::[int64|string|null]}
{a:["foo"]::[int64|string|null]}
{a:[null]::[int64|string|null]}

---

spq: blend

vector: true

input: |
1::=p1
{a:1::=r1}::=r2
Expand Down
16 changes: 16 additions & 0 deletions runtime/ztests/op/fuse.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,22 @@ spq: fuse

vector: true

input: |
{a:[1,2]}
{a:["foo"]}
{a:[null]}

output: |
{a:fusion([fusion(1::(int64|string|null),<int64>),fusion(2::(int64|string|null),<int64>)],<[int64]>)}
{a:fusion([fusion("foo"::(int64|string|null),<string>)],<[string]>)}
{a:fusion([fusion(null::(int64|string|null),<null>)],<[null]>)}

---

spq: fuse

vector: true

input: |
1::=p1
{a:1::=r1}::=r2
Expand Down
Loading