You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Ruifeng Zheng (Jira)" <ji...@apache.org> on 2023/01/03 03:06:00 UTC
[jira] [Commented] (SPARK-41852) Fix `pmod` function
[ https://issues.apache.org/jira/browse/SPARK-41852?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17653743#comment-17653743 ]
Ruifeng Zheng commented on SPARK-41852:
---------------------------------------
could you please also provide the code to create the dataframe?
a known issue is that `session.createDataFrame` doesn't handle NaN/None correctly.
> Fix `pmod` function
> -------------------
>
> Key: SPARK-41852
> URL: https://issues.apache.org/jira/browse/SPARK-41852
> Project: Spark
> Issue Type: Sub-task
> Components: Connect, PySpark
> Affects Versions: 3.4.0
> Reporter: Sandeep Singh
> Priority: Major
> Fix For: 3.4.0
>
>
> {code:java}
> File "/Users/s.singh/personal/spark-oss/python/pyspark/sql/connect/functions.py", line 622, in pyspark.sql.connect.functions.pmod
> Failed example:
> df.select(pmod("a", "b")).show()
> Expected:
> +----------+
> |pmod(a, b)|
> +----------+
> | NaN|
> | NaN|
> | 1.0|
> | NaN|
> | 1.0|
> | 2.0|
> | -5.0|
> | 7.0|
> | 1.0|
> +----------+
> Got:
> +----------+
> |pmod(a, b)|
> +----------+
> | null|
> | null|
> | 1.0|
> | null|
> | 1.0|
> | 2.0|
> | -5.0|
> | 7.0|
> | 1.0|
> +----------+
> <BLANKLINE>{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