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++] Ensure sorting Table, RecordBatch can sort Struct and Dictionary cols #33206

Closed
asfimport opened this issue Oct 12, 2022 · 1 comment · Fixed by #35727
Closed

[C++] Ensure sorting Table, RecordBatch can sort Struct and Dictionary cols #33206

asfimport opened this issue Oct 12, 2022 · 1 comment · Fixed by #35727

Comments

@asfimport
Copy link
Collaborator

Reporter: Alessandro Molina / @amol-

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

@jorisvandenbossche
Copy link
Member

Some relevant discussion on the topic at #14369 (comment)

@pitrou pitrou added this to the 13.0.0 milestone Jun 20, 2023
pitrou pushed a commit that referenced this issue Jun 20, 2023
…eys (#35727)

### Rationale for this change

We don't currently support sorting `StructArray`s despite already having the high-level facilities to do so. For instance, we allow passing multiple sort keys (based on `FieldRef`s) to sort record batches and tables - but the current implementations are fairly limited since nested refs aren't allowed (due to the burden of null flattening). Since #35197, we now have an easier way to do this.

### What changes are included in this PR?

- Adds support for `StructArray` in `sort_indices`
- Adds support for nested sort keys in `sort_indices` for `RecordBatch`, `ChunkedArray`, and `Table`

### Are these changes tested?

Yes (tests are included)

### Are there any user-facing changes?

Yes
* Closes: #33206

Authored-by: benibus <bpharks@gmx.com>
Signed-off-by: Antoine Pitrou <antoine@python.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants