Skip to content

Incorrect error message for decimal with scale while input value is out of bound #3666

@waitingkuo

Description

@waitingkuo

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

select 1::decimal(1, 1);
ArrowError(InvalidArgumentError("10 is too large to store in a Decimal128 of precision 1. Max is 9"))
select 10::decimal(2, 1);
ArrowError(InvalidArgumentError("100 is too large to store in a Decimal128 of precision 2. Max is 99"))

Expected behavior
A clear and concise description of what you expected to happen.

something like

select 10::decimal(2, 1);
ArrowError(InvalidArgumentError("10 is too large to store in a Decimal128 of precision 2  with scale 1. Max is 9.9"))

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingwaiting-on-upstreamPR is waiting on an upstream dependency to be updated

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions