eldenmoon commented on code in PR #10388:
URL: https://github.com/apache/doris/pull/10388#discussion_r906845462


##########
gensrc/script/doris_builtins_functions.py:
##########
@@ -160,6 +160,18 @@
     [['array_position'], 'BIGINT', ['ARRAY_STRING', 'STRING'], '', '', '', 
'vec', ''],
 
     [['cardinality', 'size'], 'BIGINT', ['ARRAY'], '', '', '', 'vec', ''],
+    [['array_distinct'], 'ARRAY_TINYINT',   ['ARRAY_TINYINT'], '', '', '', 
'vec', ''],

Review Comment:
   sorry, it's still not working for me, errors still occur if you adding array 
function in `where` condition. eg. 
   ```
   mysql> create table test_array_string (k1 INT, k2 INT, k3 array<string>) 
ENGINE=olap DUPLICATE KEY(k1, k2) PARTITION BY RANGE (k1) (partition `p1` 
values less than ("1000"), partition `p2` values less than ("2000"),partition 
`p3` values less than ("3000"))  DISTRIBUTED BY HASH(k2) BUCKETS 3 
PROPERTIES("replication_num" = "1");
   Query OK, 0 rows affected (0.02 sec)
   
   mysql> insert into test_array_string  values(1, 2, ["a", "b", "c"]),(1, 2, 
["a", "b"]),(1, 2, ["a", "xxqwdqw", "c"]),(1, 2, ["a", "b"]),(1, 2, ["a", "b", 
"c"]),(1, 2, ["a", "b", "c"]),(1, 2, ["a", "b", "c"]),(1, 2, ["a", "b"]),(1, 2, 
["a", "b", "c", "d", "e"]),(1, 2, ["a", "b", "c"]), (1, 2, ["a", "b", 
"cdsdasd"]),(1, 2, [ "nishidabenzhu123"]),(1, 2, ["a", "b", "c"]),(1, 2, ["a", 
"b", "c", "d", "e", "f", "g", "h", "i", "j"]), (1, 2, ["a", "cdsdasd"]), (1, 2, 
["cdsdasd", "lihngyu2", "3", "4", "5"]);
   Query OK, 16 rows affected (0.04 sec)
   {'label':'insert_c3ab610af58b4b3a-83d3cc32cf9f1709', 'status':'VISIBLE', 
'txnId':'4'}
   
   mysql> set enable_vectorized_engine = true;
   Query OK, 0 rows affected (0.01 sec)
   
   mysql> set enable_array_type = true;
   Query OK, 0 rows affected (0.00 sec)
   
   mysql> select size(k3) from test_array_string where size(k3) != 3;
   **ERROR 1105 (HY000): errCode = 2, detailMessage = Function size is not 
implemented.**
   
   mysql> select size(k3) from test_array_string;
   +------------+
   | size(`k3`) |
   +------------+
   |          5 |
   |          2 |
   |         10 |
   |          3 |
   |          1 |
   |          3 |
   |          3 |
   |          5 |
   |          2 |
   |          3 |
   |          3 |
   |          3 |
   |          2 |
   |          3 |
   |          2 |
   |          3 |
   +------------+
   16 rows in set (0.01 sec)
   ```



-- 
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