Skip to content

Conversation

@dangotbanned
Copy link
Member

@dangotbanned dangotbanned commented Dec 17, 2025

Description

I mentioned in (#3356 (comment)) that I had a solution for this one.

Related issues

@dangotbanned dangotbanned mentioned this pull request Dec 17, 2025
10 tasks
@dangotbanned dangotbanned added internal pyarrow Issue is related to pyarrow backend labels Dec 17, 2025
- Most `list.*` methods won't work for nested lists
- Making this easier to spot next time by keeping `implode/explode` together
- Renamed `order_by` -> `by`
- More clearly separate tabular/array input
  - `pyarrow` accepts keys when sorting arrays
  - But they are noops, so removing that here
- Add a docstring
  - Mainly for the precedence part
@dangotbanned dangotbanned marked this pull request as ready for review December 18, 2025 15:38
@dangotbanned dangotbanned added the documentation Improvements or additions to documentation label Dec 18, 2025
Comment on lines +167 to +169
def _ensure_single_nulls_last(self, backend: Backend, /) -> bool:
return self.nulls_last

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a bit of a hack to avoid a runtime check between SortOptions and SortMultipleOptions in sort_indices

def _ensure_single_nulls_last(self, backend: Backend, /) -> bool:
first = self.nulls_last[0]
if len(self.nulls_last) != 1 and any(x != first for x in self.nulls_last[1:]):
msg = f"{Implementation.from_backend(backend)!r} does not support multiple values for `nulls_last`, got: {self.nulls_last!r}" # pragma: no cover

@dangotbanned dangotbanned merged commit 9b9122b into oh-nodes Dec 18, 2025
38 of 43 checks passed
@dangotbanned dangotbanned deleted the expr-ir/list-sort-2 branch December 18, 2025 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation internal pyarrow Issue is related to pyarrow backend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants