You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Ma Xinmin (JIRA)" <ji...@apache.org> on 2019/06/14 04:53:00 UTC

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

Ma Xinmin created SPARK-28048:
---------------------------------

             Summary: 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


{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