You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Hyukjin Kwon (Jira)" <ji...@apache.org> on 2022/11/22 06:58:00 UTC
[jira] [Comment Edited] (SPARK-41219) Regression in IntegralDivide returning null instead of 0
[ https://issues.apache.org/jira/browse/SPARK-41219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17637029#comment-17637029 ]
Hyukjin Kwon edited comment on SPARK-41219 at 11/22/22 6:57 AM:
----------------------------------------------------------------
cc [~yumwang]] FYI
was (Author: hyukjin.kwon):
cc [~yuming] FYI
> Regression in IntegralDivide returning null instead of 0
> --------------------------------------------------------
>
> Key: SPARK-41219
> URL: https://issues.apache.org/jira/browse/SPARK-41219
> Project: Spark
> Issue Type: Bug
> Components: SQL
> Affects Versions: 3.4.0
> Reporter: Raza Jafri
> Priority: Major
>
> There seems to be a regression in Spark 3.4 Integral Divide
>
> {code:java}
> scala> val df = Seq("0.5944910","0.3314242").toDF("a")
> df: org.apache.spark.sql.DataFrame = [a: string]
> scala> df.selectExpr("cast(a as decimal(7,7)) div 100").show
> +---------------------------------+
> |(CAST(a AS DECIMAL(7,7)) div 100)|
> +---------------------------------+
> | null|
> | null|
> +---------------------------------+
> {code}
>
> While in Spark 3.3.0
> {code:java}
> scala> val df = Seq("0.5944910","0.3314242").toDF("a")
> df: org.apache.spark.sql.DataFrame = [a: string]
> scala> df.selectExpr("cast(a as decimal(7,7)) div 100").show
> +---------------------------------+
> |(CAST(a AS DECIMAL(7,7)) div 100)|
> +---------------------------------+
> | 0|
> | 0|
> +---------------------------------+
> {code}
>
--
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