You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Takeshi Yamamuro (JIRA)" <ji...@apache.org> on 2018/01/10 03:06:00 UTC

[jira] [Created] (SPARK-23023) Incorrect results of printing Array/Map/Struct in showString

Takeshi Yamamuro created SPARK-23023:
----------------------------------------

             Summary: Incorrect results of printing Array/Map/Struct in showString
                 Key: SPARK-23023
                 URL: https://issues.apache.org/jira/browse/SPARK-23023
             Project: Spark
          Issue Type: Bug
          Components: SQL
    Affects Versions: 2.2.1
            Reporter: Takeshi Yamamuro


The current `Datset.showString` prints rows thru `RowEncoder` deserializers like;
{code}
scala> Seq(Seq(Seq(1, 2), Seq(3), Seq(4, 5, 6))).toDF("a").show(false)
+------------------------------------------------------------+
|a                                                           |
+------------------------------------------------------------+
|[WrappedArray(1, 2), WrappedArray(3), WrappedArray(4, 5, 6)]|
+------------------------------------------------------------+
{code}
This result is incorrect because the correct one is;
{code}
scala> Seq(Seq(Seq(1, 2), Seq(3), Seq(4, 5, 6))).toDF("a").show(false)
+------------------------+
|a                       |
+------------------------+
|[[1, 2], [3], [4, 5, 6]]|
+------------------------+
{code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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