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
[C++] How do I sort RecordBatch using SortOptions? #41591
Comments
Could you use We have arrow/cpp/src/arrow/compute/api_vector.h Lines 513 to 536 in 318d22a
|
After using sort_indices, I indeed obtained a sorted index array. How should I use this array to sort the RecordBatch?Because I'm going to sort a RecordBatch. |
You can use |
arrow/cpp/src/arrow/compute/api_vector.h Lines 352 to 371 in 318d22a
|
Thank you very much for your answer, it's very helpful for me. But now I have another question: If I have multiple (let's say 4) sorted RecordBatches, how can I merge them into one sorted RecordBatch? Let's assume that the RecordBatches are sorted according to a specified arrow::compute::SortKey. |
How about using |
How about |
Describe the usage question you have. Please include as many useful details as possible.
I want to sort a RecordBatch, and I noticed the SortOptions class in compute, so I wrote the following code:
But here I'm not sure if the usage is correct, and I don't know what function name to pass to CallFunction. I didn't find any sorting-related instructions in the official documentation. How should I implement sorting for RecordBatch?
Component(s)
C++
The text was updated successfully, but these errors were encountered: