You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It definitely makes sense to implement the same functionality for Go and it's on my list of stuff I intend to get to, but if you wanna try your hand at it, that would be awesome. 😄
We already have a Take kernel in the Go compute that works with Tables (and Records, ChunkedArrays and Arrays) so you'd just need to first implement a sort_indices vector-kernel which would output the list of indexes for ordering things (like the Acero C++ sort_indices kernel). After that is implemented and able to take a Table, it's a fairly simple combination of operations => Take(table, sort_indices(table)) == sorted table
@hermanschaaf Sounds great! Feel free to file a draft PR and tag me to ask for help if you need or if you have any questions.
Just make sure that when you file the PR (draft or otherwise) the title should start with GH-34690: [Go] .... so that it auto links it to this issue. Thanks!
Agree completely with everything you have here! One recommendation is to look at the c++ arrow sort_indices implementation for inspiration as the compute package here is based on the C++ compute package.
Do we also want public methods like the following?
Don't forget SortIndices(Datum) and Sort(Datum) which would just dispatch to CallFunction appropriately.
Activity
zeroshade commentedon Mar 22, 2023
It definitely makes sense to implement the same functionality for Go and it's on my list of stuff I intend to get to, but if you wanna try your hand at it, that would be awesome. 😄
We already have a
Takekernel in the Go compute that works with Tables (and Records, ChunkedArrays and Arrays) so you'd just need to first implement asort_indicesvector-kernel which would output the list of indexes for ordering things (like the Acero C++sort_indiceskernel). After that is implemented and able to take a Table, it's a fairly simple combination of operations =>Take(table, sort_indices(table)) == sorted tablehermanschaaf commentedon Mar 23, 2023
I'd like to take a look at this. It'll be my first contribution to Arrow and I might need some pointers, but I'll give it a shot. 😄
zeroshade commentedon Mar 23, 2023
@hermanschaaf Sounds great! Feel free to file a draft PR and tag me to ask for help if you need or if you have any questions.
Just make sure that when you file the PR (draft or otherwise) the title should start with
GH-34690: [Go] ....so that it auto links it to this issue. Thanks!ostafen-m2d commentedon Sep 10, 2025
@zeroshade What is the state of this feature? I'm willing to contribute to the development of this.
zeroshade commentedon Sep 10, 2025
The current state is stalled, we'd be happy to get a contribution to the development of this! File a PR and I'll make sure it gets reviewed. Thanks!!
hamilton-earthscope commentedon Dec 11, 2025
Hi @zeroshade I like your guidance above:
Take(table, sort_indices(table)) == sorted table. That overarching design makes sense to me.I'm interested in your thoughts on the public interface and the implementation of the kernel.
What I'm thinking for the kernel is:
For the public interface, I'm trying to mimic the Take* public methods. Here's what I'm thinking (pseudocode):
Take(table, sort_indices(table)) == sorted tableoccurswhich are registered with
FunctionRegistry.AddFunction()with namessort_indicesandsort, respectively.Do we also want public methods like the following?
zeroshade commentedon Apr 3, 2026
Agree completely with everything you have here! One recommendation is to look at the c++ arrow sort_indices implementation for inspiration as the compute package here is based on the C++ compute package.
Don't forget
SortIndices(Datum)andSort(Datum)which would just dispatch toCallFunctionappropriately.feat(arrow/compute): sort support (apache#749)