You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "jackylau (Jira)" <ji...@apache.org> on 2023/06/01 02:49:00 UTC

[jira] [Assigned] (CALCITE-5738) Add SORT_ARRAY for Spark dialect

     [ https://issues.apache.org/jira/browse/CALCITE-5738?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

jackylau reassigned CALCITE-5738:
---------------------------------

    Assignee: jackylau

> Add SORT_ARRAY for Spark dialect
> --------------------------------
>
>                 Key: CALCITE-5738
>                 URL: https://issues.apache.org/jira/browse/CALCITE-5738
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 1.35.0
>            Reporter: jackylau
>            Assignee: jackylau
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.35.0
>
>
> h3. [sort_array|https://spark.apache.org/docs/latest/api/sql/index.html#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"]}}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)