spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zhongshuai Pei (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (SPARK-7702) Is it necessary to limit the precision of a Decimal type?
Date Mon, 18 May 2015 09:27:00 GMT

     [ 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
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
> use spark-sql
> {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


Mime
View raw message