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

Move cudf._lib.sort to cudf.core._internals #17488

Merged
merged 19 commits into from
Dec 13, 2024

Conversation

mroeschke
Copy link
Contributor

Description

Contributes to #17317

Checklist

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

@mroeschke mroeschke added Python Affects Python cuDF API. improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Dec 3, 2024
@mroeschke mroeschke self-assigned this Dec 3, 2024
@mroeschke mroeschke requested a review from a team as a code owner December 3, 2024 02:15
@github-actions github-actions bot added the CMake CMake build issue label Dec 3, 2024
Comment on lines 56 to 59
column_order = [plc.types.Order.DESCENDING] * len(source_columns)
for idx, val in enumerate(ascending):
if val:
column_order[idx] = plc.types.Order.ASCENDING
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
column_order = [plc.types.Order.DESCENDING] * len(source_columns)
for idx, val in enumerate(ascending):
if val:
column_order[idx] = plc.types.Order.ASCENDING
column_order = [
plc.types.Order.ASCENDING if val else plc.types.Order.DESCENDING
]

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good idea. (Incorporated the missing for loop here though)

Comment on lines 69 to 72
null_precedence = [plc.types.NullOrder.AFTER] * len(source_columns)
for idx, val in enumerate(null_position):
if val:
null_precedence[idx] = plc.types.NullOrder.BEFORE
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
null_precedence = [plc.types.NullOrder.AFTER] * len(source_columns)
for idx, val in enumerate(null_position):
if val:
null_precedence[idx] = plc.types.NullOrder.BEFORE
null_precedence = [
plc.types.NullOrder.BEFORE if val else plc.types.NullOrder.AFTER
]

@mroeschke
Copy link
Contributor Author

/merge

@rapids-bot rapids-bot bot merged commit 1a67646 into rapidsai:branch-25.02 Dec 13, 2024
105 checks passed
@mroeschke mroeschke deleted the cudf/_lib/sort branch December 13, 2024 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CMake CMake build issue improvement Improvement / enhancement to an existing function non-breaking Non-breaking change Python Affects Python cuDF API.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants