Skip to content

parse_decimal allows invalid inputs e5 and - #10790

Closed

Description

@neilconway

Describe the bug

See repro.

To Reproduce

use arrow_array::types::Decimal128Type;
use arrow_cast::parse::parse_decimal;

parse_decimal::<Decimal128Type>("0E5", 10, 2);  // Ok(0)
parse_decimal::<Decimal128Type>("e5", 10, 2);   // Ok(0)
parse_decimal::<Decimal128Type>("-.", 10, 2);   // Ok(0)

Expected behavior

Invalid inputs should be rejected with an error.

Additional context

No response

Activity

  1. added
    bug
    on Aug 21, 2026
  2. added theissue type on Aug 21, 2026
  3. neilconway commented on Aug 21, 2026

    @neilconway
    ContributorAuthor

    take

  4. added a commit that references this issue on Sep 1, 2026
    70219af
  5. added 3 commits that reference this issue on Sep 18, 2026
    f9eb4aa
    8bac2b6
    e9e1631
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions