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

add spark.sql.functions.map_keys and spark.sql.functions.map_values

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • 2.2.0
    • None
    • SQL
    • None

    Description

      for dataframe/sql we support MapType, but unlike ArrayType, we can explode to unpack from it.
      getItems is just not powerful enough for manipulate MapTypes

      df.select(map_keys('$map')) and df.select(map_values('$map')) would be really useful

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              yupbank yu peng
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: