Skip to content

Optimise Decimal Casting #6877

@tustvold

Description

@tustvold

Is your feature request related to a problem or challenge? Please describe what you are trying to do.

Currently the decimal conversion kernels perform unnecessary checks, this predates #6836 although is made worse by this PR.

In particular when performing a decimal conversion between the same decimal primitive (i.e. Decimal128 vs Decimal256) it should be able to elide both the checks in O::Native::from_decimal and O::validate_decimal_precision. This in turn would allow using the infallible unary kernel, likely yielding significant performance improvements.

Describe the solution you'd like

Describe alternatives you've considered

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementAny new improvement worthy of a entry in the changelog

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions