Skip to content

Conversation

@gruuya
Copy link
Contributor

@gruuya gruuya commented Oct 23, 2025

Which issue does this PR close?

Alternative to #8700 (see #8699 for a discussion).

Rationale for this change

Make parsing of zero-scale decimals more correct/consistent.

What changes are included in this PR?

When a decimal with scale 0 is being parsed only accept inputs with 1 decimal point set to zero (i.e. "___.0") and reject all other forms.

Are these changes tested?

Yes.

Are there any user-facing changes?

Aligned parsing of zero-scale decimals.

@Jefffrey
Copy link
Contributor

Closing this in favour of

@Jefffrey Jefffrey closed this Jan 10, 2026
alamb pushed a commit that referenced this pull request Jan 19, 2026
# Which issue does this PR close?

- Closes #8699.

Alternative to #8702 (see #8699
for a discussion).

# Rationale for this change
Make parsing of zero-scale decimals more correct/consistent.

# What changes are included in this PR?

When a decimal with scale 0 is being parsed, but it has some digits pass
the decimal point those will effectively be discarded.

# Are these changes tested?
Yes.

# Are there any user-facing changes?
Aligned parsing of zero-scale decimals.

---------

Co-authored-by: Martin Grigorov <[email protected]>
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.

Incorrect behavior of parse_decimal with zero scale

2 participants