You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Hyukjin Kwon (Jira)" <ji...@apache.org> on 2022/11/09 00:53:00 UTC

[jira] [Commented] (SPARK-41047) round function with negative scale value runs failed

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

Hyukjin Kwon commented on SPARK-41047:
--------------------------------------

cc [~wuyi] [~cloud_fan]. This seems from https://github.com/apache/spark/commit/ff39c9271ca04951b045c5d9fca2128a82d50b46 https://issues.apache.org/jira/browse/SPARK-30252

> round function with negative scale value runs failed
> ----------------------------------------------------
>
>                 Key: SPARK-41047
>                 URL: https://issues.apache.org/jira/browse/SPARK-41047
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 3.2.2
>            Reporter: liyang
>            Priority: Major
>
> Run this sql in spark-sql:    select round(1.233, -1); 
> Error: org.apache.spark.sql.AnalysisException: Negative scale is not allowed: -1. You can use spark.sql.legacy.allowNegativeScaleOfDecimal=true to enable legacy mode to allow it.; 
> But the document of round function implies that negative scale argument is allowed. 



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