You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Kent Yao (Jira)" <ji...@apache.org> on 2021/03/27 03:18:00 UTC

[jira] [Resolved] (SPARK-34744) Improve error message for casting cause overflow error

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

Kent Yao resolved SPARK-34744.
------------------------------
    Fix Version/s: 3.2.0
       Resolution: Fixed

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

> Improve error message for casting cause overflow error
> ------------------------------------------------------
>
>                 Key: SPARK-34744
>                 URL: https://issues.apache.org/jira/browse/SPARK-34744
>             Project: Spark
>          Issue Type: Sub-task
>          Components: SQL
>    Affects Versions: 3.2.0
>            Reporter: Yuming Wang
>            Assignee: Apache Spark
>            Priority: Major
>             Fix For: 3.2.0
>
>
> For example:
> {code:sql}
> set spark.sql.ansi.enabled=true;
> select tinyint(128) * tinyint(2);
> {code}
> Error message:
> {noformat}
> Casting 128 to scala.Byte$ causes overflow
> {noformat}
> Expected:
> {noformat}
> Casting 128 to tinyint causes overflow
> {noformat}
> We should use DataType's catalogString.



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