Uploaded image for project: 'Couchbase Documentation'
  1. Couchbase Documentation
  2. DOC-12137

[CBAS] Add MEDIAN() and ARRAY_MEDIAN() Functions

    XMLWordPrintable

Details

    • Task
    • Resolution: Fixed
    • Major
    • 7.2.5
    • 7.6.2, 7.2.5
    • analytics

    Description

      MEDIAN() is supported as a built-in function in Analytics from Couchbase Server 7.2.5.

      • The MEDIAN function is an Aggregate Pseudo-Function. If this function is used in a query without an explicit GROUP BY clause, it implicitly forms all results into a single group.
      • There is an ARRAY_MEDIAN function for explicit use with arrays, but STRICT_MEDIAN has not been implemented.
      • This function supports the FILTER clause.
      • This function does not support the DISTINCT keyword, unlike other aggregate functions.

      This has been implemented in AsterixDB (neo branch). Current plan is to add the documentation in AsterixDB, and let the Antora pull the changes into the Analytics documentation. Will need to add a note to the Analytics docs to say that MEDIAN and ARRAY_MEDIAN are only supported in 7.2.5 / 7.6.2 and later.

      Need to update Queries › Grouping › Aggregation Pseudo-Functions. Fix the order of functions in the Aggregate function table while we're at it.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              simon.dew Simon Dew
              simon.dew Simon Dew
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty