You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (Jira)" <ji...@apache.org> on 2022/08/12 05:08:00 UTC

[jira] [Commented] (SPARK-40054) Restore the error handling syntax of try_cast()

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

Apache Spark commented on SPARK-40054:
--------------------------------------

User 'gengliangwang' has created a pull request for this issue:
https://github.com/apache/spark/pull/37486

> Restore the error handling syntax of try_cast()
> -----------------------------------------------
>
>                 Key: SPARK-40054
>                 URL: https://issues.apache.org/jira/browse/SPARK-40054
>             Project: Spark
>          Issue Type: Sub-task
>          Components: SQL
>    Affects Versions: 3.4.0
>            Reporter: Gengliang Wang
>            Assignee: Gengliang Wang
>            Priority: Major
>
> For the following query
> {code:java}
> SET spark.sql.ansi.enabled=true;
> SELECT try_cast(1/0 AS string); {code}
> Spark 3.3 will throw an exception for the division by zero error. In current master branch, it returns null after the refactoring PR https://github.com/apache/spark/pull/36703
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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