Skip to content

Adopt OrderScheme metadata in cudf-polars#22291

Draft
rjzamora wants to merge 8 commits intorapidsai:mainfrom
rjzamora:adopt-orderscheme
Draft

Adopt OrderScheme metadata in cudf-polars#22291
rjzamora wants to merge 8 commits intorapidsai:mainfrom
rjzamora:adopt-orderscheme

Conversation

@rjzamora
Copy link
Copy Markdown
Member

Description

These changes lay the foundation for tracking and using metadata about the "sortedness" of the data we are passing through the channel in cudf-polars. The next step after this is to attach an OrderScheme to the ChannelMetadata within a sort_actor.

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@rjzamora rjzamora self-assigned this Apr 24, 2026
@rjzamora rjzamora added 2 - In Progress Currently a work in progress improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Apr 24, 2026
@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot Bot commented Apr 24, 2026

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@github-actions github-actions Bot added Python Affects Python cuDF API. cudf-polars Issues specific to cudf-polars labels Apr 24, 2026
@GPUtester GPUtester moved this to In Progress in cuDF Python Apr 24, 2026
rapids-bot Bot pushed a commit that referenced this pull request Apr 29, 2026
- Closes #22050
- **Updates `Sort` lowering**:
  - The "rapidsmpf" runtime no longer uses `Sort(ShuffleSorted(Sort(...)))` - We leave most `Sort` nodes alone.
  - We map `Sort` directly to `sort_actor` - The `sort_actor` performs it's own top/bottom-k optimization and performs chunk-wise sorting itself.

**Motivation**: The `Sort(ShuffleSorted(Sort(...)))` pattern will be too messy when we start utilizing `OrderScheme` metadata (after #22291). The current assumption that the child IR node is always a `Sort` is also not true/safe.

**Note**: This PR technically adds code, but it will allow us to *remove* more code once "tasks" is removed (everything `ShuffleSorted` related).

Authors:
  - Richard (Rick) Zamora (https://github.com/rjzamora)

Approvers:
  - Matthew Roeschke (https://github.com/mroeschke)

URL: #22315
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2 - In Progress Currently a work in progress cudf-polars Issues specific to cudf-polars improvement Improvement / enhancement to an existing function non-breaking Non-breaking change Python Affects Python cuDF API.

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

2 participants