Mryange opened a new pull request, #31913: URL: https://github.com/apache/doris/pull/31913
## Proposed changes ``` mysql [test]>select * from foreach_table; +------+-----------+-----------------------+-------------------------+ | id | a | b | s | +------+-----------+-----------------------+-------------------------+ | 1 | [1, 2, 3] | [[1], [1, 2, 3], [2]] | ["ab", "123", "114514"] | | 2 | [20] | [[2]] | ["cd"] | | 3 | [100] | [[1]] | ["efg"] | | 4 | NULL | [null] | NULL | | 5 | [null, 2] | [[2], null] | [null, "c"] | +------+-----------+-----------------------+-------------------------+ 5 rows in set (0.01 sec) mysql [test]>select array_agg_foreach(s) from foreach_table; +-------------------------------------------------------+ | array_agg_foreach(s) | +-------------------------------------------------------+ | [["ab", "cd", "efg", null], ["123", "c"], ["114514"]] | +-------------------------------------------------------+ 1 row in set (0.02 sec) mysql [test]>select map_agg_foreach(s,a) from foreach_table; +----------------------------------------------------------------+ | map_agg_foreach(s, a) | +----------------------------------------------------------------+ | [{"ab":1, "cd":20, "efg":100}, {"123":2, "c":2}, {"114514":3}] | +----------------------------------------------------------------+ 1 row in set (0.02 sec) ``` <!--Describe your changes.--> ## 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