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

[C++][Compute] Add OrderByNode for ordering of rows in an ExecPlan #29192

Closed
asfimport opened this issue Aug 3, 2021 · 3 comments
Closed

[C++][Compute] Add OrderByNode for ordering of rows in an ExecPlan #29192

asfimport opened this issue Aug 3, 2021 · 3 comments

Comments

@asfimport
Copy link
Collaborator

asfimport commented Aug 3, 2021

To provide sorting capability

Reporter: Ben Kietzman / @bkietz
Assignee: David Li / @lidavidm

Related issues:

PRs and other links:

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

@asfimport
Copy link
Collaborator Author

Ian Cook / @ianmcook:
In the R package, we implemented Table and RecordBatch sorting, to enable support for the dplyr arrange() function. We did this by using the  take and sort_indices kernels.

Here's where it happens: 

# Arrange rows
if (length(x$arrange_vars) > 0) {
tab <- tab[
tab$SortIndices(names(x$arrange_vars), x$arrange_desc),
names(x$selected_columns), # this omits x$temp_columns from the result
drop = FALSE
]
}

[ calls take and SortIndices calls sort_indices.

 

@asfimport
Copy link
Collaborator Author

David Li / @lidavidm:
I'm going to work steal this just so that more of us get some experience writing ExecNodes

@asfimport
Copy link
Collaborator Author

Ben Kietzman / @bkietz:
Issue resolved by pull request 10863
#10863

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

2 participants