Skip to content

Commit

Permalink
Handle vector.View in the over operator (#5534)
Browse files Browse the repository at this point in the history
I overlooked this in #5327.
  • Loading branch information
nwt authored Dec 16, 2024
1 parent f814699 commit 3e7870e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions runtime/vam/op/over.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ func (o *Over) flatten(vec vector.Any, slot uint32) vector.Any {
switch vec := vector.Under(vec).(type) {
case *vector.Dynamic:
return o.flatten(vec.Values[vec.Tags[slot]], vec.TagMap.Forward[slot])
case *vector.View:
return o.flatten(vec.Any, vec.Index[slot])
case *vector.Array:
return flattenArrayOrSet(vec.Values, vec.Offsets, slot)
case *vector.Set:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ zed: |
)
)
vector: true

input: |
[[1,2,3],[4,5,6]]
[[7,8,9]]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ zed: |
)
)
vector: true

input: |
[[1,2],[3,4]]
[[4,3],[2,1]]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ zed: |
)
)
vector: true

input: |
[[1,2],[3,4]]
[[4,3],[2,1]]
Expand Down

0 comments on commit 3e7870e

Please sign in to comment.