[jira] [Commented] (SPARK-41815) Column.isNull returns nan instead of None
[ https://issues.apache.org/jira/browse/SPARK-41815?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17654396#comment-17654396 ] Apache Spark commented on SPARK-41815: -- User 'zhengruifeng' has created a pull request for this issue: https://github.com/apache/spark/pull/39386 > Column.isNull returns nan instead of None > - > > Key: SPARK-41815 > URL: https://issues.apache.org/jira/browse/SPARK-41815 > Project: Spark > Issue Type: Sub-task > Components: Connect >Affects Versions: 3.4.0 >Reporter: Hyukjin Kwon >Priority: Major > > {code} > File "/.../spark/python/pyspark/sql/connect/column.py", line 99, in > pyspark.sql.connect.column.Column.isNull > Failed example: > df.filter(df.height.isNull()).collect() > Expected: > [Row(name='Alice', height=None)] > Got: > [Row(name='Alice', height=nan)] > {code} -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org
[jira] [Commented] (SPARK-41815) Column.isNull returns nan instead of None
[ https://issues.apache.org/jira/browse/SPARK-41815?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17654395#comment-17654395 ] Apache Spark commented on SPARK-41815: -- User 'zhengruifeng' has created a pull request for this issue: https://github.com/apache/spark/pull/39386 > Column.isNull returns nan instead of None > - > > Key: SPARK-41815 > URL: https://issues.apache.org/jira/browse/SPARK-41815 > Project: Spark > Issue Type: Sub-task > Components: Connect >Affects Versions: 3.4.0 >Reporter: Hyukjin Kwon >Priority: Major > > {code} > File "/.../spark/python/pyspark/sql/connect/column.py", line 99, in > pyspark.sql.connect.column.Column.isNull > Failed example: > df.filter(df.height.isNull()).collect() > Expected: > [Row(name='Alice', height=None)] > Got: > [Row(name='Alice', height=nan)] > {code} -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org
[jira] [Commented] (SPARK-41815) Column.isNull returns nan instead of None
[ https://issues.apache.org/jira/browse/SPARK-41815?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17654394#comment-17654394 ] Apache Spark commented on SPARK-41815: -- User 'zhengruifeng' has created a pull request for this issue: https://github.com/apache/spark/pull/39386 > Column.isNull returns nan instead of None > - > > Key: SPARK-41815 > URL: https://issues.apache.org/jira/browse/SPARK-41815 > Project: Spark > Issue Type: Sub-task > Components: Connect >Affects Versions: 3.4.0 >Reporter: Hyukjin Kwon >Priority: Major > > {code} > File "/.../spark/python/pyspark/sql/connect/column.py", line 99, in > pyspark.sql.connect.column.Column.isNull > Failed example: > df.filter(df.height.isNull()).collect() > Expected: > [Row(name='Alice', height=None)] > Got: > [Row(name='Alice', height=nan)] > {code} -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org
[jira] [Commented] (SPARK-41815) Column.isNull returns nan instead of None
[ https://issues.apache.org/jira/browse/SPARK-41815?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17653748#comment-17653748 ] Ruifeng Zheng commented on SPARK-41815: --- similar to the issue in `createDataFrame` https://issues.apache.org/jira/browse/SPARK-41814 > Column.isNull returns nan instead of None > - > > Key: SPARK-41815 > URL: https://issues.apache.org/jira/browse/SPARK-41815 > Project: Spark > Issue Type: Sub-task > Components: Connect >Affects Versions: 3.4.0 >Reporter: Hyukjin Kwon >Priority: Major > > {code} > File "/.../spark/python/pyspark/sql/connect/column.py", line 99, in > pyspark.sql.connect.column.Column.isNull > Failed example: > df.filter(df.height.isNull()).collect() > Expected: > [Row(name='Alice', height=None)] > Got: > [Row(name='Alice', height=nan)] > {code} -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org
[jira] [Commented] (SPARK-41815) Column.isNull returns nan instead of None
[ https://issues.apache.org/jira/browse/SPARK-41815?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17653643#comment-17653643 ] Martin Grund commented on SPARK-41815: -- The reason seems to be that when Spark Connect serializes the data to Arrow it's serialized as `null` and when converted to pandas it will convert this to the `np.nan` instead of `None`. It seems that we should manually convert `nan` to `None` for the `Row` type. > Column.isNull returns nan instead of None > - > > Key: SPARK-41815 > URL: https://issues.apache.org/jira/browse/SPARK-41815 > Project: Spark > Issue Type: Sub-task > Components: Connect >Affects Versions: 3.4.0 >Reporter: Hyukjin Kwon >Priority: Major > > {code} > File "/.../spark/python/pyspark/sql/connect/column.py", line 99, in > pyspark.sql.connect.column.Column.isNull > Failed example: > df.filter(df.height.isNull()).collect() > Expected: > [Row(name='Alice', height=None)] > Got: > [Row(name='Alice', height=nan)] > {code} -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org