[ https://issues.apache.org/jira/browse/SPARK-28018?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dongjoon Hyun resolved SPARK-28018. ----------------------------------- Resolution: Invalid This is closed by the author due to the loss of precision. Please see the PR comments for the detail. > 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-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org