Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-32257

Add ARRAY_MAX support in SQL & Table API

    XMLWordPrintableJSON

Details

    Description

      This is an implementation of ARRAY_MAX

      The array_max() function concatenates get the maximum element from input array.

      The result matches the type of the elements. NULL elements are skipped. If array is empty, or contains only NULL elements, NULL is returned.

       

      Syntax

      array_max(array)

      Arguments

      array: Any ARRAY with elements for which order is supported.

       

      Returns

      The result matches the type of the elements. NULL elements are skipped. If array is empty, or contains only NULL elements, NULL is returned.

       

      Examples

      SQL

       

      > SELECT array_max(array(1, 20, NULL, 3)); 20

       

      // Fink SQL-> select array_max(array[1, 20, null, 3])
      20

       

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

      presto https://prestodb.io/docs/current/functions/array.html

      Attachments

        Issue Links

          Activity

            People

              hanyuzheng Hanyu Zheng
              bvarghese Bonnie Varghese
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: