Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-23899 Built-in SQL Function Improvement
  3. SPARK-23821

High-order function: flatten(x) → array

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.4.0
    • 2.4.0
    • SQL
    • None

    Description

      Add the flatten function that transforms an Array of Arrays column into an Array elements column. if the array structure contains more than two levels of nesting, the function removes one nesting level

      Example:
      flatten(array(array(1, 2, 3), array(3, 4, 5), array(6, 7, 8)) => [1,2,3,4,5,6,7,8,9]

      Attachments

        Activity

          People

            mn-mikke Marek Novotny
            mn-mikke Marek Novotny
            Votes:
            3 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: