You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Wenchen Fan (Jira)" <ji...@apache.org> on 2020/01/14 09:05:00 UTC

[jira] [Resolved] (SPARK-30292) Throw Exception when invalid string is cast to decimal in ANSI mode

     [ https://issues.apache.org/jira/browse/SPARK-30292?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Wenchen Fan resolved SPARK-30292.
---------------------------------
    Fix Version/s: 3.0.0
       Resolution: Fixed

Issue resolved by pull request 26933
[https://github.com/apache/spark/pull/26933]

> Throw Exception when invalid string is cast to decimal in ANSI mode
> -------------------------------------------------------------------
>
>                 Key: SPARK-30292
>                 URL: https://issues.apache.org/jira/browse/SPARK-30292
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 3.0.0
>            Reporter: Rakesh Raushan
>            Assignee: Rakesh Raushan
>            Priority: Minor
>             Fix For: 3.0.0
>
>
> When spark.sql.ansi.enabled is set,
> If we run select cast('str' as decimal), spark-sql outputs NULL. 
> The ANSI SQL standard requires to throw exception when invalid strings are cast to numbers.
>  



--
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