[ 
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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to