Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-5738

Add SORT_ARRAY for Spark dialect

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.35.0
    • 1.35.0
    • core

    Description

      sort_array

      sort_array(array[, ascendingOrder]) - Sorts the input array in ascending or descending order according to the natural ordering of the array elements. Null elements will be placed at the beginning of the returned array in ascending order or at the end of the returned array in descending order.

      Examples:

      > SELECT sort_array(array('b', 'd', null, 'c', 'a'), true);

      {{ [null,"a","b","c","d"]}}

       

      > SELECT sort_array(array('b', 'd', null, 'c', 'a'));

      {{ [null,"a","b","c","d"]}}

      Attachments

        Issue Links

          Activity

            People

              jackylau Jacky Lau
              jackylau Jacky Lau
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: