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

Hyukjin Kwon resolved SPARK-61136.
----------------------------------
    Resolution: Fixed

Issue resolved by pull request 328
[https://github.com/apache/spark-connect-rust/pull/328]

> Collect the decimals of a negative scale in the Python client as PySpark does
> -----------------------------------------------------------------------------
>
>                 Key: SPARK-61136
>                 URL: https://issues.apache.org/jira/browse/SPARK-61136
>             Project: Spark
>          Issue Type: Bug
>          Components: Connect
>    Affects Versions: connect-rust-4.3.0
>            Reporter: Hyukjin Kwon
>            Assignee: Hyukjin Kwon
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: connect-rust-4.3.0
>
>
> With spark.sql.legacy.allowNegativeScaleOfDecimal, a decimal can have a 
> negative scale. For example, CAST(11 AS DECIMAL(1, -1)) is 1E+1, of unscaled 
> value 1. PySpark collects it as Decimal("1E+1"), of which int() is 10. The 
> client collects Decimal("1"), so int() is 1.
> Apache Spark's test_negative_decimal fails on this client: [0, 1] != [0, 10]. 
> The client should collect the decimals of a negative scale as PySpark does.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to