carlvinhust2012 commented on code in PR #11213:
URL: https://github.com/apache/doris/pull/11213#discussion_r932097679


##########
docs/en/docs/sql-manual/sql-functions/string-functions/reverse.md:
##########
@@ -52,5 +56,34 @@ mysql> SELECT REVERSE('你好');
 +------------------+
 1 row in set (0.00 sec)
 ```
+
+mysql> set enable_array_type=true;
+
+mysql> set enable_vectorized_engine=true;
+
+mysql> select k1, k2, reverse(k2) from array_test order by k1;
++------+-----------------------------+-----------------------------+
+| k1   | k2                          | reverse(`k2`)               |
++------+-----------------------------+-----------------------------+
+|  1   | [1, 2, 3, 4, 5]             | [5, 4, 3, 2, 1]             |
+|  2   | [6, 7, 8]                   | [8, 7, 6]                   |
+|  3   | []                          | []                          |
+|  4   | NULL                        | NULL                        |
+|  5   | [1, 2, 3, 4, 5, 4, 3, 2, 1] | [1, 2, 3, 4, 5, 4, 3, 2, 1] |
+|  6   | [1, 2, 3, NULL]             | [NULL, 3, 2, 1]             |
+|  7   | [4, 5, 6, NULL, NULL]       | [NULL, NULL, 6, 5, 4]       |
++------+-----------------------------+-----------------------------+
+
+mysql> select k1, k2, reverse(k2) from array_test01 order by k1;
++------+-----------------------------------+-----------------------------------+
+| k1   | k2                                | reverse(`k2`)                     
|
++------+-----------------------------------+-----------------------------------+
+|  1   | ['a', 'b', 'c', 'd']              | ['d', 'c', 'b', 'a']              
|
+|  2   | ['e', 'f', 'g', 'h']              | ['h', 'g', 'f', 'e']              
|
+|  3   | [NULL, 'a', NULL, 'b', NULL, 'c'] | ['c', NULL, 'b', NULL, 'a', NULL] 
|
+|  4   | ['d', 'e', NULL, ' ']             | [' ', NULL, 'e', 'd']             
|
+|  5   | [' ', NULL, 'f', 'g']             | ['g', 'f', NULL, ' ']             
|
++------+-----------------------------------+-----------------------------------+
+```
 ### keywords
 REVERSE

Review Comment:
   done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to