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/21 13:17:00 UTC

[jira] [Resolved] (SPARK-30252) Disallow negative scale of Decimal under ansi mode

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

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

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

> Disallow negative scale of Decimal under ansi mode
> --------------------------------------------------
>
>                 Key: SPARK-30252
>                 URL: https://issues.apache.org/jira/browse/SPARK-30252
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 3.0.0
>            Reporter: wuyi
>            Assignee: wuyi
>            Priority: Major
>             Fix For: 3.0.0
>
>
> According to SQL standard,
> {quote}4.4.2 Characteristics of numbers
> An exact numeric type has a precision P and a scale S. P is a positive integer that determines the number of significant digits in a particular radix R, where R is either 2 or 10. S is a non-negative integer.
> {quote}
> scale of Decimal should always be non-negative. And other mainstream databases, like Presto, PostgreSQL, also don't allow negative scale.
>  



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