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

Fix return type for new median(interval) function

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 3.4.0
    • 3.4.0
    • Spark Core
    • None

    Description

      median() right now returns an interval of the same type as the input.
      We should instead match mean and avg():

      The result type is computed as for the arguments:

      • year-month interval: The result is an `INTERVAL YEAR TO MONTH`.
      • day-time interval: The result is an `INTERVAL DAY TO SECOND`.
      • In all other cases the result is a DOUBLE.

      Attachments

        Activity

          People

            maxgekk Max Gekk
            srielau Serge Rielau
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: