Skip to content

add support for casting string to decimal #3478

@kmitchener

Description

@kmitchener

Is your feature request related to a problem or challenge? Please describe what you are trying to do.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
(This section helps Arrow developers understand the context and why for this feature, in addition to the what)

Describe the solution you'd like
A clear and concise description of what you want to happen.
Would like to be able to cast string to decimal as is supported by float types.

select arrow_typeof('1.1'::decimal);
Internal("Unsupported CAST from Utf8 to Decimal128(38, 10)")

but should work like it does for float:

select arrow_typeof('1.1'::double);
+--------------------------+
| arrowtypeof(Utf8("1.1")) |
+--------------------------+
| Float64                  |
+--------------------------+
1 row in set. Query took 0.010 seconds.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions