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

Short circuit Index.equal if compared Index isn't same type #18067

Merged
merged 5 commits into from
Feb 26, 2025

Conversation

mroeschke
Copy link
Contributor

Description

closes #8689

Before, comparing two different Index subclasses would execute a GPU kernel when we know they wouldn't be equal (e.g. DatetimeIndex equals RangeIndex). This PR add a short circuit clause to check that we are comparing the same subclasses.

Also ensures we don't return a np.bool_ object from this result.

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 Feb 21, 2025
@mroeschke mroeschke self-assigned this Feb 21, 2025
@mroeschke mroeschke requested a review from a team as a code owner February 21, 2025 20:26
@galipremsagar
Copy link
Contributor

/merge

@rapids-bot rapids-bot bot merged commit e5d866b into rapidsai:branch-25.04 Feb 26, 2025
107 checks passed
@mroeschke mroeschke deleted the perf/index/eq branch February 26, 2025 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

[BUG] Runtime error when comparing DatetimeIndex to RangeIndex
2 participants