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: Raise on oob decimal precision #17445

Merged
merged 1 commit into from
Jul 5, 2024
Merged

fix: Raise on oob decimal precision #17445

merged 1 commit into from
Jul 5, 2024

Conversation

ritchie46
Copy link
Member

fixes #17425

@github-actions github-actions bot added fix Bug fix python Related to Python Polars rust Related to Rust Polars labels Jul 5, 2024
@ritchie46 ritchie46 merged commit a539d88 into main Jul 5, 2024
25 of 26 checks passed
@ritchie46 ritchie46 deleted the decimal branch July 5, 2024 14:32
(*precision).unwrap_or(38),
scale.unwrap_or(0), // and what else can we do here?
)),
Decimal(precision, scale) => {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PyArrow supports decimal256 too, is there any reason this should error as opposed to outputting a decimal256 array?

Copy link
Member Author

@ritchie46 ritchie46 Jul 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't support Decimal256. It turned out the precision given wasn't supported by Polars, so we raise earlier. Therefore we would also never need to export to Decimal256.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, ok

henryharbeck pushed a commit to henryharbeck/polars that referenced this pull request Jul 8, 2024
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.

Conversion to pyarrow crashes the interpreter with a core dump when using decimals
3 participants