XMLWordPrintableJSON

Details

    Description

      Removes duplicate values from the array.

      Syntax:
      array_distinct(array)

      Arguments:
      array: An ARRAY to be handled.

      Returns:

      An ARRAY. If value is NULL, the result is NULL. Keeps order of elements.
      Examples:

      SELECT array_distinct(ARRAY[1, 2, 3, 2, 1]);
      -- [1, 2, 3]
      SELECT array_distinct(ARRAY[1, NULL, 1]);
      -- [1, NULL]
      

      See also
      https://spark.apache.org/docs/latest/api/sql/index.html#array_distinct

      Attachments

        Issue Links

          Activity

            People

              Sergey Nuyanzin Sergey Nuyanzin
              Sergey Nuyanzin Sergey Nuyanzin
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: