Skip to content

[BUG/DOC] cudf-polars does not return precision=None decimal dtypes #19975

@Matt711

Description

@Matt711

Describe the bug
See the repro

Steps/Code to reproduce bug

In [5]: import polars as pl
   ...: from decimal import Decimal
   ...: 
   ...: df = pl.LazyFrame(
   ...:     {
   ...:         "bar": [Decimal("1.23"), Decimal("4.56"), Decimal("7.89")],
   ...:     },
   ...:     schema={"bar": pl.Decimal(scale=2)},
   ...: )
   ...: 
   ...: df.collect()
Out[5]: 
shape: (3, 1)
┌──────────────┐
│ bar          │
│ ---          │
│ decimal[*,2] │
╞══════════════╡
│ 1.23         │
│ 4.56         │
│ 7.89         │
└──────────────┘

In [6]: df.collect(engine="gpu")
Out[6]: 
shape: (3, 1)
┌───────────────┐
│ bar           │
│ ---           │
│ decimal[38,2] │
╞═══════════════╡
│ 1.23          │
│ 4.56          │
│ 7.89          │
└───────────────┘

Expected behavior
We can document this behavior for now. Given that polars will eventually remove precision, we should be able to match polars CPU exectly at that time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    No status

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions