Add how="leftanti" support for cudf-backed merge#1073
Open
charlesbluca wants to merge 4 commits intodask:mainfrom
Open
Add how="leftanti" support for cudf-backed merge#1073charlesbluca wants to merge 4 commits intodask:mainfrom
how="leftanti" support for cudf-backed merge#1073charlesbluca wants to merge 4 commits intodask:mainfrom
Conversation
rjzamora
reviewed
May 29, 2024
Member
rjzamora
left a comment
There was a problem hiding this comment.
Thanks @charlesbluca - Seems reasonable to add "leftanti" support given that the necessary logic is pretty simple, and the legacy dask.dataframe API supports it.
| df2 = df2.rename(columns={"aa": "dd"}) | ||
| assert_eq( | ||
| df1.merge(df2, how="leftanti", left_on="aa", right_on="dd"), | ||
| pdf1[~pdf1.aa.isin(pdf2.aa)], |
Member
There was a problem hiding this comment.
Seems like we could just do this in merge_chunk for pandas data to support how="leftanti" for cpu as well.
Member
Author
There was a problem hiding this comment.
Yeah good point, can look into this a bit more
Member
Author
There was a problem hiding this comment.
Pushed some commits to dask/dask#11150 that, in conjunction with this PR, should unblock left anti/semi joins on CPU
3 tasks
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Looks like we should unblocked to support left anti joins when
dataframe.backend="cudf", similar to the case in legacy Dask dataframe:https://github.com/dask/dask/blob/df4de6ea53054790b09006c8ea68ef8725d39025/dask/dataframe/multi.py#L565
Note that like the legacy code, we'll fail somewhere down in the comptutation stack if we try this on CPU - not sure if it makes sense to check the backend if
how="leftanti"and eagerly raise aNotImplementedErrorifdataframe.backend != "cudf".cc @rjzamora