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

    • Type: Sub-task
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.4.0
    • Fix Version/s: 2.4.0
    • Component/s: SQL
    • Labels:
      None
    • Target Version/s:

      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

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

              Dates

              • Created:
                Updated:
                Resolved: