You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (JIRA)" <ji...@apache.org> on 2019/06/12 08:11:00 UTC
[jira] [Assigned] (SPARK-28018) Allow upcasting decimal to
double/float
[ https://issues.apache.org/jira/browse/SPARK-28018?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Apache Spark reassigned SPARK-28018:
------------------------------------
Assignee: (was: Apache Spark)
> Allow upcasting decimal to double/float
> ---------------------------------------
>
> Key: SPARK-28018
> URL: https://issues.apache.org/jira/browse/SPARK-28018
> Project: Spark
> Issue Type: Improvement
> Components: SQL
> Affects Versions: 3.0.0
> Reporter: Gengliang Wang
> Priority: Major
>
> Currently, Spark only allows upcasting DecimalType to IntegralType or DecimalType.
> This PR proposes: if the target DecimalType is tighter than DoubleType or FloatType, we can upcast it as well.
> The upcasting matters because it blocks https://github.com/apache/spark/pull/24806. E.g, if there is a table "t" with only one column of double type,
> ```
> INSERT INTO TABLE t SELECT 10.0
> ```
> The data type of value 10.0 is DecimalType(3, 1). In the current code, the upcasting failed.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org