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

Implement equality operation for Decimal types #12118

Closed
stinodego opened this issue Oct 30, 2023 · 0 comments · Fixed by #14338
Closed

Implement equality operation for Decimal types #12118

stinodego opened this issue Oct 30, 2023 · 0 comments · Fixed by #14338
Labels
A-dtype-decimal Area: decimal data type accepted Ready for implementation enhancement New feature or an improvement of an existing feature P-medium Priority: medium python Related to Python Polars

Comments

@stinodego
Copy link
Member

stinodego commented Oct 30, 2023

Reproducible example

import polars as pl
from decimal import Decimal as D

s1 = pl.Series([D("1.00000"), D("2.00000")], dtype=pl.Decimal)
s2 = pl.Series([D("1.00000"), D("2.00001")], dtype=pl.Decimal)

result = s1 == s2
# pyo3_runtime.PanicException: not implemented

Issue description

Decimal equality is not implemented.

Expected behavior

Result should be [True, False]

from polars.testing import assert_series_equal

expected = pl.Series([True, False])
assert_series_equal(result, expected)
@stinodego stinodego added bug Something isn't working python Related to Python Polars accepted Ready for implementation labels Oct 30, 2023
@stinodego stinodego changed the title Decimal equality not implemented Implement equality operation for Decimal types Jan 12, 2024
@stinodego stinodego added enhancement New feature or an improvement of an existing feature A-dtype-decimal Area: decimal data type and removed bug Something isn't working labels Jan 12, 2024
@stinodego stinodego added the P-medium Priority: medium label Jan 16, 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 accepted Ready for implementation enhancement New feature or an improvement of an existing feature P-medium Priority: medium python Related to Python Polars
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant