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 2019/06/14 09:57:00 UTC

[jira] [Resolved] (SPARK-28048) pyspark.sql.functions.explode will abondon the row which has a empty list column when applied to the column

     [ https://issues.apache.org/jira/browse/SPARK-28048?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hyukjin Kwon resolved SPARK-28048.
----------------------------------
    Resolution: Not A Problem

> pyspark.sql.functions.explode will abondon the row which has a empty list column when applied to the column
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: SPARK-28048
>                 URL: https://issues.apache.org/jira/browse/SPARK-28048
>             Project: Spark
>          Issue Type: Bug
>          Components: PySpark
>    Affects Versions: 2.1.1
>            Reporter: Ma Xinmin
>            Priority: Major
>
> {code}
> from pyspark.sql import Row
> from pyspark.sql.functions import explode
> eDF = spark.createDataFrame([Row(a=1, intlist=[1,2], mapfield={"a": "b"}), Row(a=2, intlist=[], mapfield={"a": "b"})])
> eDF = eDF.withColumn('another', explode(eDF.intlist)).collect()
> eDF
> {code}
> The `a=2` row is missing in the output



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org