Skip to content

Add test for casting Decimal128 (i128::MIN and i128::MAX) to f64 with overflow handling #7939

@kosiew

Description

@kosiew

Description

There is an existing test for casting Decimal256 values (i256::MIN and i256::MAX) to f64, checking for correct overflow behavior in #7887

We should add (or confirm the existence of) an equivalent test for Decimal128, specifically testing casting i128::MAX and i128::MIN to f64 with the following expectations:

Positive overflow results in positive infinity.

Negative overflow results in negative infinity.

This will ensure consistency in overflow handling and protect against future regressions.

Acceptance Criteria

Test for Decimal128 to f64 casting with i128::MAX and i128::MIN is added or verified.

The test asserts .is_infinite() and checks the correct sign of the result.

The test style matches existing Decimal256 casting tests.

Context

PR follow up action

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions