You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Gengliang Wang (Jira)" <ji...@apache.org> on 2021/04/21 05:06:00 UTC

[jira] [Commented] (SPARK-35161) Safe version SQL functions

    [ https://issues.apache.org/jira/browse/SPARK-35161?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17326256#comment-17326256 ] 

Gengliang Wang commented on SPARK-35161:
----------------------------------------

cc [~beliefer][~angerszhuuu] Are you interested in these new features?

> Safe version SQL functions
> --------------------------
>
>                 Key: SPARK-35161
>                 URL: https://issues.apache.org/jira/browse/SPARK-35161
>             Project: Spark
>          Issue Type: Umbrella
>          Components: SQL
>    Affects Versions: 3.2.0
>            Reporter: Gengliang Wang
>            Priority: Major
>
> Create new safe version SQL functions for existing SQL functions/operators, which returns NULL if overflow/error occurs. So that:
> 1. Users can manage to finish queries without interruptions
> 2. The result can be more reasonable. For example, the result of the following operation is terrible
> {code:java}
> 2147483647 + 2 => -2147483647
> CAST(2147483648L AS INT) => -2147483648
> {code}
> Having the safe version SQL functions provides an alternative solution for handling such cases
> {code:java}
> TRY_ADD(2147483647, 2) => null
> TRY_CAST(2147483648L AS INT) => null
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org