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

[Go] Function group by on table #32545

Closed
asfimport opened this issue Jul 30, 2022 · 4 comments
Closed

[Go] Function group by on table #32545

asfimport opened this issue Jul 30, 2022 · 4 comments

Comments

@asfimport
Copy link

I'm trying to find some way to group data in Apache Arrow with golang, but I couldn't do it. There's a way to do this or it is only implemented in cpp and python.

Are there plans to implement this on future releases?

Reporter: Francisco Garcia

Note: This issue was originally created as ARROW-17264. Please see the migration documentation for further details.

@asfimport
Copy link
Author

George Godik / @ggodik:
can you provide an example of you would like the code to work and the result to look ?

@asfimport
Copy link
Author

Francisco Garcia:
this code is in python, I would like to do something similar in golang

>>> import pyarrow as pa
>>> t = pa.table([
...       pa.array(["a", "a", "b", "b", "c"]),
...       pa.array([1, 2, 3, 4, 5]),
... ], names=["keys", "values"])
>>> t.group_by("keys").aggregate([("values", "sum")])
pyarrow.Table
values_sum: int64
keys: string
----
values_sum: [[3,7,5]]
keys: [["a","b","c"]]

@asfimport
Copy link
Author

Matthew Topol / @zeroshade:
[~fgarcia.code] currently the library functions to perform grouping similar to the way that the C++ and Python libraries do are not yet implemented in Golang. There are plans to implement this for future releases, but I don't yet have a timeline for it that I can give you.

@asfimport
Copy link
Author

Francisco Garcia:
Thank you @zeroshade

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