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

Marco Gaido commented on SPARK-22582:
-------------------------------------

I tried to run
{code}
spark.sql("select round(100.1 , 1) as c3, round(100.1 , -1) as c5").show
{code}
on branch master and it works. May you try to reproduce the error in a newer 
Spark version?

> Spark SQL round throws error with negative precision
> ----------------------------------------------------
>
>                 Key: SPARK-22582
>                 URL: https://issues.apache.org/jira/browse/SPARK-22582
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 2.0.0
>            Reporter: Yuxin Cao
>
> select  round(100.1 , 1) as c3,
>         round(100.1 , -1) as c5 from orders;
> Error: java.lang.IllegalArgumentException: Error: name expected at the 
> position 10 of 'decimal(4,-1)' but '-' is found. (state=,code=0)
> The same query works fine in Spark 1.6.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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

Reply via email to