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

fix: Fix Expr.over applying scale incorrectly for Decimal types #21140

Merged
merged 1 commit into from
Feb 8, 2025

Conversation

lukemanley
Copy link
Contributor

fixes #21096

import polars as pl

df = pl.Series("x", [1, 2], pl.Decimal(scale=2)).to_frame()
df.select(pl.col("x").min().over("x"))

Before:

shape: (2, 1)
┌──────────────┐
│ x            │
│ ---          │
│ decimal[*,2] │
╞══════════════╡
│ 100.00       │
│ 200.00       │
└──────────────┘

After:

shape: (2, 1)
┌──────────────┐
│ x            │
│ ---          │
│ decimal[*,2] │
╞══════════════╡
│ 1.00         │
│ 2.00         │
└──────────────┘

@github-actions github-actions bot added fix Bug fix python Related to Python Polars rust Related to Rust Polars labels Feb 8, 2025
Copy link

codecov bot commented Feb 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.87%. Comparing base (1aab51c) to head (42b7665).
Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #21140   +/-   ##
=======================================
  Coverage   79.87%   79.87%           
=======================================
  Files        1593     1593           
  Lines      227467   227467           
  Branches     2600     2600           
=======================================
+ Hits       181686   181689    +3     
+ Misses      45184    45181    -3     
  Partials      597      597           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ritchie46 ritchie46 merged commit e8e0295 into pola-rs:main Feb 8, 2025
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Bug fix python Related to Python Polars rust Related to Rust Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Decimal data type corruption
2 participants