Skip to content

Commit

Permalink
Fix zip method yielded type
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeffail committed Sep 8, 2023
1 parent 9db1c6e commit 0c7fd7c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ All notable changes to this project will be documented in this file.
- The `switch` output now produces error logs when messages do not pass at least one case with `strict_mode` enabled, previously these rejected messages were potentially re-processed in a loop without any logs depending on the config. An inaccuracy to the documentation has also been fixed in order to clarify behaviour when strict mode is not enabled.
- The `log` processor `fields_mapping` field should no longer reject metadata queries using `@` syntax.
- Fixed an issue where heavily utilised streams with nested resource based outputs could lock-up when performing heavy resource mutating traffic on the streams mode REST API.
- The Bloblang `zip` method no longer produces values that yield an "Unknown data type".

## 4.20.0 - 2023-08-22

Expand Down
2 changes: 1 addition & 1 deletion internal/impl/pure/bloblang_objects.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ If a key within a nested path does not exist then it is ignored.`).
if len(i) != len(argSlices[0]) {
return nil, sizeError
}
resSlice := make([][]any, 0, len(i))
resSlice := make([]any, 0, len(i))
for offset, value := range i {
zipValue := make([]any, 0, len(argSlices)+1)
zipValue = append(zipValue, value)
Expand Down
8 changes: 4 additions & 4 deletions internal/impl/pure/bloblang_objects_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@ func TestZipMethod(t *testing.T) {
},
},
output: map[string]any{
"foo": [][]any{
{"a", 1, []any{"x"}},
{"b", 2, []any{"y"}},
{"c", 3, []any{"z"}},
"foo": []any{
[]any{"a", 1, []any{"x"}},
[]any{"b", 2, []any{"y"}},
[]any{"c", 3, []any{"z"}},
},
},
},
Expand Down

0 comments on commit 0c7fd7c

Please sign in to comment.