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

Functions "str_to_map" and "explode" throws NPE exceptioin

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.1.0
    • 2.1.1, 2.2.0
    • SQL
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: