You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Zhongshuai Pei (JIRA)" <ji...@apache.org> on 2015/05/18 11:27:00 UTC

[jira] [Updated] (SPARK-7702) Is it necessary to limit the precision of a Decimal type?

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

Zhongshuai Pei updated SPARK-7702:
----------------------------------
    Description: 
SQL
{noformat}
select cast(12.8 as decimal(40,20)) as tmp;
{noformat}

use spark-sql
{noformat}
tmp
12.8
{noformat}

use beeline
{noformat}
Error: java.lang.IllegalArgumentException: Decimal precision out of allowed range [1,38] (state=,code=0)
{noformat}

  was:
SQL
{noformat}
select cast(12.8 as decimal(40,20)) as tmp;
{noformat}

use spark-sql
{noformat}
tmp
12.8
{noformat}

use beeline
use spark-sql
{noformat}
Error: java.lang.IllegalArgumentException: Decimal precision out of allowed range [1,38] (state=,code=0)
{noformat}


> Is it necessary to limit the precision of a Decimal type?
> ---------------------------------------------------------
>
>                 Key: SPARK-7702
>                 URL: https://issues.apache.org/jira/browse/SPARK-7702
>             Project: Spark
>          Issue Type: Question
>          Components: SQL
>    Affects Versions: 1.3.1
>            Reporter: Zhongshuai Pei
>
> SQL
> {noformat}
> select cast(12.8 as decimal(40,20)) as tmp;
> {noformat}
> use spark-sql
> {noformat}
> tmp
> 12.8
> {noformat}
> use beeline
> {noformat}
> Error: java.lang.IllegalArgumentException: Decimal precision out of allowed range [1,38] (state=,code=0)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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