You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Gengliang Wang (Jira)" <ji...@apache.org> on 2022/07/12 03:05:00 UTC

[jira] [Updated] (SPARK-39749) Always use plain string representation on casting Decimal to String

     [ https://issues.apache.org/jira/browse/SPARK-39749?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gengliang Wang updated SPARK-39749:
-----------------------------------
    Summary: Always use plain string representation on casting Decimal to String  (was: Use plain string representation on casting Decimal to String)

> Always use plain string representation on casting Decimal to String
> -------------------------------------------------------------------
>
>                 Key: SPARK-39749
>                 URL: https://issues.apache.org/jira/browse/SPARK-39749
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 3.4.0
>            Reporter: Gengliang Wang
>            Assignee: Gengliang Wang
>            Priority: Major
>
> Currently, casting decimal as string type will result in Strings with exponential notations if the adjusted exponent is less than -6. This is consistent with BigDecimal.toString [https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html#toString] 
> This is different from external databases like PostgreSQL/Oracle/MS SQL server. It doesn't compliant with the ANSI SQL standard either. 
> I suggest always using the plain string in the casting.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org