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

[data] sort() does not work with string column with None #48927

Closed
wingkitlee0 opened this issue Nov 26, 2024 · 1 comment
Closed

[data] sort() does not work with string column with None #48927

wingkitlee0 opened this issue Nov 26, 2024 · 1 comment
Assignees
Labels
bug Something that is supposed to be working; but isn't data Ray Data-related issues triage Needs triage (eg: priority, bug/not-bug, and owning component)

Comments

@wingkitlee0
Copy link
Contributor

wingkitlee0 commented Nov 26, 2024

What happened + What you expected to happen

When applying sort() on a string column with None, it will raise the following error

TypeError: '<' not supported between instances of 'str' and 'NoneType'

Versions / Dependencies

In [21]: ray.__version__
Out[21]: '2.39.0'

Reproduction script

In [17]: df = pd.DataFrame({"x": [None, None, "a", "c", None]})

In [18]: df.sort_values(by="x")
Out[18]:
      x
2     a
3     c
0  None
1  None
4  None

In [19]: ds = ray.data.from_pandas(df)

In [20]: ds.sort("x").take_all()

gives an error. However, pandas Dataframe works.

Issue Severity

Medium: It is a significant difficulty but I can work around it.

@wingkitlee0 wingkitlee0 added bug Something that is supposed to be working; but isn't triage Needs triage (eg: priority, bug/not-bug, and owning component) labels Nov 26, 2024
@jcotant1 jcotant1 added the data Ray Data-related issues label Nov 26, 2024
raulchen added a commit that referenced this issue Dec 3, 2024
Closes: #48926
#48927
<!-- Please give a short summary of the change and the problem this
solves. -->


Signed-off-by: Superskyyy <yihaochen@apache.org>
Signed-off-by: Richard Liaw <rliaw@berkeley.edu>
Signed-off-by: Hao Chen <chenh1024@gmail.com>
Co-authored-by: Richard Liaw <rliaw@berkeley.edu>
Co-authored-by: Hao Chen <chenh1024@gmail.com>
jecsand838 pushed a commit to jecsand838/ray that referenced this issue Dec 4, 2024
…8969)

Closes: ray-project#48926
ray-project#48927
<!-- Please give a short summary of the change and the problem this
solves. -->

Signed-off-by: Superskyyy <yihaochen@apache.org>
Signed-off-by: Richard Liaw <rliaw@berkeley.edu>
Signed-off-by: Hao Chen <chenh1024@gmail.com>
Co-authored-by: Richard Liaw <rliaw@berkeley.edu>
Co-authored-by: Hao Chen <chenh1024@gmail.com>
Signed-off-by: Connor Sanders <connor@elastiflow.com>
@alexeykudinkin
Copy link
Contributor

This should be fixed by #48750

dentiny pushed a commit to dentiny/ray that referenced this issue Dec 7, 2024
…8969)

Closes: ray-project#48926
ray-project#48927
<!-- Please give a short summary of the change and the problem this
solves. -->


Signed-off-by: Superskyyy <yihaochen@apache.org>
Signed-off-by: Richard Liaw <rliaw@berkeley.edu>
Signed-off-by: Hao Chen <chenh1024@gmail.com>
Co-authored-by: Richard Liaw <rliaw@berkeley.edu>
Co-authored-by: Hao Chen <chenh1024@gmail.com>
Signed-off-by: hjiang <dentinyhao@gmail.com>
ujjawal-khare pushed a commit to ujjawal-khare-27/ray that referenced this issue Dec 17, 2024
…8969)

Closes: ray-project#48926
ray-project#48927
<!-- Please give a short summary of the change and the problem this
solves. -->

Signed-off-by: Superskyyy <yihaochen@apache.org>
Signed-off-by: Richard Liaw <rliaw@berkeley.edu>
Signed-off-by: Hao Chen <chenh1024@gmail.com>
Co-authored-by: Richard Liaw <rliaw@berkeley.edu>
Co-authored-by: Hao Chen <chenh1024@gmail.com>
Signed-off-by: ujjawal-khare <ujjawal.khare@dream11.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that is supposed to be working; but isn't data Ray Data-related issues triage Needs triage (eg: priority, bug/not-bug, and owning component)
Projects
None yet
Development

No branches or pull requests

4 participants