Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typedef for merge vrl function with deep = true is invalid #42

Open
fuchsnj opened this issue Jul 18, 2022 · 0 comments
Open

Typedef for merge vrl function with deep = true is invalid #42

fuchsnj opened this issue Jul 18, 2022 · 0 comments
Labels
type: bug A code related bug vrl: typedef Changes to the type system

Comments

@fuchsnj
Copy link
Member

fuchsnj commented Jul 18, 2022

A note for the community

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Problem

The type definition does not look at the deep parameter. It always assumes it's false.

$ merge({"x": {"a": 1}},{"x": {"b": 2}}, false)
{ "x": { "b": 2 } }

$ type_def(merge({"x": {"a": 1}},{"x": {"b": 2}}, false))
{ "object": { "x": { "object": { "b": { "integer": true } } } } }

$ merge({"x": {"a": 1}},{"x": {"b": 2}}, true)
{ "x": { "a": 1, "b": 2 } }

$ type_def(merge({"x": {"a": 1}},{"x": {"b": 2}}, true))
{ "object": { "x": { "object": { "b": { "integer": true } } } } }

Version

0.23.0

@fuchsnj fuchsnj added type: bug A code related bug vrl: typedef Changes to the type system labels Jul 18, 2022
@fuchsnj fuchsnj changed the title Typedef for merge with deep = true is invalid Typedef for merge vrl function with deep = true is invalid Nov 28, 2022
@fuchsnj fuchsnj transferred this issue from vectordotdev/vector Mar 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A code related bug vrl: typedef Changes to the type system
Projects
None yet
Development

No branches or pull requests

1 participant