-
Notifications
You must be signed in to change notification settings - Fork 915
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
Fix index difference to follow the pandas format #14789
Merged
rapids-bot
merged 5 commits into
rapidsai:branch-24.02
from
amiralimi:fix-index-difference
Jan 25, 2024
Merged
Changes from 2 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
5886152
added the tests from the issue on GitHub.
amiralimi 50bac72
added .unique() to data so the output is a set.
amiralimi ea6ff8b
executed pre-commit run --all
amiralimi e3f1a87
Whitespace cleanup
shwina 27f8ef9
Merge branch 'branch-24.02' of github.com:rapidsai/cudf into fix-inde…
shwina File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we also call
unique()
on the right hand side to make the merge smaller?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried this with a few test cases, in some it had a better performance, and in some, it was worse. But pandas does this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I'd just add a note here to alert future readers about potential performance issues:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am somewhat surprised that calling unique on the right column sometimes improves performance.
unique
callsstable_distinct
which builds a hash table to uniquify things.The
leftanti
join builds a hash table for the right column and then probes that hash table with the left column to return those rows in the left column that are not in the hash table.So calling
unique()
on the right column would just seem to be an extra hash-table build for no gain.Can you show the test cases you ran to check performance @amiralimi ?