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

[jira] [Resolved] (SPARK-22973) Incorrect results of casting Map to String

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

Wenchen Fan resolved SPARK-22973.
---------------------------------
       Resolution: Fixed
    Fix Version/s: 2.3.0

Issue resolved by pull request 20166
[https://github.com/apache/spark/pull/20166]

> Incorrect results of casting Map to String
> ------------------------------------------
>
>                 Key: SPARK-22973
>                 URL: https://issues.apache.org/jira/browse/SPARK-22973
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 2.2.1
>            Reporter: Takeshi Yamamuro
>            Assignee: Takeshi Yamamuro
>             Fix For: 2.3.0
>
>
> {code}
> scala> Seq(Map(1 -> "a", 2 -> "b")).toDF("a").write.saveAsTable("t")
> scala> sql("SELECT cast(a as String) FROM t").show(false)
> +----------------------------------------------------------------+
> |a                                                               |
> +----------------------------------------------------------------+
> |org.apache.spark.sql.catalyst.expressions.UnsafeMapData@38bdd75d|
> +----------------------------------------------------------------+
> {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