gengliangwang opened a new pull request #24849: [SPARK-28018][SQL] Allow 
upcasting decimal to double/float
   ## What changes were proposed in this pull request?
   Currently, Spark only allows upcasting DecimalType to IntegralType or 
   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 E.g, if there is a table "t" with 
only one column of double type, 
   The data type of value 10.0 is DecimalType(3, 1). In the current code, Spark 
can't upcast the decimal to the column of double type.
   ## How was this patch tested?
   Unit test 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:

With regards,
Apache Git Services

To unsubscribe, e-mail:
For additional commands, e-mail:

Reply via email to