Skip to content

Add function accurateCastOrNull. #10290

@alexey-milovidov

Description

@alexey-milovidov

Use case
This function is needed to implement #10266

Describe the solution you'd like
The function is like cast but always returns nullable type and returns NULL if the casted value is not representable in the target type.

Example:

accurateCastOrNull(-1, 'UInt8')
NULL

cast(-1, 'UInt8')
255

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions