Hyukjin Kwon created SPARK-61136:
------------------------------------
Summary: 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
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]