Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-22973

Incorrect results of casting Map to String

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.1
    • Fix Version/s: 2.3.0
    • Component/s: SQL
    • Labels:
      None

      Description

      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|
      +----------------------------------------------------------------+
      

        Attachments

          Activity

            People

            • Assignee:
              maropu Takeshi Yamamuro
              Reporter:
              maropu Takeshi Yamamuro
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: