Skip to content

feat: to_decimal support more types #19030

@youngsofun

Description

@youngsofun

now only support string

for other types return error like:

 select to_decimal(1.2::float, 3, 2);
error: APIError: QueryFailed: [1065]error: 
  --> SQL:1:8
  |
1 | select to_decimal(1.2::float, 3, 2)
  |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no function matches signature `to_decimal(3, 2)(Float32, UInt8, UInt8)`, you might need to add explicit type casts.

have to write as select to_decimal(3, 2)(1.2::float) or 1.2::float::decimal(3,2)

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