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

Add ARRAY_UNION_SUM analogous to MAP_UNION_SUM #22175

Open
kaikalur opened this issue Mar 12, 2024 · 0 comments
Open

Add ARRAY_UNION_SUM analogous to MAP_UNION_SUM #22175

kaikalur opened this issue Mar 12, 2024 · 0 comments

Comments

@kaikalur
Copy link
Contributor

WE have map_union_sum but not array_union_sum. I see some users going through hoops to do that. So I feel it'll be good to add that - just elementwise sum of arrays

select array_union_sum(x) from values( array[1,2,3], array[10,5,4,1],array[9,null,5,4])

should give:

array[20, 7,12,5]

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

No branches or pull requests

1 participant