ueshin commented on code in PR #52637:
URL: https://github.com/apache/spark/pull/52637#discussion_r2437756461
##########
python/pyspark/sql/conversion.py:
##########
@@ -321,7 +322,7 @@ def convert_decimal(value: Any) -> Any:
if not nullable:
raise PySparkValueError(f"input for {dataType}
must not be None")
return None
- return value
+ return round(value, dataType.scale).normalize()
Review Comment:
oh wait, this is also used some places in workers.
-
https://github.com/apache/spark/blob/b3748d8882b71440393f61ca8078c62e02936d63/python/pyspark/sql/pandas/serializers.py#L924-L928
-
https://github.com/apache/spark/blob/b3748d8882b71440393f61ca8078c62e02936d63/python/pyspark/worker.py#L2258-L2260
-
https://github.com/apache/spark/blob/b3748d8882b71440393f61ca8078c62e02936d63/python/pyspark/sql/worker/plan_data_source_read.py#L78
Are these safe?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]