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

Functions "str_to_map" and "explode" throws NPE exceptioin

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.0
    • Fix Version/s: 2.1.1, 2.2.0
    • Component/s: SQL
    • Labels:
      None

      Description

      ```
      val sqlDf = spark.sql("select k,v from (select str_to_map('') as map_col from range(2)) tbl lateral view explode(map_col) as k,v")

      sqlDf.show
      ```

      The sql throws NPE exception.

        Attachments

        1. screenshot-1.png
          242 kB
          roncenzhao

          Activity

            People

            • Assignee:
              roncen_zhao roncenzhao
              Reporter:
              roncenzhao roncenzhao
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: