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

WIP: Support decimal dtypes #17113

Draft
wants to merge 1 commit into
base: branch-25.02
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions python/cudf_polars/cudf_polars/utils/dtypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,5 +141,8 @@ def from_polars(dtype: pl.DataType) -> plc.DataType:
# Recurse to catch unsupported inner types
_ = from_polars(dtype.inner)
return plc.DataType(plc.TypeId.LIST)
elif isinstance(dtype, pl.Decimal):
# TODO: Loses precision and just goes to max precision of 38
return plc.DataType(plc.TypeId.DECIMAL128, scale=-dtype.scale)
else:
raise NotImplementedError(f"{dtype=} conversion not supported")
Loading