This is an automated email from the ASF dual-hosted git repository.

zclll pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris-website.git


The following commit(s) were added to refs/heads/master by this push:
     new 4c6c12b34b7 [fix](array)array sorting function supports 
multidimensional arrays (#3303)
4c6c12b34b7 is described below

commit 4c6c12b34b77a46d69ab80776287b6416e493641
Author: Sun Chenyang <[email protected]>
AuthorDate: Mon Jan 26 14:20:07 2026 +0800

    [fix](array)array sorting function supports multidimensional arrays (#3303)
    
    add english
    
    ## Versions
    
    - [x] dev
    - [x] 4.x
    - [ ] 3.x
    - [ ] 2.1
    
    ## Languages
    
    - [ ] Chinese
    - [ ] English
    
    ## Docs Checklist
    
    - [ ] Checked by AI
    - [ ] Test Cases Built
---
 .../array-functions/array-reverse-sort.md               |  5 ++++-
 .../scalar-functions/array-functions/array-sort.md      | 16 +++++++++++++++-
 .../scalar-functions/array-functions/array-sortby.md    |  9 ++++++---
 .../array-functions/array-reverse-sort.md               |  5 +++--
 .../scalar-functions/array-functions/array-sort.md      | 16 +++++++++++++++-
 .../scalar-functions/array-functions/array-sortby.md    |  8 +++++---
 .../array-functions/array-reverse-sort.md               |  5 ++++-
 .../scalar-functions/array-functions/array-sort.md      | 17 ++++++++++++++++-
 .../scalar-functions/array-functions/array-sortby.md    |  9 ++++++---
 .../array-functions/array-reverse-sort.md               |  5 ++++-
 .../scalar-functions/array-functions/array-sort.md      | 16 +++++++++++++++-
 .../scalar-functions/array-functions/array-sortby.md    |  9 ++++++---
 12 files changed, 99 insertions(+), 21 deletions(-)

diff --git 
a/docs/sql-manual/sql-functions/scalar-functions/array-functions/array-reverse-sort.md
 
b/docs/sql-manual/sql-functions/scalar-functions/array-functions/array-reverse-sort.md
index d856593c314..be036b114f2 100644
--- 
a/docs/sql-manual/sql-functions/scalar-functions/array-functions/array-reverse-sort.md
+++ 
b/docs/sql-manual/sql-functions/scalar-functions/array-functions/array-reverse-sort.md
@@ -16,7 +16,7 @@ Sort array elements in descending order.
 
 ## Parameters
 
-- `arr`: `ARRAY<T>`, where `T` can be numeric, boolean, string, datetime, IP, 
etc.
+- `arr`: `ARRAY<T>`, where `T` can be numeric, boolean, string, datetime, IP, 
etc. Multi-dimensional arrays are supported, but all array elements (no matter 
how deeply nested) must be of the supported types.
 
 ## Return value
 
@@ -37,5 +37,8 @@ Sort array elements in descending order.
   - `ARRAY_REVERSE_SORT(NULL)` -> `NULL`
   - `ARRAY_REVERSE_SORT([])` -> `[]`
 
+- Multi-dimensional array sort
+  - `ARRAY_REVERSE_SORT([[3, 4], [5, 6]])` -> `[[5, 6], [3, 4]]`
+
 
 
diff --git 
a/docs/sql-manual/sql-functions/scalar-functions/array-functions/array-sort.md 
b/docs/sql-manual/sql-functions/scalar-functions/array-functions/array-sort.md
index 8b53da5c8b0..c10ff26f251 100644
--- 
a/docs/sql-manual/sql-functions/scalar-functions/array-functions/array-sort.md
+++ 
b/docs/sql-manual/sql-functions/scalar-functions/array-functions/array-sort.md
@@ -18,7 +18,7 @@ If no lambda function is specified, the array elements are 
sorted in ascending o
 ## Parameters
 
 - `lambda`: A `lambda` expression used to define sorting rules, whose return 
value should be -1, 0, or 1 (representing less than, less than or equal to, and 
greater than respectively).
-- `arr`: `ARRAY<T>`, where `T` can be numeric, boolean, string, datetime, IP, 
etc.
+- `arr`: `ARRAY<T>`, where `T` can be numeric, boolean, string, datetime, IP, 
etc. Multi-dimensional arrays are supported, but all array elements (no matter 
how deeply nested) must be of the supported types.
 
 ## Return value
 
@@ -178,3 +178,17 @@ SELECT array_sort((x, y) -> IF(cardinality(x) < 
cardinality(y), -1,
 | [[1, 2], [2, 3, 1], [4, 2, 1, 4]]                                            
                                                                                
                                       |
 
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
 ```
+
+4. Multi-dimensional array sort
+
+```sql
+SELECT ARRAY_SORT([[6, 2], [5, 6]]);
+```
+
+```text
++------------------------------+
+| ARRAY_SORT([[6, 2], [5, 6]]) |
++------------------------------+
+| [[5, 6], [6, 2]]             |
++------------------------------+
+```
diff --git 
a/docs/sql-manual/sql-functions/scalar-functions/array-functions/array-sortby.md
 
b/docs/sql-manual/sql-functions/scalar-functions/array-functions/array-sortby.md
index a7eedc0fac2..5c0078aa9d0 100644
--- 
a/docs/sql-manual/sql-functions/scalar-functions/array-functions/array-sortby.md
+++ 
b/docs/sql-manual/sql-functions/scalar-functions/array-functions/array-sortby.md
@@ -19,8 +19,8 @@ Sort the `values` array according to the order of a `keys` 
array.
 
 ## Parameters
 
-- `values`: `ARRAY<T>`, the value array to be sorted. `T` supports numeric, 
boolean, string, datetime, IP, etc.
-- `keys`: `ARRAY<T>`, a key array of the same length as `values`. `T` supports 
numeric, boolean, string, datetime, IP, etc.
+- `values`: `ARRAY<T>`, the value array to be sorted. `T` supports numeric, 
boolean, string, datetime, IP, etc. Multi-dimensional arrays are supported, but 
all array elements (no matter how deeply nested) must be of the supported types.
+- `keys`: `ARRAY<T>`, a key array of the same length as `values`. `T` supports 
numeric, boolean, string, datetime, IP, etc. Multi-dimensional arrays are 
supported, but all array elements (no matter how deeply nested) must be of the 
supported types.
 - `lambda`: a `lambda` expression applied to `values` to produce the `keys` 
array used for sorting.
 
 ## Return value
@@ -37,7 +37,7 @@ Sort the `values` array according to the order of a `keys` 
array.
 
 - Basic: sort `values` by the ascending order of `keys`.
   - `ARRAY_SORTBY([10,20,30], [3,1,2])` -> `[20,30,10]`
-  - `ARRAY_SORTBY(['a','b','c'], [2,2,1])` -> `['c','a','b]`
+  - `ARRAY_SORTBY(['a','b','c'], [2,2,1])` -> `['c','a','b']`
 
 - Higher-order: compute `keys` via `lambda`, then sort.
   - `ARRAY_SORTBY(x -> x + 1, [3,1,2])` -> `[1,2,3]` (with `keys` `[4,2,3]`)
@@ -47,5 +47,8 @@ Sort the `values` array according to the order of a `keys` 
array.
   - `array_sortby([10,20,30], NULL)` -> `[10, 20, 30]`
   - `array_sortby(NULL, [2,3])` -> `NULL`
 
+- Multi-dimensional array sort: the key sorting rules follow the type of the 
inner elements.
+  - `ARRAY_SORTBY(x -> x[1], [[1,2],[0,1]])` -> `[[0, 1], [1, 2]]`
+
 
 
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/array-functions/array-reverse-sort.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/array-functions/array-reverse-sort.md
index 416f5f612c2..fa4784c00c2 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/array-functions/array-reverse-sort.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/array-functions/array-reverse-sort.md
@@ -16,7 +16,7 @@
 
 ## 参数
 
-- `arr`:`ARRAY<T>`,`T` 可为数值、布尔、字符串、日期时间、IP 等。
+- `arr`:`ARRAY<T>`,`T` 可为数值、布尔、字符串、日期时间、IP 
等类型,也支持多维数组,但所有数组元素(无论嵌套多少层)都必须属于上述类型。
 
 ## 返回值
 
@@ -37,4 +37,5 @@
   - `ARRAY_REVERSE_SORT(NULL)` -> `NULL`
   - `ARRAY_REVERSE_SORT([])` -> `[]`
 
-
+- 多维数组排序
+  - `ARRAY_REVERSE_SORT([[3, 4], [5, 6]])` -> `[[5, 6], [3, 4]]`
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/array-functions/array-sort.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/array-functions/array-sort.md
index f7ccb195221..8b14f327b7d 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/array-functions/array-sort.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/array-functions/array-sort.md
@@ -18,7 +18,7 @@
 ## 参数
 
 - `lambda`: `lambda` 表达式,用于定义排序规则,返回值应为-1, 0, 1(分别表示小于,等于,大于)。
-- `arr`:`ARRAY<T>`,`T` 可为数值、布尔、字符串、日期时间、IP 等。
+- `arr`:`ARRAY<T>`,`T` 可为数值、布尔、字符串、日期时间、IP 
等类型,也支持多维数组,但所有数组元素(无论嵌套多少层)都必须属于上述类型。
 
 ## 返回值
 
@@ -178,3 +178,17 @@ SELECT array_sort((x, y) -> IF(cardinality(x) < 
cardinality(y), -1,
 | [[1, 2], [2, 3, 1], [4, 2, 1, 4]]                                            
                                                                                
                                       |
 
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
 ```
+
+4. 多维数组排序
+
+```sql
+select ARRAY_SORT([[6, 2], [5, 6]]);
+```
+
+```text
++------------------------------+
+| ARRAY_SORT([[6, 2], [5, 6]]) |
++------------------------------+
+| [[5, 6], [6, 2]]             |
++------------------------------+
+```
\ No newline at end of file
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/array-functions/array-sortby.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/array-functions/array-sortby.md
index fe8724da123..b21dc31080a 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/array-functions/array-sortby.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/array-functions/array-sortby.md
@@ -19,8 +19,8 @@
 
 ## 参数
 
-- `values`:`ARRAY<T>`,要排序的 value 数组,`T`只支持:数值,布尔,字符串,时间日期,IP 等类型。
-- `keys`:`ARRAY<T>`,与 `arr` 等长的 key 数组,`T`只支持:数值,布尔,字符串,时间日期,IP 等类型。
+- `values`:`ARRAY<T>`,要排序的 value 数组,`T` 可为数值、布尔、字符串、日期时间、IP 
等类型,也支持多维数组,但所有数组元素(无论嵌套多少层)都必须属于上述类型。
+- `keys`:`ARRAY<T>`,与 `arr` 等长的 key 数组,`T` 可为数值、布尔、字符串、日期时间、IP 
等类型,也支持多维数组,但所有数组元素(无论嵌套多少层)都必须属于上述类型。
 - `lambda`: `lambda` 表达式作用于 `values`, 产生 `key 数组`,利用产生的 `key 数组` 进行排序。
 
 ## 返回值
@@ -37,7 +37,7 @@
 
 - 基本用法: 先对 `keys` 进行升序排序,再对 `values` 按照对应的 `keys` 排序。
   - `ARRAY_SORTBY([10,20,30], [3,1,2])` -> `[20,30,10]`
-  - `ARRAY_SORTBY(['a','b','c'], [2,2,1])` -> `['c','a','b]`
+  - `ARRAY_SORTBY(['a','b','c'], [2,2,1])` -> `['c','a','b']`
 
 - 高阶用法:先执行 `lambda` 表达式产生 `keys`,然后再排序。
   - `ARRAY_SORTBY(x -> x + 1, [3,1,2])` -> `[1,2,3]` ( `key`为 `[4,2,3]`)
@@ -47,3 +47,5 @@
   - `array_sortby([10,20,30], NULL)` -> `[10, 20, 30]`
   - `array_sortby(NULL, [2,3])` -> `NULL`
 
+- 多维数组排序:key 的排序规则按照内部元素的类型排序。
+  - `ARRAY_SORTBY(x -> x[1], [[1,2],[0,1]])` -> `[[0, 1], [1, 2]]`
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/sql-manual/sql-functions/scalar-functions/array-functions/array-reverse-sort.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/sql-manual/sql-functions/scalar-functions/array-functions/array-reverse-sort.md
index 416f5f612c2..f847f145fe2 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/sql-manual/sql-functions/scalar-functions/array-functions/array-reverse-sort.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/sql-manual/sql-functions/scalar-functions/array-functions/array-reverse-sort.md
@@ -16,7 +16,7 @@
 
 ## 参数
 
-- `arr`:`ARRAY<T>`,`T` 可为数值、布尔、字符串、日期时间、IP 等。
+- `arr`:`ARRAY<T>`,`T` 可为数值、布尔、字符串、日期时间、IP 
等类型,也支持多维数组,但所有数组元素(无论嵌套多少层)都必须属于上述类型。
 
 ## 返回值
 
@@ -37,4 +37,7 @@
   - `ARRAY_REVERSE_SORT(NULL)` -> `NULL`
   - `ARRAY_REVERSE_SORT([])` -> `[]`
 
+- 多维数组排序
+  - `ARRAY_REVERSE_SORT([[3, 4], [5, 6]])` -> `[[5, 6], [3, 4]]`
+
 
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/sql-manual/sql-functions/scalar-functions/array-functions/array-sort.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/sql-manual/sql-functions/scalar-functions/array-functions/array-sort.md
index f7ccb195221..eaa4ae2a40a 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/sql-manual/sql-functions/scalar-functions/array-functions/array-sort.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/sql-manual/sql-functions/scalar-functions/array-functions/array-sort.md
@@ -18,7 +18,7 @@
 ## 参数
 
 - `lambda`: `lambda` 表达式,用于定义排序规则,返回值应为-1, 0, 1(分别表示小于,等于,大于)。
-- `arr`:`ARRAY<T>`,`T` 可为数值、布尔、字符串、日期时间、IP 等。
+- `arr`:`ARRAY<T>`,`T` 可为数值、布尔、字符串、日期时间、IP 
等类型,也支持多维数组,但所有数组元素(无论嵌套多少层)都必须属于上述类型。
 
 ## 返回值
 
@@ -178,3 +178,18 @@ SELECT array_sort((x, y) -> IF(cardinality(x) < 
cardinality(y), -1,
 | [[1, 2], [2, 3, 1], [4, 2, 1, 4]]                                            
                                                                                
                                       |
 
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
 ```
+
+
+4. 多维数组排序
+
+```sql
+select ARRAY_SORT([[6, 2], [5, 6]]);
+```
+
+```text
++------------------------------+
+| ARRAY_SORT([[6, 2], [5, 6]]) |
++------------------------------+
+| [[5, 6], [6, 2]]             |
++------------------------------+
+```
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/sql-manual/sql-functions/scalar-functions/array-functions/array-sortby.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/sql-manual/sql-functions/scalar-functions/array-functions/array-sortby.md
index fe8724da123..da55de4f098 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/sql-manual/sql-functions/scalar-functions/array-functions/array-sortby.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/sql-manual/sql-functions/scalar-functions/array-functions/array-sortby.md
@@ -19,8 +19,8 @@
 
 ## 参数
 
-- `values`:`ARRAY<T>`,要排序的 value 数组,`T`只支持:数值,布尔,字符串,时间日期,IP 等类型。
-- `keys`:`ARRAY<T>`,与 `arr` 等长的 key 数组,`T`只支持:数值,布尔,字符串,时间日期,IP 等类型。
+- `values`:`ARRAY<T>`,要排序的 value 数组,`T` 可为数值、布尔、字符串、日期时间、IP 
等类型,也支持多维数组,但所有数组元素(无论嵌套多少层)都必须属于上述类型。
+- `keys`:`ARRAY<T>`,与 `arr` 等长的 key 数组,`T` 可为数值、布尔、字符串、日期时间、IP 
等类型,也支持多维数组,但所有数组元素(无论嵌套多少层)都必须属于上述类型。
 - `lambda`: `lambda` 表达式作用于 `values`, 产生 `key 数组`,利用产生的 `key 数组` 进行排序。
 
 ## 返回值
@@ -37,7 +37,7 @@
 
 - 基本用法: 先对 `keys` 进行升序排序,再对 `values` 按照对应的 `keys` 排序。
   - `ARRAY_SORTBY([10,20,30], [3,1,2])` -> `[20,30,10]`
-  - `ARRAY_SORTBY(['a','b','c'], [2,2,1])` -> `['c','a','b]`
+  - `ARRAY_SORTBY(['a','b','c'], [2,2,1])` -> `['c','a','b']`
 
 - 高阶用法:先执行 `lambda` 表达式产生 `keys`,然后再排序。
   - `ARRAY_SORTBY(x -> x + 1, [3,1,2])` -> `[1,2,3]` ( `key`为 `[4,2,3]`)
@@ -47,3 +47,6 @@
   - `array_sortby([10,20,30], NULL)` -> `[10, 20, 30]`
   - `array_sortby(NULL, [2,3])` -> `NULL`
 
+- 多维数组排序:key 的排序规则按照内部元素的类型排序。
+  - `ARRAY_SORTBY(x -> x[1], [[1,2],[0,1]])` -> `[[0, 1], [1, 2]]`
+
diff --git 
a/versioned_docs/version-4.x/sql-manual/sql-functions/scalar-functions/array-functions/array-reverse-sort.md
 
b/versioned_docs/version-4.x/sql-manual/sql-functions/scalar-functions/array-functions/array-reverse-sort.md
index d856593c314..be036b114f2 100644
--- 
a/versioned_docs/version-4.x/sql-manual/sql-functions/scalar-functions/array-functions/array-reverse-sort.md
+++ 
b/versioned_docs/version-4.x/sql-manual/sql-functions/scalar-functions/array-functions/array-reverse-sort.md
@@ -16,7 +16,7 @@ Sort array elements in descending order.
 
 ## Parameters
 
-- `arr`: `ARRAY<T>`, where `T` can be numeric, boolean, string, datetime, IP, 
etc.
+- `arr`: `ARRAY<T>`, where `T` can be numeric, boolean, string, datetime, IP, 
etc. Multi-dimensional arrays are supported, but all array elements (no matter 
how deeply nested) must be of the supported types.
 
 ## Return value
 
@@ -37,5 +37,8 @@ Sort array elements in descending order.
   - `ARRAY_REVERSE_SORT(NULL)` -> `NULL`
   - `ARRAY_REVERSE_SORT([])` -> `[]`
 
+- Multi-dimensional array sort
+  - `ARRAY_REVERSE_SORT([[3, 4], [5, 6]])` -> `[[5, 6], [3, 4]]`
+
 
 
diff --git 
a/versioned_docs/version-4.x/sql-manual/sql-functions/scalar-functions/array-functions/array-sort.md
 
b/versioned_docs/version-4.x/sql-manual/sql-functions/scalar-functions/array-functions/array-sort.md
index 8b53da5c8b0..c10ff26f251 100644
--- 
a/versioned_docs/version-4.x/sql-manual/sql-functions/scalar-functions/array-functions/array-sort.md
+++ 
b/versioned_docs/version-4.x/sql-manual/sql-functions/scalar-functions/array-functions/array-sort.md
@@ -18,7 +18,7 @@ If no lambda function is specified, the array elements are 
sorted in ascending o
 ## Parameters
 
 - `lambda`: A `lambda` expression used to define sorting rules, whose return 
value should be -1, 0, or 1 (representing less than, less than or equal to, and 
greater than respectively).
-- `arr`: `ARRAY<T>`, where `T` can be numeric, boolean, string, datetime, IP, 
etc.
+- `arr`: `ARRAY<T>`, where `T` can be numeric, boolean, string, datetime, IP, 
etc. Multi-dimensional arrays are supported, but all array elements (no matter 
how deeply nested) must be of the supported types.
 
 ## Return value
 
@@ -178,3 +178,17 @@ SELECT array_sort((x, y) -> IF(cardinality(x) < 
cardinality(y), -1,
 | [[1, 2], [2, 3, 1], [4, 2, 1, 4]]                                            
                                                                                
                                       |
 
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
 ```
+
+4. Multi-dimensional array sort
+
+```sql
+SELECT ARRAY_SORT([[6, 2], [5, 6]]);
+```
+
+```text
++------------------------------+
+| ARRAY_SORT([[6, 2], [5, 6]]) |
++------------------------------+
+| [[5, 6], [6, 2]]             |
++------------------------------+
+```
diff --git 
a/versioned_docs/version-4.x/sql-manual/sql-functions/scalar-functions/array-functions/array-sortby.md
 
b/versioned_docs/version-4.x/sql-manual/sql-functions/scalar-functions/array-functions/array-sortby.md
index a7eedc0fac2..5c0078aa9d0 100644
--- 
a/versioned_docs/version-4.x/sql-manual/sql-functions/scalar-functions/array-functions/array-sortby.md
+++ 
b/versioned_docs/version-4.x/sql-manual/sql-functions/scalar-functions/array-functions/array-sortby.md
@@ -19,8 +19,8 @@ Sort the `values` array according to the order of a `keys` 
array.
 
 ## Parameters
 
-- `values`: `ARRAY<T>`, the value array to be sorted. `T` supports numeric, 
boolean, string, datetime, IP, etc.
-- `keys`: `ARRAY<T>`, a key array of the same length as `values`. `T` supports 
numeric, boolean, string, datetime, IP, etc.
+- `values`: `ARRAY<T>`, the value array to be sorted. `T` supports numeric, 
boolean, string, datetime, IP, etc. Multi-dimensional arrays are supported, but 
all array elements (no matter how deeply nested) must be of the supported types.
+- `keys`: `ARRAY<T>`, a key array of the same length as `values`. `T` supports 
numeric, boolean, string, datetime, IP, etc. Multi-dimensional arrays are 
supported, but all array elements (no matter how deeply nested) must be of the 
supported types.
 - `lambda`: a `lambda` expression applied to `values` to produce the `keys` 
array used for sorting.
 
 ## Return value
@@ -37,7 +37,7 @@ Sort the `values` array according to the order of a `keys` 
array.
 
 - Basic: sort `values` by the ascending order of `keys`.
   - `ARRAY_SORTBY([10,20,30], [3,1,2])` -> `[20,30,10]`
-  - `ARRAY_SORTBY(['a','b','c'], [2,2,1])` -> `['c','a','b]`
+  - `ARRAY_SORTBY(['a','b','c'], [2,2,1])` -> `['c','a','b']`
 
 - Higher-order: compute `keys` via `lambda`, then sort.
   - `ARRAY_SORTBY(x -> x + 1, [3,1,2])` -> `[1,2,3]` (with `keys` `[4,2,3]`)
@@ -47,5 +47,8 @@ Sort the `values` array according to the order of a `keys` 
array.
   - `array_sortby([10,20,30], NULL)` -> `[10, 20, 30]`
   - `array_sortby(NULL, [2,3])` -> `NULL`
 
+- Multi-dimensional array sort: the key sorting rules follow the type of the 
inner elements.
+  - `ARRAY_SORTBY(x -> x[1], [[1,2],[0,1]])` -> `[[0, 1], [1, 2]]`
+
 
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to