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

Cannot sort by multiple columns including Decimal column #17009

Open
2 tasks done
stinodego opened this issue Jun 17, 2024 · 0 comments
Open
2 tasks done

Cannot sort by multiple columns including Decimal column #17009

stinodego opened this issue Jun 17, 2024 · 0 comments
Labels
A-dtype-decimal Area: decimal data type A-ops-sort Area: sorting operations bug Something isn't working P-low Priority: low python Related to Python Polars

Comments

@stinodego
Copy link
Member

Checks

  • I have checked that this issue has not already been reported.
  • I have confirmed this bug exists on the latest version of Polars.

Reproducible example

import polars as pl

df = pl.DataFrame({"a": [None], "b": [None]}, schema={"a": pl.Decimal(), "b": pl.Int64})
result = df.sort("a", "b")
print(result)

Log output

Traceback (most recent call last):
  File "/home/stijn/code/polars/py-polars/repro.py", line 8, in <module>
    result = df.sort("a", "b")
             ^^^^^^^^^^^^^^^^^
  File "/home/stijn/code/polars/py-polars/polars/dataframe/frame.py", line 4727, in sort
    .collect(_eager=True)
     ^^^^^^^^^^^^^^^^^^^^
  File "/home/stijn/code/polars/py-polars/polars/lazyframe/frame.py", line 1896, in collect
    return wrap_df(ldf.collect(callback))
                   ^^^^^^^^^^^^^^^^^^^^^
polars.exceptions.InvalidOperationError: `arg_sort_multiple` operation not supported for dtype `decimal[*,0]`

Issue description

This sort is not supported, when it should be.

Expected behavior

Sorting works.

Installed versions

main

@stinodego stinodego added bug Something isn't working python Related to Python Polars A-dtype-decimal Area: decimal data type A-ops-sort Area: sorting operations labels Jun 17, 2024
@stinodego stinodego added the P-low Priority: low label Jun 17, 2024
@github-project-automation github-project-automation bot moved this to Ready in Backlog Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-dtype-decimal Area: decimal data type A-ops-sort Area: sorting operations bug Something isn't working P-low Priority: low python Related to Python Polars
Projects
Status: Ready
Development

No branches or pull requests

1 participant