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

Empty array flatten regression since "improve flatten performance by reducing copy" #141

Closed
wader opened this issue Oct 20, 2021 · 2 comments

Comments

@wader
Copy link
Contributor

wader commented Oct 20, 2021

gojq master

$ go run cmd/gojq/main.go -n '[] | flatten'
null

gojq a1a2550~1

$ go run cmd/gojq/main.go -n '[] | flatten'
[]

I think the problem is that the new version ends up doing [] | add for [] input. Just add a special case or is there some neater way?

@itchyny
Copy link
Owner

itchyny commented Oct 20, 2021

Thanks for catch.

@wader
Copy link
Contributor Author

wader commented Oct 20, 2021

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants