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

Add array_median function

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Minor
    • Resolution: Won't Fix
    • 2.4.4
    • None
    • SQL
    • None

    Description

      It is known that there isn't any exact median function in Spark SQL, and this might be a difficult problem to solve efficiently. However, to find the median for an array should be a simple task, and something that users can utilize when collecting numeric values to a list or set.

      This can already be achieved by using sorting and choosing element, but can get cumbersome and if a fully tested function is provided in the API, I think it can solve some headache for many.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              hagerf Alexander Hagerf
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: