carlvinhust2012 opened a new pull request, #11213: URL: https://github.com/apache/doris/pull/11213
# Proposed changes 1. this pr is used to add the array_reverse function. Issue Number: close https://github.com/apache/doris/issues/10052 2.we can run this function in sql as follow: mysql> set enable_array_type=true; mysql> set enable_vectorized_engine=true; mysql> select k1, k2, array_reverse(k2) from array_test; +------+-----------------------------+-----------------------------+ | k1 | k2 | array_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, array_reverse(k2) from array_test01; +------+-----------------------------------+-----------------------------------+ | k1 | k2 | array_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, ' '] | +------+-----------------------------------+-----------------------------------+ ## Problem Summary: Describe the overview of changes. ## Checklist(Required) 1. Does it affect the original behavior: (No) 2. Has unit tests been added: (No) 3. Has document been added or modified: (No) 4. Does it need to update dependencies: (No) 5. Are there any changes that cannot be rolled back: (No) ## Further comments If this is a relatively large or complex change, kick off the discussion at [d...@doris.apache.org](mailto:d...@doris.apache.org) by explaining why you chose the solution you did and what alternatives you considered, etc... -- 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