Doris version:2.1.2 , 2.1.3
官网文档链接:https://doris.apache.org/zh-CN/docs/sql-manual/sql-functions/array-functions/array-zip
BUG 内容:在使用 array_zip() 函数时与官网文档描述不符,且返回结果出现无规律情况。
复现情况
理想:
mysql> select array_zip(['a', 'b', 'c'], [1, 2, 3]);
+-------------------------------------------------+
| array_zip(ARRAY('a', 'b', 'c'), ARRAY(1, 2, 3)) |
+-------------------------------------------------+
| [{'a', 1}, {'b', 2}, {'c', 3}] |
+-------------------------------------------------+
1 row in set (0.01 sec)
实际:
MySQL [ods]> select array_zip(['a', 'b', 'c'], [1, 2, 3]);
+--------------------------------------------------------------+
| array_zip(['a', 'b', 'c'], [1, 2, 3]) |
+--------------------------------------------------------------+
| [{"1": "a", "2": 1}, {"1": "b", "2": 2}, {"1": "c", "2": 3}] |
+--------------------------------------------------------------+
1 row in set (0.01 sec)