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

Enable sorting on column with nulls using query-planning #15639

Merged
merged 7 commits into from
May 9, 2024

Conversation

rjzamora
Copy link
Member

@rjzamora rjzamora commented May 2, 2024

Description

Related to #15027

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 added bug Something isn't working non-breaking Non-breaking change labels May 2, 2024
@rjzamora rjzamora self-assigned this May 2, 2024
@github-actions github-actions bot added the Python Affects Python cuDF API. label May 2, 2024
@rjzamora rjzamora marked this pull request as ready for review May 2, 2024 23:12
@rjzamora rjzamora requested a review from a team as a code owner May 2, 2024 23:12
Copy link
Contributor

@wence- wence- left a comment

Choose a reason for hiding this comment

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

Minor request for a little more doc on the differences.



def _cudf_layer(self):
if hasattr(self._meta, "to_pandas"):
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: this canary for whether or not we have a cudf-backed object is also true for pyarrow objects I think. I know this is a hypothetical right now, but just noting it.

Copy link
Contributor

Choose a reason for hiding this comment

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

Could you add a short comment about what exactly this code does differently from the upstream version such that it can handle nulls?

Copy link
Member Author

Choose a reason for hiding this comment

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

nit: this canary for whether or not we have a cudf-backed object is also true for pyarrow objects I think. I know this is a hypothetical right now, but just noting it.

Yeah, sorry. This was used as a simple toggle when I was experimenting in the dask-expr code itself. If the code lives in dask-cudf, we can do an instance check.

Could you add a short comment about what exactly this code does differently from the upstream version such that it can handle nulls?

Yes. I agree that a more-thorough comment is definitely needed here.

@rjzamora rjzamora added the 2 - In Progress Currently a work in progress label May 6, 2024
@rjzamora rjzamora marked this pull request as draft May 6, 2024 14:06
@rjzamora rjzamora changed the title Add custom cudf logic for RepartitionQuantiles in dask-expr Enable sorting on column with nulls using query-planning May 6, 2024
@@ -72,7 +72,7 @@ def test_sort_repartition():
dd.assert_eq(len(new_ddf), len(ddf))


@xfail_dask_expr("dask-expr code path fails with nulls")
@xfail_dask_expr("missing null support", lt_version="2024.5.1")
Copy link
Member Author

Choose a reason for hiding this comment

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

I'd like this test to run for anything newer than the "2024.5.0" release (including main). Not sure of the "correct" way to do this.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think that is correct. pytest.mark.xfail(some_condition, reason="some_reason") which is what this expands to is the canonical way.

@rjzamora rjzamora marked this pull request as ready for review May 9, 2024 13:39
@rjzamora rjzamora added 5 - Ready to Merge Testing and reviews complete, ready to merge and removed 2 - In Progress Currently a work in progress labels May 9, 2024
@rjzamora
Copy link
Member Author

rjzamora commented May 9, 2024

/merge

@rapids-bot rapids-bot bot merged commit 69fe213 into rapidsai:branch-24.06 May 9, 2024
70 checks passed
@rjzamora rjzamora deleted the handle-null-sorting branch May 9, 2024 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5 - Ready to Merge Testing and reviews complete, ready to merge bug Something isn't working non-breaking Non-breaking change Python Affects Python cuDF API.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants