Skip to content

Conversation

AdamGS
Copy link
Contributor

@AdamGS AdamGS commented Sep 16, 2025

Which issue does this PR close?

Closes #8362

Rationale for this change

Fixes casting codepaths that currently fail.

What changes are included in this PR?

Are these changes tested?

yes

If tests are not included in your PR, please explain why (for example, are they covered by existing tests)?

Are there any user-facing changes?

Code should now behave as expected

@github-actions github-actions bot added the arrow Changes to the arrow crate label Sep 16, 2025
Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Thank you for this fix @AdamGS and for the review @mbrobbel

@alamb
Copy link
Contributor

alamb commented Sep 16, 2025

FWIW the new test fails like this without the changes to the code

Failed to cast to Decimal64(9, 3) with: Cast error: Cannot cast to Decimal64(9, 3). Overflowing on 1.1
thread 'cast::tests::test_cast_floating_to_decimals' panicked at arrow-cast/src/cast/mod.rs:3125:13:
Failed to cast to Decimal64(9, 3) with: Cast error: Cannot cast to Decimal64(9, 3). Overflowing on 1.1
stack backtrace:

@alamb alamb merged commit 7696432 into apache:main Sep 16, 2025
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrow Changes to the arrow crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Casting floating point numbers fails for Decimal64 but works for other variants
3 participants