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/12/02 02:51:00 UTC

[jira] [Resolved] (SPARK-29955) Can't cast String MapType to MapType

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

Hyukjin Kwon resolved SPARK-29955.
----------------------------------
    Resolution: Incomplete

Please show the full reproducer. It's most likely intentionally disallowed per ANSI or for another good reason in type coercion.

> Can't cast String MapType to MapType
> ------------------------------------
>
>                 Key: SPARK-29955
>                 URL: https://issues.apache.org/jira/browse/SPARK-29955
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 2.4.4
>            Reporter: Ramanand Jaiswal
>            Priority: Major
>
> I'm not able to cast the String Map type to MapType.
> {code:java}
> dataset.withColumn("test", dataset.col("test").cast(DataTypes.createMapType(StringType, StringType)));
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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