Skip to content

There is no compiler error when using an invalid Decimal type. #2440

@HaoYang670

Description

@HaoYang670

Describe the bug
Users can create Decimal values with invalid BYTE_WIDTH, such as

let v = BasicDecimal::<1>::new(1, 1, &[1]);

Expected behavior
We need to add more restriction to the decimal type so that only Decimal128 and Decimal256 can be used.

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    arrowChanges to the arrow cratebug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions